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



can we read in input the file with a variable length ? please , how ..could you help me ?..

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

can we read in input the file with a variable length ? please , how ..could you help me ?..

Answer / sandy

can some one elaborat more on this....

Is This Answer Correct ?    0 Yes 0 No

can we read in input the file with a variable length ? please , how ..could you help me ?..

Answer / 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

More COBOL Interview Questions

hi dudes.....can any one help me..... what is SET TO TRUE all about,anyway?

1 Answers  


can we read in input the file with a variable length ? please , how ..could you help me ?

3 Answers   EDS,


i want to enter the name 'pandu' into ur table how?

1 Answers   Fidelity,


What is tne need to use sub programs in Cobol?

3 Answers   HSBC,


what is qualification on occurs clause?

2 Answers  


How to increase the logical record length of existing PS file?

7 Answers  


how do you reference the printer file formats from cobol programs

0 Answers  


what is search and searchall?what is the diffrence between them?give an best example?

3 Answers   BirlaSoft,


How many bytes do a s9 (7) comp-3 field occupy?

1 Answers  


How we copy a program from production region to development region.What is the process & syntax ?

3 Answers   CTS,


What is CALL statement in COBOL?

4 Answers  


What does the INITIALIZE verb do?

1 Answers  


Categories