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: 4649
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: 4649
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
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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