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

Passing PARMS to REXX through JCL


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

New User


Joined: 09 Oct 2006
Posts: 19
Location: Toronto

PostPosted: Mon Oct 09, 2006 11:44 am
Reply with quote

Hi,

I have a REXX EXEC, which expects three inputs when invoked, based on which it creates an output.

Now, running this in the foreground works fine. But can you advice on how can I run my EXEC in batch.

I ran the following JCL but it did not take care of the parameters passed:

Code:

//PN4704AA JOB (@),REXX-TEST,CLASS=0,MSGCLASS=R,             
//        NOTIFY=&SYSUID                                     
//RUNEXEC  EXEC PGM=IKJEFT01,                                 
//        PARM='%EXEC#1 Y WXX262.SID.JCLLIB DB2'             
//SYSEXEC  DD DISP=SHR,DSN=WXX262.SID.EXEC                   
//SYSTSPRT DD SYSOUT=*                                       
//SYSTSIN  DD DUMMY             
//*                                                           


Note: EXEC#1 is my REXX EXEC and parameters are: Parm1 = Y, Parm2 = MYPDS.SID.JCLLIB and Parm3 = DB2
in this order.

Also, I tried the following, but this did not take care of the parameters either:
Code:

//PN4704AA JOB (@),REXX-TEST,CLASS=0,MSGCLASS=R,             
//        NOTIFY=&SYSUID                                     
//RUNEXEC  EXEC PGM=IKJEFT01                                 
//SYSEXEC  DD DISP=SHR,DSN=WXX262.SID.EXEC                   
//SYSTSPRT DD SYSOUT=*                                       
//SYSTSIN  DD *             
  %EXEC#1 Y MYPDS.SID.JCLLIB DB2
/*                                                           

Could someone please assist me to write a JCL which can explicitly allow me to pass the parameters to REXX program?

Thanks,
Sid.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Oct 09, 2006 11:52 am
Reply with quote

Both formats should work as shown. The problem must lie within the REXX code.
Back to top
View user's profile Send private message
siddheart22

New User


Joined: 09 Oct 2006
Posts: 19
Location: Toronto

PostPosted: Mon Oct 09, 2006 12:00 pm
Reply with quote

Thanks Superk for your quick response.

I agree that there could be problem with my REXX code, but in that case shouldn't that problem show up while trying to run it in foreground mode?

Anyways, I think I should elaborate on my code section where it expects the inputs:
There are THREE PULL statements coded in the program.
These statements accept inputs entered by the user in foreground mode. How do I provide these inputs in BATCH?

Sid.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Oct 09, 2006 12:10 pm
Reply with quote

The same way. In the foreground, the data is being pulled from the console. In batch, the console is defined with the SYSTSIN DD. So, move them there:

Code:

//RUNEXEC  EXEC PGM=IKJEFT01,                                 
//        PARM='%EXEC#1'
//SYSEXEC  DD DISP=SHR,DSN=WXX262.SID.EXEC                   
//SYSTSPRT DD SYSOUT=*                                       
//SYSTSIN  DD *
Y
WXX262.SID.JCLLIB
DB2
/*
Back to top
View user's profile Send private message
siddheart22

New User


Joined: 09 Oct 2006
Posts: 19
Location: Toronto

PostPosted: Mon Oct 09, 2006 1:36 pm
Reply with quote

Thanks Superk, your suggestion worked!!!

Sid.
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