Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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: 4650
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us