I have the file which is having the extension no as records.
sample file will look like below.
2310
3410
3256
4350
3781
5408
I need to replace the record which is starting with 3 to 5
(i.e) 3410 to 5410. How can we do it through cobol
and cobol-db2 program? I need the possible logic?
Answer Posted / santy
You can solve this problem using the Referencial Intigrity.
Let consider these extension no. in WS section.
01 WS-EXTN PIC X(4).
IF WS-EXTN(1,1)='3'
ISPECT WS-EXTN replacng first '3' by '5'
END-IF.
read the next record.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
how do you reference the rrds file formats from cobol programs
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
how do you reference the ksds vsam file formats from cobol programs
Which Search verb is equivalent to PERFORM…VARYING?
What are the different rules for performing sort operation?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
Write a program that uses move corresponding.
What is the difference between comp and comp-3?
Give some examples of command terminators?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
Discuss about changing dataset name in proc.
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
How to remove 2 duplicate records and copy only one using job control language?
What is amode(24)?