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 is the use of intialize verb?
can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dynamic array?
in a indexed file what is procedure for read the records from 12 to 18. please give the code example
created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?
What is the difference between working storage copybook and linkage section copybook?
How do you do in-line PERFORM?
what will happen if pass values more than 100 using PARM parameter?
i have a sequencial file contains multiple records, i want to extract one row which contains various fields like order number,date,warehouse,.ect.. in to the another file by accepting the order number from jcl. how can i do it. pls help me..
How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.
What was removed from COBOL in the COBOL II implementation?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
what is call by value and call by reference ?
3 Answers Infosys, ITC Indian Tobacco Company,