IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to Check if a dataset is catalogued using Rexx?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SathyaS

New User


Joined: 20 Sep 2005
Posts: 11

PostPosted: Fri Jan 05, 2007 12:10 pm
Reply with quote

Hi,
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
DO
DISP1 = 'INPT FILE SPECIFIED IS NOT CATLG'
END

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.

Thanks.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Jan 05, 2007 1:01 pm
Reply with quote

How about LISTDSI?

In addition, you can use ISPF services like LMDLIST etc.

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top