View previous topic :: View next topic
|
Author |
Message |
Raphael Bacay
New User
Joined: 04 May 2007 Posts: 58 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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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: 2358 Location: Israel
|
|
|
|
Or simply read the fine manuals?
O. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
ironmike
New User
Joined: 07 Aug 2005 Posts: 33
|
|
|
|
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
New User
Joined: 04 May 2007 Posts: 58 Location: Manila, Philippines
|
|
|
|
Thanks a lot! |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 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: 25 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: 25 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
Superior Member
Joined: 14 Mar 2007 Posts: 10886 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: 8796 Location: Welsh Wales
|
|
|
|
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: 11 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: 25 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: 11 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
Superior Member
Joined: 14 Mar 2007 Posts: 10886 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 |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
why not use:
Code: |
//STEP1 EXEC PGM=IKJEFT01,
// PARM='%rexxpgm-name YOURPDSNAME'
//SYSEXEC DD DSN=REXX-PDS-NAME,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//MYINDD DD DSN=Input file if any
//SYSTSIN DD DUMMY |
In the rexx pgm, you can receive the pds name as an argument and later on continue with your logic (LISTDS with MEMBERS parameter).
eg: ibmmainframes.com/post-51855.html
Thanks,
Ajay |
|
Back to top |
|
|
nirenchan
New User
Joined: 21 Jul 2005 Posts: 23 Location: USA
|
|
|
|
HI,
I want to invoke one TSO Command using REXX.
we use one command called DSNSRCH for searching strings in particualar dsn. I want to use the same in JCL
like through JCL I 've to pass the search string so that it will pass the strings to Rexx program and the Rexx program can invoke the DSNSRCH and this will give the output to my Output Dataset.
can any one help me ?
Regards,
Niren. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
quoting Ajay:
Quote: |
why not use:
Code: |
//STEP1 EXEC PGM=IKJEFT01,
// PARM='%rexxpgm-name YOURPDSNAME'
//SYSEXEC DD DSN=REXX-PDS-NAME,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//MYINDD DD DSN=Input file if any
//SYSTSIN DD DUMMY |
In the rexx pgm, you can receive the pds name as an argument and later on continue with your logic (LISTDS with MEMBERS parameter).
|
The code is slightly modified to show that you can pass multiple parameters
Code: |
//STEP1 EXEC PGM=IKJEFT01,
// PARM='%rexxpgm-name parameter1 parm2' |
be sure to follow the rest of Ajay's example.
The example shows %rexxpgm-name, but I believe it can be any TSO command. You could probably call your DSNSRCH command directly. Use the same parameters that you would use if called from TSO. |
|
Back to top |
|
|
Wondertree
New User
Joined: 26 Jun 2014 Posts: 1 Location: Chur - Switzerland
|
|
|
|
The solutions from here didn't work by my programm. So I have here a example that works perfectly:
Code: |
//*User" JOB *Jobstatment*
//ISPF EXEC PGM=IKJEFT01,REGION=2048K,DYNAMNBR=25
//SYSPROC DD DSN=*CLIST-lib*,DISP=SHR
//SYSEXEC DD DSN=*EXEC-lib*,DISP=SHR
//ISPPLIB DD DSN=ISP.SISPPENU,DISP=SHR
//ISPSLIB DD DSN=ISP.SISPSENU,DISP=SHR
//ISPMLIB DD DSN=ISP.SISPMENU,DISP=SHR
//ISPTLIB DD DDNAME=ISPTABL
// DD DSN=ISP.SISPTENU,DISP=SHR
//ISPTABL DD LIKE=ISP.SISPTENU,UNIT=VIO
//ISPPROF DD LIKE=ISP.SISPTENU,UNIT=VIO
//ISPLOG DD SYSOUT=*,RECFM=VA,LRECL=125
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSHELP DD DSN=SYS1.HELP,DISP=SHR
//SYSTSIN DD *
ISPSTART CMD(*Commandname parm1*)
/*
//
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
The solutions from here didn't work by my programm. So I have here a example that works perfectly(*) |
the solutions from here worked according to the topic discussed
the person asking thanked for the answers
nowhere was implied/requested that the REXX script would invoke ISPF services.
if You hads searched better You would have found gazillions of examples on how to run scripts using ISPF services
also no reason to resurrect a 6 years old topic
(*) perfectly for Your environment and needs naturally |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
also no reason to resurrect a 6 years old topic |
Is there anyway to lock a topic after a certain perion of time (say 1 year)?
This would remove the possibility of the above happening. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1314 Location: Vilnius, Lithuania
|
|
|
|
daveporcelan wrote: |
Quote: |
also no reason to resurrect a 6 years old topic |
Is there anyway to lock a topic after a certain perion of time (say 1 year)?
This would remove the possibility of the above happening. |
Don't know if there is an option to do it automatically, but on the FanDeZhi site I manually lock threads after just one month. |
|
Back to top |
|
|
|