How to code fscode 10 in cobol program? Where yoy code in your
pgm?give ans for the question.
Answers were Sorted based on User's Feedback
Answer / adarsh
File status 10 specifies that there are no records to read
in a file.
We can use anywhere in the program after opening the file
and before closing the file.
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / manikandesvaran
After sucessfull read just check the file status code
associated.
For ex.
PERFORM UNTIL WS-FILE-REC-EOF
READ INP-DATA INTO WS-FLE-INP-REC
AT END
SET WS-FILE-REC-EOF TO TRUE
END-READ
IF WS-INP-FLE-STATUS = ZEROS OR 10
CONTINUE
ELSE
DISPLAY '------------ERROR-----------------------'
END-IF.
Hope this will help .
Is This Answer Correct ? | 8 Yes | 1 No |
What is the utilization of copybook in cobol?
What is SDSF?
How to display string in the reverse order using occurs clause?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What is the difference between goback, stop run and exit program in cobol?
Define static linking and dynamic linking.
In a file if a column account number conatain value 0001234.. how can we move the value to another variable without zero. value may contain any type such as 00123405. we need the value 1234 or 12305. how can we do that in cobol. Please help.
I have a COBOL main program which is calling sub program, the number of calling parameters used in main program are 4 whereas in sub program it's 5. Sub program is passing 5 parameters back to main program Will there be any compilation error? Or main program parameters displays junk values?
Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be
is this below syntax correct? CALL 'subprg' using A,B Please help
I have a PS file and I would like to manually insert the binary values (like a COMP format) into the file. How can i do that? the way do in COMP-3 format.. suppose i want to insert -12345 in to file in comp-3 format. simply we can open a file in edit mode and do HEX-ON and insert the value . SEE BELOW-- 135 24D in 3 bytes - this will be COMP-3 presenatation of -12345.
how can we code index in an array of cobol pgm?