In a sequential access mode I use this code to determine whether a file is empty :
READ ITEM-FILE INTO IFILE-WS
AT END MOVE 1 TO EOF-SW.
IF EOF-SW = 0 * IT MEANS THAT IT IS NOT EMPTY
PERFORM .........
ELSE
DISPLAY 'FILE IS EMPTY'
END-IF.
STOP RUN.
How will I determine if a file is empty in a random access mode?
READ ITEM-FILE INTO IFILE-WS
AT END MOVE 1 TO EOF-SW.
IF EOF-SW = 0 * IT MEANS THAT IT IS NOT EMPTY
PERFORM .........
ELSE
DISPLAY 'FILE IS EMPTY'
END-IF.
STOP RUN.
How will I determine if a file is empty in a random access mode?