IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can include a JCL statement in a REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
guidoleung

New User


Joined: 12 Sep 2006
Posts: 2

PostPosted: Sat Sep 23, 2006 7:21 am
Reply with quote

Hi,

In CLIST, we can submit a JCL statement as shown:
SUBMIT * END($$)
//&SYSUID1 JOB &ACCT,&SYSUID,CLASS=&CLASS,NOTIFY=&SYSUID
/&SLSHASK THIS STEP COPIES THE INPUT DATASET TO SYSOUT=A
//COPY EXEC PGM=COPYDS
//SYSUT1 DD DSN=&SYSUID.&DSN,DISP=SHR;
//SYSUT2 DD SYSOUT=A
$$

Can I do this in REXX too!!

Thanks.
Guido
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Sat Sep 23, 2006 12:36 pm
Reply with quote

Yes, pretty much the same way:

Code:

QUEUE "//&SYSUID1 JOB&ACCT,&SYSUID,CLASS=&CLASS,NOTIFY=&SYSUID"
QUEUE "/&SLSHASK THIS STEP COPIES THE INPUT DATASET TO SYSOUT=A"
QUEUE "//COPY EXEC PGM=COPYDS"
QUEUE "//SYSUT1 DD DSN=&SYSUID.&DSN,DISP=SHR"
QUEUE "//SYSUT2 DD SYSOUT=A"
QUEUE "$$"
"SUBMIT * END($$)"
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sat Sep 23, 2006 1:21 pm
Reply with quote

? I don't think -no test here - that will resolve //&SYSUID1, /&SLSHASK, &CLASS, and also $$ is not part of the JCL to be submitted.
Back to top
View user's profile Send private message
kamran

New User


Joined: 01 May 2005
Posts: 55

PostPosted: Sat Sep 23, 2006 2:50 pm
Reply with quote

Hi,
you must change &sysuid1 to something like userid() ,&class= eg. to class which was previously assigned to a valid class in the system and so on.there is no & usage in rexx as like clist except for ispf services!.
anyhow this topic was previously discussed in other topic and you can find them through a simple search!


Kevin wrote:
Yes, pretty much the same way:

Code:

QUEUE "//&SYSUID1 JOB&ACCT,&SYSUID,CLASS=&CLASS,NOTIFY=&SYSUID"
QUEUE "/&SLSHASK THIS STEP COPIES THE INPUT DATASET TO SYSOUT=A"
QUEUE "//COPY EXEC PGM=COPYDS"
QUEUE "//SYSUT1 DD DSN=&SYSUID.&DSN,DISP=SHR"
QUEUE "//SYSUT2 DD SYSOUT=A"
QUEUE "$$"
"SUBMIT * END($$)"
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Sat Sep 23, 2006 9:29 pm
Reply with quote

Everyone's right. I missed all those & variables in the JCL code. Yes, they would have to be coded differently as REXX variables.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sat Sep 23, 2006 10:45 pm
Reply with quote

After remark, now the solution : a similar way is to use a skeleton in which symbolic variables can be resolved and via -by memory -

Code:
Address ispexec
"FTOPEN temp"
"Ftincl skelmem"
"Ftclose"
"Vget (ztempf)"
Address TSO "submit '"Ztempf"'"

That's all.

Regards
Pierre
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top