MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to pass parameters from JCL to REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
dohellwithmf
Beginner


Joined: 12 Jul 2007
Posts: 55
Topics: 23

PostPosted: Mon Oct 05, 2009 2:18 pm    Post subject: how to pass parameters from JCL to REXX Reply with quote

Hi All,
i have to pass parameters from JCL to REXX program. I want to pass value thru JCl which will pe PULLed by REXX.

I am using following step:
Code:

//STEP1 EXEC PGM=IKJEFT01                       
//SYSPROC DD DSN=D172445.REXX.TEST(TEST),DISP=SHR
//SYSTSPRT DD SYSOUT=*                           
//SYSTSIN DD *                                   
 MAYANK                                         
/*                                               

I also tried:
Code:

//STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=999,PARM='IRIQ'
//SYSEXEC DD DSN=D172445.REXX.TEST(TEST),DISP=SHR
//SYSTSPRT DD SYSOUT=*                           
//SYSTSIN DD DUMMY                               

but none of these is working. Can anyone tell me the correct syntax.


TIA, Mayank
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Mon Oct 05, 2009 2:30 pm    Post subject: Reply with quote

If you want to PULL the parameter(s), then your first option is the better choice. However, it's not coded correctly, since nowhere do you tell TSO what your REXX exec name is that you want to execute.

It should look more like this:

Code:

//STEP1 EXEC PGM=IKJEFT01                       
//SYSTSPRT DD SYSOUT=*                           
//SYSTSIN DD *   
EX 'D172445.REXX.TEST(TEST)'                                 
MAYANK                                         
/*


or as an alternative:

Code:

//STEP1 EXEC PGM=IKJEFT01,PARM='TEST'
//SYSPROC DD DISP=SHR,DSN=D172445.REXX.TEST
//SYSTSPRT DD SYSOUT=*                           
//SYSTSIN DD *                               
MAYANK                                         
/*
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Oct 05, 2009 2:33 pm    Post subject: Reply with quote

rexx exec named test

Code:

/* REXX */                               
PULL ARG                                 
SAY 'THE PARM PASSED TO ME IS : ' ARG(1) 


JCL to run and 'mayank' is the string we are passing

Code:

//STEP0100 EXEC PGM=IKJEFT01,PARM='%TEST MAYANK' 
//SYSTSPRT DD SYSOUT=*                           
//SYSPRINT DD SYSOUT=*                           
//SYSTSIN  DD DUMMY                               
//SYSEXEC  DD DSN=D172445.REXX.TEST,DISP=SHR       
//*                                               


Check the SYSTSPRT after the execuetion of the job

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dohellwithmf
Beginner


Joined: 12 Jul 2007
Posts: 55
Topics: 23

PostPosted: Sat Oct 10, 2009 9:58 pm    Post subject: Reply with quote

thank u all for the inputs....its working fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group