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 is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
How do you get the data to code the BMS macro?
How do define dynamic array in cobol.
How are the next sentence and continue different from each other?
How many sections are there in data division in COBOL?
How do you define a variable of comp-1 and comp-2?
How do you differentiate between cobol and cobol-ii?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What is length is cobol?
What is the LINKAGE SECTION used in COBOL?
What is cobol?
How arrays can be defined in COBOL?
What is amode(24)?
What are the different open modes available in cobol?
Whats the difference between search & search ALL?