Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us