Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / pa

read the record to the WS varible defined below
01 ws-var1.
05 ws-var2 pic x(1).
05 ws-var3 pic x(2).

if ws-var2 = '3'
inspect ws-var replacing first '3' by '5'
end -if

read the next record.

Hope it works

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between binary search and sequential search?

1070


Can we redefine the field of x(200) to less than 200?

1349


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

1382


Give some examples of command terminators?

1238


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5789


Can you please let me know the centre name of INS certification in Kolkata.

2225


What is the difference between next sentence and continue in cobol programing language?

1195


Write the code implementing the perform … varying.

1041


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

1137


What guidelines should be followed to write a structured cobol prgm?

1135


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

1135


What is cobol?

1222


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

1077


Have you used comp and comp-3 in your project? And how?

2459


What is a SSRANGE and NOSSRANGE?

1445