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
What are declaratives and what are their uses in cobol?
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
What is the difference between perform … with test after and perform … with test before?
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.
how to convert the recors form vsam file to db2 table tru file aid
What is an in line perform? When would you use it? Anything else you wish to say about it.
What is the use of intialize verb?
When is inspect verb is used in cobol?
what is amode(24), amode(31), rmode(24) and rmode(any)?
how do you reference the printer file formats from cobol programs
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What are the different rules of SORT operation?
What are various search techniques in cobol? Explain.
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.
how can i see junk values in dclgen or in hostvariable of comp ?