I have written a rexx utility which executes a job. The job uses a input file. I want put a check in my rexx utility to see if the input file is catalogued before submitting the job.
I used the following code snippet for the same purpose
IF (SYSDSN("'" || INPFILE || "'") /= 'OK') THEN
DISP1 = 'INPT FILE SPECIFIED IS NOT CATLG'
The problem with the above code is it returns the error message when the input file is in tape. I want the message to be displayed only when the file is not catalogued.
If some one has worked out on a similar problem could you please help me out.