can we read in input the file with a variable length ?
please , how ..could you help me ?
Answers were Sorted based on User's Feedback
Answer / anjiii
yes we can read input file with variable length.
while declaring a file in a file section, have two file
records declared at zero level... ex.
FD
01 Var-data-1 pic x().
05
05
.
.
01 Var-data-2 pic x().
Is This Answer Correct ? | 2 Yes | 0 No |
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 |
hi dudes.....can any one help me..... what is SET TO TRUE all about,anyway?
can we read in input the file with a variable length ? please , how ..could you help me ?
i want to enter the name 'pandu' into ur table how?
What is tne need to use sub programs in Cobol?
what is qualification on occurs clause?
How to increase the logical record length of existing PS file?
how do you reference the printer file formats from cobol programs
what is search and searchall?what is the diffrence between them?give an best example?
How many bytes do a s9 (7) comp-3 field occupy?
How we copy a program from production region to development region.What is the process & syntax ?
What is CALL statement in COBOL?
What does the INITIALIZE verb do?