ramachandra


{ City }
< Country > india
* Profession *
User No # 46081
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 10
Users Marked my Answers as Wrong # 2
Questions / { ramachandra }
Questions Answers Category Views Company eMail




Answers / { ramachandra }

Question { TCS, 5511 }

where will u code file status ?


Answer

we will code file status in file-control of environment
division.
file-control.
SELECT infile ASSIGN TO ws-dd-name
FILE STATUS IS ws-fs-code.

and ws-fs-code has to coded in working-storage section.
if i'm wrong plz let me know...

Is This Answer Correct ?    10 Yes 1 No

Question { EDS, 8009 }

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


Answer

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