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
I have a File that has duplicate records. I need only those records that occur more than thrice.?
Write some characteristics of cobol as means of business language.
How do get the result of your program directly on your pc?
What are declaratives and what are their uses in cobol?
Are you comfortable in cobol or jcl?
What are the different types of condition in cobol and write their forms.
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
What are literals?
What is rmode(any) ?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
How to remove 2 duplicate records and copy only one using job control language?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
In COBOL programming, what is PERFORM? What is VARYING?
Difference between array and sub-script ?