View previous topic :: View next topic
|
Author |
Message |
siddheart22
New User
Joined: 09 Oct 2006 Posts: 19 Location: Toronto
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Both formats should work as shown. The problem must lie within the REXX code. |
|
Back to top |
|
|
siddheart22
New User
Joined: 09 Oct 2006 Posts: 19 Location: Toronto
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
siddheart22
New User
Joined: 09 Oct 2006 Posts: 19 Location: Toronto
|
|
|
|
Thanks Superk, your suggestion worked!!!
Sid. |
|
Back to top |
|
|
|