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


Please Help Members By Posting Answers For Below Questions

example for sub strings ? and refernce modifications whit output pls

1846


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

1949


What are the different rules of SORT operation?

701


What is difference between static and dynamic call in cobol?

779


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

712






Explain the configuration section of a cobol program with examples of syntax.

661


What do you understand by psb and acb?

668


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1525


What are the access modes of START statement?

719


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

710


What are the pertinent COBOL commands?

2626


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

1004


What are 77 levels used for?

661


In which area will you utilize 88 level items in cobol?

724


explain sorting techniques in cobol program?

692