REXX code to execute a JCL
Moderators: Veera, Moderator Group
-
- Member
- Posts: 3
- Joined: Thu Apr 05, 2012 2:28 pm
- Location: Bengaluru
REXX code to execute a JCL
Hi All,
I am very new to REXX coding, and i need your help in running a JCL
The requirement is to accept input from user, store it in stem variable, pass each value to a search loop, where i have used queuing mechanism to run the JCL. I found the queuing mechanism by googling
I have done the following REXX code, but it giving major problems.
Please help me out.
/*REXX*/
SAY "HELLO" USERID()
SAY "ENTER THE CHARACTER TO BE SEARCHED IN IDD"
SAY "ENTER 'X' TO INDICATE END OF LIST"
I = 0 /*INDEX FOR SEARCH STEM*/
STAR_STRING = '*'
DO UNTIL SEARCH_STRING='X'
PULL SEARCH_STRING
IF SEARCH_STRING='X'
THEN
DO
SAY "END OF INPUT BY USER"
SAY "BYE" USERID()
END
ELSE
DO
I = I + 1
SEARCH_STRING.I = SPACE(SUBSTR(SEARCH_STRING,1,20) STAR_STRING,0)
SAY "SEARCHING FOR" SEARCH_STRING.I
CALL SEARCHING
END
END
EXIT
SEARCHING: PROCEDURE
SAY ARG(1)
QUEUE'//SEARCH JOB (U212,UV00),'
QUEUE"// 'UID',"
QUEUE'// NOTIFY=&SYSUID,'
QUEUE'// CLASS=J,'
QUEUE'// MSGLEVEL=(1,1),'
QUEUE'// MSGCLASS=T'
QUEUE'//*--------------------------------------------------------------'
QUEUE'//S010 EXEC PGM=PROG,REGION=4M'
QUEUE'//*--------------------------------------------------------------'
QUEUE'//SYSOUT DD SYSOUT=*'
QUEUE'//SYSLST DD SYSOUT=*'
QUEUE'//SYSABOUT DD SYSOUT=*'
QUEUE'//SYSDUMP DD DUMMY'
QUEUE'//SYSIN DD *'
QUEUE'ARG(1)'
QUEUE'/*'
QUEUE'//'
"SUBMIT *"
I am very new to REXX coding, and i need your help in running a JCL
The requirement is to accept input from user, store it in stem variable, pass each value to a search loop, where i have used queuing mechanism to run the JCL. I found the queuing mechanism by googling
I have done the following REXX code, but it giving major problems.
Please help me out.
/*REXX*/
SAY "HELLO" USERID()
SAY "ENTER THE CHARACTER TO BE SEARCHED IN IDD"
SAY "ENTER 'X' TO INDICATE END OF LIST"
I = 0 /*INDEX FOR SEARCH STEM*/
STAR_STRING = '*'
DO UNTIL SEARCH_STRING='X'
PULL SEARCH_STRING
IF SEARCH_STRING='X'
THEN
DO
SAY "END OF INPUT BY USER"
SAY "BYE" USERID()
END
ELSE
DO
I = I + 1
SEARCH_STRING.I = SPACE(SUBSTR(SEARCH_STRING,1,20) STAR_STRING,0)
SAY "SEARCHING FOR" SEARCH_STRING.I
CALL SEARCHING
END
END
EXIT
SEARCHING: PROCEDURE
SAY ARG(1)
QUEUE'//SEARCH JOB (U212,UV00),'
QUEUE"// 'UID',"
QUEUE'// NOTIFY=&SYSUID,'
QUEUE'// CLASS=J,'
QUEUE'// MSGLEVEL=(1,1),'
QUEUE'// MSGCLASS=T'
QUEUE'//*--------------------------------------------------------------'
QUEUE'//S010 EXEC PGM=PROG,REGION=4M'
QUEUE'//*--------------------------------------------------------------'
QUEUE'//SYSOUT DD SYSOUT=*'
QUEUE'//SYSLST DD SYSOUT=*'
QUEUE'//SYSABOUT DD SYSOUT=*'
QUEUE'//SYSDUMP DD DUMMY'
QUEUE'//SYSIN DD *'
QUEUE'ARG(1)'
QUEUE'/*'
QUEUE'//'
"SUBMIT *"
Puneeth
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
learn to use TRACE with your REXX scripts (found in manual, links at top of page)
what error are you encountering?
look at EXPOSE in the manual, it may help you.
in your procedure you are looking for an argument,
but your CALL syntax did not provide an argument.
do not say it does not work, provide the exact error codes that you encountered.
and learn to use TRACE.
what error are you encountering?
look at EXPOSE in the manual, it may help you.
in your procedure you are looking for an argument,
but your CALL syntax did not provide an argument.
do not say it does not work, provide the exact error codes that you encountered.
and learn to use TRACE.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
-
- Member
- Posts: 3
- Joined: Thu Apr 05, 2012 2:28 pm
- Location: Bengaluru
Hi Dick,
I am not facing any errors while running the jcl. When I tso exec the rexx code, the displays are shown and job is submitted. But, the I am facing problem in the following.
QUEUE'//SYSIN DD *'
QUEUE'ARG(1)'
QUEUE'/*'
When i go into the spool and use 'SJ' it shows,
//SYSIN DD*.
That's the only thing i got
Frankly speaking, I started working mainframes since 2010. My first job. Since then I have done only testing. This is my first hands-on as a programmer. Any help to solve the above issue is greatly appreciated
I am not facing any errors while running the jcl. When I tso exec the rexx code, the displays are shown and job is submitted. But, the I am facing problem in the following.
QUEUE'//SYSIN DD *'
QUEUE'ARG(1)'
QUEUE'/*'
When i go into the spool and use 'SJ' it shows,
//SYSIN DD*.
That's the only thing i got
Frankly speaking, I started working mainframes since 2010. My first job. Since then I have done only testing. This is my first hands-on as a programmer. Any help to solve the above issue is greatly appreciated
Puneeth
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
-
- Member
- Posts: 3
- Joined: Thu Apr 05, 2012 2:28 pm
- Location: Bengaluru
Hi All,
Thank you for the responses!
I was out of town for a few days.
Here is the actual JCL.
//SEARCH JOB (U212,UV00),
// UID,
// NOTIFY=&SYSUID,
// CLASS=J,
// MSGLEVEL=(1,1),
// MSGCLASS=T
//*--------------------------------------------------------------
//S010 EXEC PGM=PROG,REGION=4M
//*--------------------------------------------------------------
//STEPLIB DD DSN=MY.LOAD,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSLST DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDUMP DD DUMMY
//SYSIN DD *
EMPLOYEE
/*
Could any of you here help in converting this to a REXX code, like the one I have tried ?
Thank you for the responses!
I was out of town for a few days.
Here is the actual JCL.
//SEARCH JOB (U212,UV00),
// UID,
// NOTIFY=&SYSUID,
// CLASS=J,
// MSGLEVEL=(1,1),
// MSGCLASS=T
//*--------------------------------------------------------------
//S010 EXEC PGM=PROG,REGION=4M
//*--------------------------------------------------------------
//STEPLIB DD DSN=MY.LOAD,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSLST DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDUMP DD DUMMY
//SYSIN DD *
EMPLOYEE
/*
Could any of you here help in converting this to a REXX code, like the one I have tried ?
Puneeth
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page