View previous topic :: View next topic
|
Author |
Message |
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
Hello all,
I am trying to write a REXX tool to copy the job from spool to PDS.i.e, XDC. i have written the following code:
Code: |
/*****************************REXX************************************/
/*TRACE ?R*/
ADDRESS TSO
"ALLOC F(ISFIN) TRACKS SPACE(1) REU" /* USED BY SDSF */
"ALLOC F(ISFOUT) NEW DELETE REU " , /* USED BY SDSF */
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"
"ALLOC F(TEMPPRT) DA('NBDKYGS.REXX.JOB2') SHR"
JOBID = "JOB02743"
QUEUE "PRE NBDKYGS2" /* SDSF COMMANDS IN BATCH*/
QUEUE "ST"
QUEUE "FILTER JOBNAME " JOBID
QUEUE "++S"
QUEUE "PRINT FILE TEMPPRT" /* PRINT TO TEMP DATASET */
QUEUE "PRINT 1 999999"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE "EXIT"
"EXECIO" QUEUED()" DISKW ISFIN (FINIS" /* INPUT TO SDSF BATCH */
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++25,80')"/* INVOKE SDSF */
EXIT |
Here i am able to create a PS and XDC the job with job a perticular job ID to it. Now ...
1> What should I do to copy / XDC to PDS member not a PS?
2> I am getting the data in the file(PS) something like this:
Code: |
1 J E S 2 J O B L O G -- S Y S T E M 1 M 0 1 -- N O D
0
04.47.19 JOB02051 ---- TUESDAY, 12 AUG 2008 ---- |
Code: |
1 HQX7730 ----------------- SDSF PRIMARY OPTION MENU -------------------------
COMMAND INPUT ===> SCROLL ===> PAGE
DA Active users INIT Initiators
I Input queue PR Printers
O Output queue PUN Punches
H Held output queue RDR Readers
ST Status of jobs LINE Lines
NODE Nodes
LOG System log SO Spool offload
SR System requests SP Spool volumes
MAS Members in the MAS
JC Job classes ULOG User session log
SE Scheduling environments
RES WLM resources
ENC Enclaves
PS Processes
END Exit SDSF
Licensed Materials - Property of IBM
5694-A01 (C) Copyright IBM Corp. 1981, 2006. All rights reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
1 HQX7730 ----------------- SDSF PRIMARY OPTION MENU -------------------------
COMMAND INPUT ===> SCROLL ===> PAGE
DA Active users INIT Initiators
I Input queue PR Printers
O Output queue PUN Punches
H Held output queue RDR Readers
ST Status of jobs LINE Lines
NODE Nodes
LOG System log SO Spool offload
SR System requests SP Spool volumes
MAS Members in the MAS
JC Job classes ULOG User session log
SE Scheduling environments
RES WLM resources
ENC Enclaves
PS Processes
END Exit SDSF
1 SDSF STATUS DISPLAY ALL CLASSES LINE 0-0 (0)
COMMAND INPUT ===> SCROLL ===> PAGE
NP JOBNAME TYPE JNUM QUEUE DEST SAFF ST-TIME ST-DATE TOT-LINES
1 SDSF STATUS DISPLAY ALL CLASSES LINE 0-0 (0)
COMMAND INPUT ===> SCROLL ===> PAGE
NP JOBNAME TYPE JNUM QUEUE DEST SAFF ST-TIME ST-DATE TOT-LINES
1 SDSF STATUS DISPLAY ALL CLASSES INVALID COMMAND
COMMAND INPUT ===> ++? SCROLL ===> PAGE
NP JOBNAME TYPE JNUM QUEUE DEST SAFF ST-TIME ST-DATE TOT-LINES
1 SDSF STATUS DISPLAY ALL CLASSES NO CHARS 'MSGUSR' FOUND
COMMAND INPUT ===> SCROLL ===> PAGE
NP JOBNAME TYPE JNUM QUEUE DEST SAFF ST-TIME ST-DATE TOT-LINES
1 SDSF STATUS DISPLAY ALL CLASSES INVALID COMMAND
COMMAND INPUT ===> ++S SCROLL ===> PAGE
NP JOBNAME TYPE JNUM QUEUE DEST SAFF ST-TIME ST-DATE TOT-LINES
1 SDSF STATUS DISPLAY ALL CLASSES LOCATE ERROR 8 0000000
COMMAND INPUT ===> PRINT ODSN 'NBDKYGS.REXX.XDCDSN' * SHR SCROLL ===> PAGE
**** DATA SET NOT CATALOGED DSNAME=NBDKYGS.REXX.XDCDSN
1 SDSF STATUS DISPLAY ALL CLASSES PARM INVALID
COMMAND INPUT ===> PRINT 1 9999 SCROLL ===> PAGE
**** DATA SET NOT CATALOGED DSNAME=NBDKYGS.REXX.XDCDSN
1 SDSF STATUS DISPLAY ALL CLASSES PRINT NOT OPENED
COMMAND INPUT ===> PRINT CLOSE SCROLL ===> PAGE
**** DATA SET NOT CATALOGED DSNAME=NBDKYGS.REXX.XDCDSN
1 HQX7730 ----------------- SDSF PRIMARY OPTION MENU -------------------------
COMMAND INPUT ===> SCROLL ===> PAGE
DA Active users INIT Initiators
I Input queue PR Printers
O Output queue PUN Punches
H Held output queue RDR Readers
ST Status of jobs LINE Lines
NODE Nodes
LOG System log SO Spool offload
SR System requests SP Spool volumes
MAS Members in the MAS
JC Job classes ULOG User session log
SE Scheduling environments
RES WLM resources
ENC Enclaves
PS Processes
END Exit SDSF
1 HQX7730 ----------------- SDSF PRIMARY OPTION MENU INVALID COMMAND
COMMAND INPUT ===> EXIT SCROLL ===> PAGE
DA Active users INIT Initiators
I Input queue PR Printers
O Output queue PUN Punches
H Held output queue RDR Readers
ST Status of jobs LINE Lines
NODE Nodes
LOG System log SO Spool offload
SR System requests SP Spool volumes
MAS Members in the MAS
JC Job classes ULOG User session log
SE Scheduling environments
RES WLM resources
ENC Enclaves
PS Processes
END Exit SDSF |
and so on....
I want only the the below one in my output:
Code: |
1 J E S 2 J O B L O G -- S Y S T E M 1 M 0 1 -- N O D
0
04.47.19 JOB02051 ---- TUESDAY, 12 AUG 2008 ---- |
----- JoB LOG---------
How can i accomplish this? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
seshagiri,
Quote: |
1> What should I do to copy / XDC to PDS member not a PS? |
Allocate a PDS and not a PS. Change the following code.
Code: |
"ALLOC F(ISFOUT) NEW DELETE REU " , /* USED BY SDSF */
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)" |
to something like
Code: |
ADDRESS "TSO"
"ALLOC DSN('"yourdataset"') NEW SPACE (50 20) CYL DIR(10)" |
Quote: |
I want only the the below one in my output:
|
Once you got the data XDC'ed to your output file, you need to read that file and process it according to your reqts. |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
Thank you very much. I got it in a PDS. For the first time when i execute the REXX.. it created a new PDS and added a member to it with the output i need.
Code: |
"ALLOC F(TEMPPRT) DA('NBDKYGS.REXX.JOB2(OUT1)')
NEW SPACE (50 20) CYL DIR(10)" |
when i ran the 2nd time with different member name for the same PDS.
i.e., I used the code
Code: |
"ALLOC F(TEMPPRT) DA('NBDKYGS.REXX.JOB2(OUT2)')
NEW SPACE (50 20) CYL DIR(10)" |
I got the error something like:
File not allocated NBDKYGS.REXX.JOB2. File in use
How can i get another member to the same PDS? |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
oops! I did a mistake. I got the result.
Thank you! |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
If i invoke this REXX code from a JCL and I want to copy the details of the same JOB(currently running). Can this be possible? If so how? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
If you use DA instead of ST in the SDSF code, then you do not need to know the job number, so can select on the currently running job.
You can even put the code inside of the same job, as only one job with that name can run at any one time, so you get the right job. |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
Thanks for your responce!
I have changed ST to DA and tried.
I tried to execute REXX in JCL as below:
Code: |
.....JOB CARD......
//TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200
//SYSEXEC DD DSN=NBDKYGS.REXX.EXEC,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
EXEC1
/* |
but i got the output as below:
Code: |
1READY
EXEC1
25 *-* ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++25,80')"/* INVOKE SDSF */
+++ RC(-3) +++
READY
END |
I am unable to resolve the problem was. please tell me wher i did the mistake and how to resolve. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You need to be running in an ISPF environment rather than native TSO. Allocate all of the ISPF libraries and DD names that are currently allocated to you TSO session (use TSO ISRDDN ) to find them. They are the libraries that begin ISP |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
could you please explain me with example? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What happens when you type TSO ISRDDN on the command line ?
You get a list of DDnames and associated datasets.
Copy the ISPMLIB, ISPPLIB, ISPSLIB, ISPTLIB, ISPTABL, SYSEXEC & SYSPROC DDnames and datasets into your JCL. |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
Code: |
//STEPLIB DD DSN=SYS7A.ISPF.ISPMLIB,DISP=SHR
// DD DSN=SYS7A.ISPF.ISPPLIB,DISP=SHR
// DD DSN=SYS7A.ISPF.ISPSLIB,DISP=SHR
// DD DSN=SYS7A.ISPF.ISPTLIB,DISP=SHR
// DD DSN=SYS7.GLOBAL.ISPLLIB,DISP=SHR
// DD DSN=SYS7A.ISPF.ISPTLIB,DISP=SHR
// DD DSN=SYS7A.ISPF.CLIST,DISP=SHR |
i this how you are taking abt? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
So when you looked under ISRDDN were all of the datasets shown in your previous post all allocated to DDname STEPLIB ? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
ISPF has several dd names that must be used. Your JCL needs to have those DD names added. And from your example, it looks like you incorrectly added them to your STEPLIB dd name. |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
Can you provide me a sample JCL? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
When you are logged on and using ISPF, issue TSO ISRDDN and look at the dd names used and the datasets allocated to those DD names. Based on your earlier post, your JCL should include:
Code: |
//STEPLIB DD DSN=SYS7.GLOBAL.ISPLLIB,DISP=SHR
//ISPMLIB DD DSN=SYS7A.ISPF.ISPMLIB,DISP=SHR
//ISPPLIB DD DSN=SYS7A.ISPF.ISPPLIB,DISP=SHR
//ISPSLIB DD DSN=SYS7A.ISPF.ISPSLIB,DISP=SHR
//ISPTLIB DD DSN=SYS7A.ISPF.ISPTLIB,DISP=SHR
//SYSPROC DD DSN=SYS7A.ISPF.CLIST,DISP=SHR |
|
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
I got the same result.
Please have a look at my JCL and REXX program:
JCL:
Code: |
JOB CARD
//STEPLIB DD DSN=SYS7.GLOBAL.ISPLLIB,DISP=SHR
//ISPMLIB DD DSN=SYS7A.ISPF.ISPMLIB,DISP=SHR
//ISPPLIB DD DSN=SYS7A.ISPF.ISPPLIB,DISP=SHR
//ISPSLIB DD DSN=SYS7A.ISPF.ISPSLIB,DISP=SHR
//ISPTLIB DD DSN=SYS7A.ISPF.ISPTLIB,DISP=SHR
//SYSPROC DD DSN=SYS7A.ISPF.CLIST,DISP=SHR
//TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200
//SYSEXEC DD DSN=NBDKYGS.REXX.EXEC,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
EXEC1
/* |
REXX:
Code: |
/*****REXX******/
ADDRESS TSO
"ALLOC F(ISFIN) TRACKS SPACE(1) REU" /* USED BY SDSF */
"ALLOC F(ISFOUT) NEW DELETE REU " , /* USED BY SDSF */
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"
"ALLOC F(TEMPPRT) DA('NBDKYGS.REXX.JOB2(OUT5)') SHR REUSE"
JOBID = "JOB09601"
QUEUE "PRE IQ1TSACE" /* SDSF COMMANDS IN BATCH*/
QUEUE "ST"
QUEUE "FILTER JOBNAME " JOBID
QUEUE "++S"
QUEUE "PRINT FILE TEMPPRT" /* PRINT TO TEMP DATASET */
QUEUE "PRINT 1 999999"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE "EXIT"
"EXECIO" QUEUED()" DISKW ISFIN (FINIS" /* INPUT TO SDSF BATCH */
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++25,80')"/* INVOKE SDSF */
EXIT |
please tell me where i did mistake. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
The exec statement marks the beginning of the step.
Code: |
//TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200 |
The DD statements should be after it. And STEPLIB is first after EXEC. |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
I tried this ... but the same result.
I am getting MAXCC=0, when job submitted.
and got
Code: |
READY
EXEC1
25 *-* ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++25,80')"/* INVOKE SDSF */
+++ RC(-3) +++
READY
END |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Use of ISPEXEC requires an ISPF environment (which is why you need the DD statements). So, start ISPF first, passing it the parm to start your exec
Code: |
//SYSTSIN DD *
ISPSTART CMD(%exec1)
/*EOF
|
|
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
Job ended with return code of 0998. I found this in the spool.
Code: |
READY
ISPSTART CMD(%EXEC1)
CMG999 Message ISPT036 - ISPT036 message not found in 'ISPMLIB' library. |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
My first guess would be that you have not concatenated all of the ISPMLIb libraries allocated to your ISPF online session into the batch version. |
|
Back to top |
|
|
|