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 binary search and sequential search?
How do u write test cases?
What are the different rules of SORT operation?
How do you reference the fixed block file formats from cobol programs
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
What are the different types of condition in cobol and write their forms.
How are the next sentence and continue different from each other?
What do you understand by psb and acb?
How to print 10 to 1 if the input have only 10 digit number?
Explain how to differentiate call by context by comparing it to other calls?
Whats the difference between search & search ALL?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
how do you define single dimensional array and multidimensional array in your cobol?