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
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
What is comp-1 and comp-2?
what is the use of outrecord?
how do you reference the printer file formats from cobol programs
State the various causes of s0c1, s0c5 and s0c7.
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
What are various search techniques in cobol? Explain.
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the compute verb? How is it used?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
example for sub strings ? and refernce modifications whit output pls
What do you understand by psb and acb?
What are the rules of the move verb?
what is search and searchall?what is the diffrence between them?give an best example?