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 amode(31)

1113


What is the usage of comp fields in cobol?

1135


What is cobol?

1202


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

2297


What are various search techniques in cobol? Explain.

1029


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2327


How to know whether the module is dynamical or statistical?

1085


Can a Search can be done on a table with or without Index?

1240


what are decleratives in cobol?

2212


What is inspect in cobol ?

1245


What rules are to be followed while using the corresponding options?

1018


How do you get the data to code the BMS macro?

1924


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

1177


What do you understand by psb and acb?

1062


how can i see junk values in dclgen or in hostvariable of comp ?

2936