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 rmode(any) ?
What is the difference between binary search and sequential search?
Define static linking and dynamic linking.
What is the difference between next sentence and continue in cobol programing language?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
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
How to print 10 to 1 if the input have only 10 digit number?
how do you reference the variable unblock file formats from cobol programs
Write a program that uses move corresponding.
What is the problem of ordered sequential files access?
What is the difference between comp and comp-3?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
In COBOL programming, what is PERFORM? What is VARYING?
How do you define a variable of comp-1 and comp-2?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?