Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Pass value in SYSIN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Pass value in SYSIN
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 02, 2010 4:33 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 02, 2010 4:39 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 02, 2010 5:49 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Jul 02, 2010 6:14 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Need to know what sysin for DFHTU690 ... pkmurali CICS 3 Mon Jul 25, 2016 1:36 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us