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

Pass value in SYSIN


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Fri Jul 02, 2010 4:23 pm
Reply with quote

My requirement is to check the existance of dataset which includes the symbolic parameter in the name of the DSN., as

QWERTY.MMMMM.MYFILE.RS&GL0067
in the above 'GL0067' is cycle date, which i am passing through JCL

//SET GL0067=100701
//STEP01 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRY (QWERTY.MMMMM.MYFILE.RS&GL0067)
/*

can you please tell me how to pass value to sympolic parameter in sysin
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 02, 2010 4:33 pm
Reply with quote

You can't do it as such.
You can use a REXX exec to invoke the IDCAMS after symbolic substitution.
Might have a copy of the code, if I do, I'll post it.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 02, 2010 4:39 pm
Reply with quote

The JCL
Code:
//STEP0020 EXEC PGM=IKJEFT01,PARM='DSNCHECK &SYSUID..REXX'
//SYSEXEC  DD DSN=Your_REXX_Library,DISP=SHR                         
//SYSOUT   DD SYSOUT=*                                     
//SYSTSPRT DD SYSOUT=*                                     
//SYSTSIN  DD DUMMY


The REXX - In member DSNCHECK in Your_REXX_Library
Code:
/* REXX *** TAKE DATASET NAME FROM PARM AND CHECK IF IT EXISTS       */                                                                       
ARG DSNAME .                                                           
" LISTCAT ENT('"STRIP(DSNAME)"')"                                     
EXIT RC     

Gives RC=0 if the dataset exists, RC=4 if not.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 02, 2010 5:49 pm
Reply with quote

Hey, I've even upgraded it to check if the file is empty or not.
Now this question will never ever be asked again on the forum,
because everyone uses the search button ........................... right icon_eek.gif

RC=0 if exists and populated, RC=4 if exists and empty, RC=8 if does not exist.
Code:
/* REXX *** TAKE DATASET NAME FROM PARM AND CHECK IF IT EXISTS         
            AND IF IT EXISTS IS IT POPULATED                         */
ARG DSNAME .                                                           
" LISTCAT ENT('"STRIP(DSNAME)"')"                                       
IF RC <> 0                                                             
  THEN EXIT (8)                                                         
  ELSE " PRINT IDS('"STRIP(DSNAME)"') COUNT(1)"                         
IF RC = 0                                                               
  THEN EXIT                                                             
  ELSE EXIT (4)
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jul 02, 2010 6:14 pm
Reply with quote

expat wrote:
Now this question will never ever be asked again on the forum, because everyone uses the search button ........................... right icon_eek.gif
oh almighty, only if expat were true! icon_biggrin.gif
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
No new posts EIBCALEN 0 even if we pass LEN and FR... CICS 4
Search our Forums:

Back to Top