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 / jagan
Thavasi ,
In your case , check the record number 1 and 4 which has 3
in the second position of it . As your have given LEADING .
As it encounters the first '3' in any of the position in
the record , it will change it to '5' .
Please correct me if i am wrong...
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
How do define dynamic array in cobol.
Write a cobol program making use of the redefine clause.
What are the access modes of START statement?
What is the difference between comp and comp-3 usage?
What is comp-1 and comp-2?
Why did you choose to work with ibm mainframe cobol programming?
What guidelines should be followed to write a structured cobol prgm?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
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.
i need a small 3d program using inline and outline.
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
Can we redefine the field of x(200) to less than 200?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
IF I mention stop run in CICS what happens?
What is the utilization of copybook in cobol?