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
 
How can include a JCL statement in a REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How can include a JCL statement in a REXX
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    Post subject: Re: How can include a JCL statement in a REXX
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: 456
Location: Belgium

PostPosted: Sat Sep 23, 2006 1:21 pm    Post subject:
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    Post subject: Re: How can include a JCL statement in a REXX
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    Post subject: Re: How can include a JCL statement in a REXX
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: 456
Location: Belgium

PostPosted: Sat Sep 23, 2006 10:45 pm    Post subject:
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    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
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm

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