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
 

 

Passing PARMS to REXX through JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Passing PARMS to REXX through JCL
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

Moderator Team Head


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

PostPosted: Mon Oct 09, 2006 11:52 am    Post subject: Re: Passing PARMS to REXX through JCL
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    Post subject: Re: Passing PARMS to REXX through JCL
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

Moderator Team Head


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

PostPosted: Mon Oct 09, 2006 12:10 pm    Post subject: Re: Passing PARMS to REXX through JCL
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    Post subject: Re: Passing PARMS to REXX through JCL
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Jcl pram vs proc parms ashek15 JCL & VSAM 3 Thu Mar 30, 2017 6:50 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


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