Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Unable to retrieve Spool Output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Wed May 02, 2007 2:45 pm    Post subject: Unable to retrieve Spool Output
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 02, 2007 2:53 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 02, 2007 2:57 pm    Post subject:
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: 85
Location: Bangalore

PostPosted: Wed May 02, 2007 3:24 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 02, 2007 3:39 pm    Post subject:
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: 85
Location: Bangalore

PostPosted: Wed May 02, 2007 4:13 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 02, 2007 4:22 pm    Post subject:
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: 85
Location: Bangalore

PostPosted: Wed May 02, 2007 6:43 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 02, 2007 7:46 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Nov 30, 2009 11:17 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Dec 01, 2009 12:07 am    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Tue Dec 01, 2009 2:49 am    Post subject: Reply to: Unable to retrieve Spool Output
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

Site Director


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

PostPosted: Tue Dec 01, 2009 3:15 am    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us