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


Please Help Members By Posting Answers For Below Questions

Name the sections present in data division.

701


What is report-item in COBOL?

711


Write some characteristics of cobol as means of business language.

619


What is the Purpose of Pointer in the string?

643


What is the difference between Call and a Link?

700






What is redefines clause in COBOL?

851


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

631


how do you define single dimensional array and multidimensional array in your cobol?

677


what is search and searchall?what is the diffrence between them?give an best example?

5561


What is the LINKAGE SECTION used in COBOL?

889


How do get the result of your program directly on your pc?

1885


What is the compute verb? How is it used?

661


How to print 10 to 1 if the input have only 10 digit number?

811


HOw can I get the negative sign while deduct high value from low value

1790


how to convert the recors form vsam file to db2 table tru file aid

2763