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 |
can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move 'xy' to b. display a,b.
Describe the cobol database components?
can we read in input the file with a variable length ? please , how ..could you help me ?
diffrence between z(2) and z9(2)
In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?
how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas
How is sign stored in a comp-3 field?
which one is the best of com and com-3.using of real time ?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
Difference between ps, esds
how to code in cobol while using variable block file?
Name the divisions, which are available in a cobol program?