|
|
| Author |
Message |
Raphael Bacay
Active User
Joined: 04 May 2007 Posts: 60 Location: Manila, Philippines
|
|
|
|
Hello,
I am new to REXX and I don't know how to execute it.
Can someone provide me with a JCL to execute a REXX program?
Thanks. |
|
| Back to top |
|
 |
References
|
Posted: Mon Aug 06, 2007 4:27 pm Post subject: Re: JCL To Execute A REXX Program |
 |
|
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1520 Location: germany
|
|
|
|
| did you even try to search or look at the sticky(s) in the appropriate forum? |
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1898 Location: Israel
|
|
|
|
Or simply read the fine manuals?
O. |
|
| Back to top |
|
 |
Moved: Mon Aug 06, 2007 6:55 pm by superk From JCL to CLIST & REXX |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3172 Location: Charlotte,NC USA
|
|
| Back to top |
|
 |
ironmike
New User
Joined: 07 Aug 2005 Posts: 37
|
|
|
|
Here ya go:
| Code: |
//* INVOKE REXX IN BATCH...
//JS10 EXEC PGM=IRXJCL,REGION=0K,PARM='xxxxxxxx'
//SYSEXEC DD DSN=xxxxx.CLIST,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY,BLKSIZE=80
//
|
Parm field contains name of REXX exec to invoke, and SYSEXEC DD points to PDS containing REXX exec to invoke. You will have to specify these two and add a JOB statement. |
|
| Back to top |
|
 |
Raphael Bacay
Active User
Joined: 04 May 2007 Posts: 60 Location: Manila, Philippines
|
|
|
|
| Thanks a lot! |
|
| Back to top |
|
 |
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 124 Location: Bangalore
|
|
|
|
| Code: |
//STEP1 EXEC PGM=IKJEFT01,PARM='%rexxpgm-name arguments'
//SYSEXEC DD DSN=REXX-PDS-NAME,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//MYINDD DD DSN=Input file if any
//SYSTSIN DD DUMMY
|
|
|
| Back to top |
|
 |
Anurag Singh
New User
Joined: 20 Jan 2008 Posts: 21 Location: India
|
|
|
|
Hi,
Kindly guide me regarding my doubt ,
I have to invoke a rexx pgm by a job, for that i can use any of the provisions posted in this post,
however at every time executing the JCl job to invoke the rexx pgm, i have to pass different dataset name which is used in the REXX pgm ,
(The Passed dataset (PDS) is used by the rexx pgm to make changes in the members of the PDS). |
|
| Back to top |
|
 |
Anurag Singh
New User
Joined: 20 Jan 2008 Posts: 21 Location: India
|
|
|
|
Hi,
Sorry the previous post was left incomplete , kindly refer this for full scenario,
Kindly guide me regarding my doubt ,
I have to invoke a rexx pgm by a job, for that i can use any of the provisions posted in this post,
however at every time executing the JCl job to invoke the rexx pgm, i have to pass different dataset name which is used in the REXX pgm ,
(The Passed dataset (PDS) is used by the rexx pgm to make changes in the members of the PDS).
Now how can i pass the DSN name from JOB , and what necessary changes should be done in the REXX pgm to accept the passed DSN name from JCL JOb?? |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2661 Location: italy
|
|
|
|
no need to pass the dsname to the rexx script
when running in batch why complicate things
let the jcl allocate the dataset and refer to it by ddname...
interactive snippet ...
Address TSO ALLOC DA(...dsname...) FI(...ddname...)
Address TSO EXECIO * READ ...ddname...
batch snippet
jcl section
//...ddname... DD ...
REXX section
Address TSO EXECIO * READ ...ddname...
less work to be done in rexx, no need to allocate and check the result |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3225 Location: Brussels once more ...
|
|
|
|
| ironmike wrote: |
Here ya go:
| Code: |
//* INVOKE REXX IN BATCH...
//JS10 EXEC PGM=IRXJCL,REGION=0K,PARM='xxxxxxxx'
//SYSEXEC DD DSN=xxxxx.CLIST,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY,BLKSIZE=80
//
|
Parm field contains name of REXX exec to invoke, and SYSEXEC DD points to PDS containing REXX exec to invoke. You will have to specify these two and add a JOB statement. |
IRXJCL does not permit the full functionality of IKJEFT01, so if your REXX uses TSO commands such as ALLOCATE etc. etc. they will fail. |
|
| Back to top |
|
 |
XOpen
New User
Joined: 19 Mar 2008 Posts: 24 Location: Russia
|
|
|
|
If it was working REXX, why not to pass DSN same way, as a parameter? I agree DD is better, but for new programs.
I also recomend create a PROC and pass your DSN as a parameter to PROC.(It doesn't matter you will use DD or parm) And it will allow you run it from console via /S command. (so you can ask operators do it, or schedule it) |
|
| Back to top |
|
 |
Anurag Singh
New User
Joined: 20 Jan 2008 Posts: 21 Location: India
|
|
|
|
MY constraint is , i can not allocate the dataset by JCL, bcoz its already getting allocated through some other application.
In explored way ,
the datset which i want to pass to the REXX pgm is already allocated PDS with 25 members, i can not do any changes in that dataset,
So for this i am just copying the full pds with Utility and then my rexx pgm is there to insert some set of lines in each members of pDS,
Now every time of execution ,this dataset name will be different as it is coming from some other application.
Here every time before executing the Rexx Invoking JCL , manually i have to change the Dataset name in REXX pgm,
So in my JOb first step is for copying the Original pDS to other PDS.
step 2 is for invoking the REXX pgm ,
here only i want to Pass the Duplicate PDS which is generated thru step 1 to the REXX pgm , because the logic in REXX is started with the PDS name ,(Logic:open the PDS member and then insert a tag in every member.)
Kindly Suggest me the Way to resolve this prob?? |
|
| Back to top |
|
 |
XOpen
New User
Joined: 19 Mar 2008 Posts: 24 Location: Russia
|
|
|
|
I would design it with GDG dataset. So you can use in step 1 last in GDG(0), create(+1) and use(+1) in step2.
But if you can't follow GDG name convention, you can pass DD. Write in step 2 something like
//IN2REXX DD DISP=SHR,DSN=*.STEP01.OUT
So in step 1 you will change DSN in DD every time(because only you know new name), but you don't have to in step 2. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2661 Location: italy
|
|
|
|
| Quote: |
| MY constraint is , i can not allocate the dataset by JCL, bcoz its already getting allocated through some other application. |
if that were true it would be impossible also to allocate thru "TSO ALLOC" |
|
| Back to top |
|
 |
|
|