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 many sections are there in data division in COBOL?
how can i see junk values in dclgen or in hostvariable of comp ?
Difference between array and sub-script ?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
What rules are followed by the search verb.
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
What are various search techniques in cobol? Explain.
What are the various section in data division and briefly explain them.
What are the different data types in cobol?
What is a scope terminator give example?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
Can we change the password using ALTER? anyone tried and changed?
How do get the result of your program directly on your pc?
What rules are to be followed while using the corresponding options?
Can you please let me know the centre name of INS certification in Kolkata.