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 |
What are all the divisions of a COBOL program?
What is the difference between SEARCH and SEARCH ALL? What is more efficient?
What is the difference beetween Arrays and Tables in Cobol? please dont give the answer that arrays in cobol terminology is called tables......
what is the result of the following? DIVIDE A INTO B GIVING C. a.C=A/B b.the reminder of B/A is stored in C c.C=B/A d.the reminder of A/B is stored in C
What the difference is between continue and next sentence?
how to display the dataset information?
What is the difference between a subscript and an index in a table definition?
what is the difference between perform varying and perform until
How do get the result of your program directly on your pc?
) what is the difference between AID and HANDLE AID?
What is the difference between working storage copybook and linkage section copybook?
wht is load module and object module ?