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
What type of SDLC u followed? Why?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
A table has two indexes defined. Which one will be used by the SEARCH?
what is difference between cobol and cobol/400
What guidelines should be followed to write a structured cobol prgm?
What is the difference between external and global variables in COBOL?
Explain what you understand by passing by value.
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
IF I mention stop run in CICS what happens?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How do you get the data to code the BMS macro?
Which mode is used to operate the sequential file?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
What is a report item?