unfortunately the code posted is severely flawed
IX is an index ( integer number )
ISFLINE.0 is an integer telling how many ISFLINEs are there
so why compare a <data line> with a number
anyway after the end of the loop IX will contain ISFLINE.0 + 1
and it should raise the NOVALUE condition ... ... ...
the count of the END statements dies not match the number of the DO statements ... ... ...
why use a recursive CALL ... ... ...
wiser to rethink the whole logic
after the SDSF read
will write all the ISFLOG lines without the need for any loop
see here why using the * for the EXECIO write is a BAD PRACTICE
and frankly there are too many errors
describe and understand the logic before staring the coding