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 cobol?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
What are 77 levels used for?
What are declaratives and what are their uses in cobol?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
What is amode(31)
how do you reference the variable block file formats from cobol programs
HOw can I get the negative sign while deduct high value from low value
What do you understand by psb and acb?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the use of intialize verb?