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
) How do u handle errors in BMS macro?
What is length is cobol?
What rules are followed by the search verb.
What are the different types of condition in cobol and write their forms.
What are the various section in data division and briefly explain them.
What guidelines should be followed to write a structured cobol prgm?
What is comp-1 and comp-2?
Can a Search can be done on a table with or without Index?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
what are decleratives in cobol?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Write down the divisions of cobol program?
what is the difference between COBOL2 AND COBOL390?
Define static linking and dynamic linking.