IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Unable to retrieve Spool Output


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Wed May 02, 2007 2:45 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 02, 2007 2:53 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 02, 2007 2:57 pm
Reply with quote

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
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Wed May 02, 2007 3:24 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 02, 2007 3:39 pm
Reply with quote

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
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Wed May 02, 2007 4:13 pm
Reply with quote

I tried the filter thing with JOBNAME AND JOBID, but it didn't work for both
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 02, 2007 4:22 pm
Reply with quote

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 icon_wink.gif
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Wed May 02, 2007 6:43 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 02, 2007 7:46 pm
Reply with quote

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
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 11:34 am
Reply with quote

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
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 11:58 am
Reply with quote

TO add on to that ISFOUT is only showing SDSF PRIMARY OPTION MENU and then some blank lines.(TOtal 60 lines).
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 3:33 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Nov 30, 2009 11:17 pm
Reply with quote

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 icon_confused.gif
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 11:38 pm
Reply with quote

From job I mean the JCL. I want to copy the JCL.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Dec 01, 2009 12:07 am
Reply with quote

Hello,

The expanded JCL is in the second sysout (jesjcl, if i remember correctly - i'm away from a mainframe connection).
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Dec 01, 2009 12:23 am
Reply with quote

Depending on the system setup and the MSGLEVEL of the job it may not be there.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Dec 01, 2009 2:49 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Dec 01, 2009 3:15 am
Reply with quote

Hello,

Are you looking for the execution of the jcl (expanded) or the actual jcl that was submitted (before expansion)?
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Tue Dec 01, 2009 11:47 am
Reply with quote

@ 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
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Tue Dec 01, 2009 12:00 pm
Reply with quote

@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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
Search our Forums:

Back to Top