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
Difference between array and sub-script ?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
) How do u handle errors in BMS macro?
What is perform what is varying?
example for sub strings ? and refernce modifications whit output pls
In COBOL, what is the different between index and subscript?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
How to know whether the module is dynamical or statistical?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
Why would you use find and get rather than to obtain?
What is comp-1 and comp-2?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
Write the code implementing the perform … varying.
What kind of error is trapped by on size error option?