| |
GeekInterview.com > Interview Questions > Mainframe > COBOL
| Print | |
Question: Give example of Inspect TALLYING / BEFORE INTIAL / AFTER INITIAL. In which situation will use this in COBOL?
Answer: We have different type of Inspect verb 1.counting INSPECT. 2.replacing INSPECT. 3.combined INSPECT. 4.converting INSPECT. Give example of any Inspect verb which you know. |
| July 07, 2008 15:29:46 |
#2 |
| sarath_sawanth |
Member Since: July 2008 Total Comments: 2 |
RE: Give example of Inspect TALLYING / BEFORE INTIAL / AFTER INITIAL. In which situation will use this in COBOL? |
For Replacing:
var1 = 'abc pqrs xyz'
INSPECT var1 REPLACING CHARACTERS BY 'p' BEFORE INITIAL 'abc' AFTER INITIAL 'xyz' end-inspect.
Sol: var1 = 'abc pppp xyz' |
| |
Back To Question | |