View previous topic :: View next topic
|
Author |
Message |
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Hi All
I tried with the below code to get the spool details for a particular jobname or jobid but though I had 8 listing in spool but I got no records in output dataset. Could you tell me as what is the mistake in this EXEC
/* 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('NBDY8ZO.TEMP.JOB2') SHR"
JOBID = "JOB04056"
QUEUE "PRE NBDLBWU*" /* SDSF COMMANDS IN BATCH*/
QUEUE "ST"
QUEUE "FILTER JOBNAME " JOBID
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 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Try this
Code: |
QUEUE "PRE NBDLBWU*" /* SDSF COMMANDS IN BATCH*/
QUEUE "ST"
QUEUE "FILTER JOBNAME " JOBID
++S
QUEUE "PRINT FILE TEMPPRT" /* PRINT TO TEMP DATASET */
QUEUE "PRINT 1 999999"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE "EXIT"
|
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or even better - try this [code]
QUEUE "PRE NBDLBWU*" /* 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" |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Expat I tried the example given by you also. I donot get any error while running the exec but the output dataset is empty |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Well, having done a quick couple of tests, and looked very closely at your code, may I suggest that you change
QUEUE "FILTER JOBNAME " JOBID
into
QUEUE "FILTER JOBID " JOBID |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
I tried the filter thing with JOBNAME AND JOBID, but it didn't work for both |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Yeah, I know.
Go into SDSF on your screen, Option H will do, and then hit PF1
Read what it says and adapt your SDSF job accordingly. I have just done that, changed my test job and it works perfectly now.
Some of the commands have changed since I last wrote an SDSF batch job, and I saw a couple of things that I didn't know until a few minutes ago.
If you still need help, let me know and I'll try to help you FIND the solution. You are almost there, just a couple of minor changes required |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
I checked the help in SDSF and implemented the changes as mentioned. I see that the output is retrieved but somehow not written in the dataset. Can you help me with that |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
This is the code I used, and finally got it to work. Although I used EXEC PGM=SDSF rather than from within the REXX environment, but the result should be the same.
I fell down on the command to get only the job with the correct number, but then saw that you need to specify both the jobname and number before using the FIND and ++S parameters.
Another point, is that I seem to recall, but of course may be wrong, that I had problems when I allocated the output dataset in the same step, so remember setting the ISPFOUT dataset with an IEFBR14 in the previous step.
Code: |
PRE xxxxx*
H
SELECT jobname JOBID JOBnnnnn
FIND jobname
++S
PRINT ODSN 'output dataset name'
PRINT 1 9999
PRINT CLOSE
END
END
|
Let me know if you still get any problems, and thanks for posting because today I have learned something new as well. |
|
Back to top |
|
|
rgupta71
Active User
Joined: 21 Jun 2009 Posts: 160 Location: Indore
|
|
|
|
Hi Expat,
I used the above job but I am not getting any output in the dataset.
I made the follwing changes
PRE xxxxx*-------> PRE TSORT*
SELECT <my_jobname> JOBID <my_job_id>
and I have verified that the Dataset was created in the previous step. |
|
Back to top |
|
|
rgupta71
Active User
Joined: 21 Jun 2009 Posts: 160 Location: Indore
|
|
|
|
TO add on to that ISFOUT is only showing SDSF PRIMARY OPTION MENU and then some blank lines.(TOtal 60 lines). |
|
Back to top |
|
|
rgupta71
Active User
Joined: 21 Jun 2009 Posts: 160 Location: Indore
|
|
|
|
I am now able to copy everything in dataset some sdsf screen,jesmsg etc but I want to copy only the job.
Is this possible through REXX? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I am now able to copy everything in dataset some sdsf screen,jesmsg etc but I want to copy only the job. |
What does this mean? If you see it in sdsf it is only the job. . .
Obviously, i misunderstand something |
|
Back to top |
|
|
rgupta71
Active User
Joined: 21 Jun 2009 Posts: 160 Location: Indore
|
|
|
|
From job I mean the JCL. I want to copy the JCL. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The expanded JCL is in the second sysout (jesjcl, if i remember correctly - i'm away from a mainframe connection). |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Depending on the system setup and the MSGLEVEL of the job it may not be there. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I think you are seeing all files that are part of the job, because that is what the 'S' row action does. If you only want to see the JCL, then I think you need different instructions.
The batch SDSF commands mimic what you would do from the ISPF version. In ISPF, you would use the ? command, so I think something like this would work (not tested):
Code: |
PRE xxxxx*
H
SELECT jobname JOBID JOBnnnnn
FIND jobname
++?
FIND JESJCL
++S
PRINT ODSN 'output dataset name'
PRINT 1 9999
PRINT CLOSE
END
END |
Quote: |
Is this possible through REXX? |
The samples in this thread are about invoking the batch SDSF utility. But if your system up-to-date enough, I think you should use the SDSF rexx API instead. See SG24-7419, or chapter 12 of SA22-7670 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Are you looking for the execution of the jcl (expanded) or the actual jcl that was submitted (before expansion)? |
|
Back to top |
|
|
rgupta71
Active User
Joined: 21 Jun 2009 Posts: 160 Location: Indore
|
|
|
|
@ dick scherrer
I am looking for actual jcl that was submitted ,so if I need to run it again I can do that from a PDS. |
|
Back to top |
|
|
rgupta71
Active User
Joined: 21 Jun 2009 Posts: 160 Location: Indore
|
|
|
|
@dick scherrer
The JESJCL doesn't have the SYSIN data and if we are using SET parameter the JESJCL output is like
<unexpanded form>
IEFC653I SUBSTITUTION JCL <expanded form>
So, if we want to submit the PDS that we have saved then we have to do some modifications.
Is there any way through which we can save the job from the spool exactly similar to what we have submitted?
@All
Thank You all for your support. |
|
Back to top |
|
|
|