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
Can we change the password using ALTER? anyone tried and changed?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
What are the different rules to perform a Search?
What the difference is between continue and next sentence?
What is Pic 9v99 Indicates in COBOL?
how to access the file from prodution from changeman tool and to submit a file to production
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is the difference between PIC 9.99 and PIC9v99?
Write a cobol program making use of the redefine clause.
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Explain what you understand by passing by value.
What is report-item in COBOL?
State the various causes of s0c1, s0c5 and s0c7.
What do you understand by psb and acb?