rexx program calling a jcl

IBM's Command List programming language & Restructured Extended Executor
mbisa
Posts: 7
Joined: Thu Nov 15, 2007 11:57 am
Skillset: cobol
Referer: through internet

rexx program calling a jcl

Postby mbisa » Mon Nov 19, 2007 7:41 am

hi ,
i would like to ask can i call or execute a jcl program in my rexx program.. i have a job named "passer" that i want to call in my rexx program. "passer" is a jcl program.
thanks you.

User avatar
MrSpock
Global moderator
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Skillset: REXX, JCL, DFSORT, Syncsort, Axway MFT, Connect:Direct, FTP, SFTP
Referer: ibmmainframes.com
Location: Raleigh NC USA
Contact:

Re: rexx program calling a jcl

Postby MrSpock » Mon Nov 19, 2007 10:52 am

Does this REXX program have access to TSO commands? Can it use the TSO SUBMIT Command.

mbisa
Posts: 7
Joined: Thu Nov 15, 2007 11:57 am
Skillset: cobol
Referer: through internet

Re: rexx program calling a jcl

Postby mbisa » Tue Nov 20, 2007 10:33 am

Mr.spock
yes, tso command is accepted.

Halka
Posts: 7
Joined: Thu Dec 06, 2007 8:54 am
Skillset: cobol,jcl,db2,vsam,rexx
Referer: through forum

Re: rexx program calling a jcl

Postby Halka » Wed Dec 12, 2007 7:02 am

i think this would help you........

ADDRESS TSO
X = OUTTRAP("VAR.")
"SUBMIT 'ur dataset name(passes)'"
TSOMSG = VAR.1 /* FIND THE JOB SUBMITTED MSG */
JBID = SUBSTR(TSOMSG,17,5) /*IDENTIFY THE JOB ID */
JNO = 'J0' || JBID
JBNM = SUBSTR(TSOMSG,5,8) /*IDENTIFY THE JOB NAME*/

/* WAIT UNTIL THE SEARCH JOB HAS RUN THROUGH. */
I = 1
DO FOREVER
"STATUS " || JBNM ||"(" || JNO || ")"
FINALMSG = VAR.I
IF SUBWORD(FINALMSG,4,2) = "OUTPUT QUEUE" THEN
LEAVE
I = I + 1
END
Y = OUTTRAP("OFF")

X = 1