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

You can solve this problem using the Referencial Intigrity.

Let consider these extension no. in WS section.
01 WS-EXTN PIC X(4).

IF WS-EXTN(1,1)='3'
ISPECT WS-EXTN replacng first '3' by '5'
END-IF.

read the next record.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we change the password using ALTER? anyone tried and changed?

2021


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

3234


What are the different rules to perform a Search?

1098


What the difference is between continue and next sentence?

1172


What is Pic 9v99 Indicates in COBOL?

1264


how to access the file from prodution from changeman tool and to submit a file to production

7549


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

2473


What is the difference between PIC 9.99 and PIC9v99?

1339


Write a cobol program making use of the redefine clause.

1185


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2435


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

1123


Explain what you understand by passing by value.

1157


What is report-item in COBOL?

1156


State the various causes of s0c1, s0c5 and s0c7.

1088


What do you understand by psb and acb?

1125