Test the *DEL0n reserved word.
If *DEL0n = 0 there are no records in the subfile.
If *DEL0n > 0 there are records in the subfile.
Example
IF *DEL01 = 0
* the subfile is empty
END
Test the *DEL0n reserved word.
If *DEL0n = 0 there are no records in the subfile.
If *DEL0n > 0 there are records in the subfile.
IF *DEL01 = 0
* the subfile is empty
END