If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....



If a file has 1000 records.. if i have to replace the first and last characters of the file with ano..

Answer / raj

Using findrep in sort

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?

1 Answers   HCL,


can we use 77 level no for Redefines?if we use give an example?

3 Answers   Mphasis,


suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.

2 Answers   IBM,


How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1: move 20 to a.

3 Answers  


Should I use STOP RUN in the sub program??why?

6 Answers   Xansa,






what is amode(24), amode(31), rmode(24) and rmode(any)?

0 Answers  


why occurs clause not mentioned in 01 level

6 Answers   HCL, NIIT, TCS, Tesco,


consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayedafter the PERFORM is over?assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above since there is a syntex error

4 Answers   TCS,


a. Can the OPTIONAL clause in COBOL only be coded for input files? b. If it is coded for files opened in OUTPUT, I-O or EXTEND mode, will it give a compilation error? c. If there are no compilation errors and if such files are not coded in the JCL, will the OPEN statement run fine when these files are opened? d. How will a WRITE statement work for the above files?

2 Answers  


what is the advantage of using redefines instead of delaring the variables ?

5 Answers   HCL,


2)Where the Plan is located in CICS-DB2?

1 Answers   IBM,


i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,copy,write operations).plz give me details of all posible JCL utilities?

7 Answers   CTS,


Categories