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...

can we read in input the file with a variable length ?
please , how ..could you help me ?

Answer Posted / kotagiriramachandra

we can read an input rec of variable length.For that u need
to declare
01 main-rec
05 rec-data pic x(m) <== m should be max length of rec
specified in file declaration(avg length, max length).
05 rec-len pic s9(4) comp
precedure div...
.
.
.
read infile at end...
else move in-rec into main-rec.
I think in this way we can do.If i'm wrong plz let me know..

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are declaratives and what are their uses in cobol?

1256


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

1293


What is the difference between perform … with test after and perform … with test before?

1494


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4208


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

3311


What is an in line perform? When would you use it? Anything else you wish to say about it.

1141


What is the use of intialize verb?

1298


When is inspect verb is used in cobol?

1308


what is amode(24), amode(31), rmode(24) and rmode(any)?

1193


how do you reference the printer file formats from cobol programs

1277


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

2064


What are the different rules of SORT operation?

1202


What are various search techniques in cobol? Explain.

1111


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

2288


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

3048