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 are literals?
State the various causes of s0c1, s0c5 and s0c7.
explain sorting techniques in cobol program?
Why did you choose to work with ibm mainframe cobol programming?
How to print 10 to 1 if the input have only 10 digit number?
What kind of error is trapped by on size error option?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
How do get the result of your program directly on your pc?
What is the local-storage section?
For rewrite, why is it mandatory that file needs to be opened?
Define static linking and dynamic linking.
What type of SDLC u followed? Why?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
Write a program to explain size error.
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?