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
 

 

Select a particular SYSPRINT using PROCSTEP in SDSF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
srikanth_cts

New User


Joined: 27 Feb 2008
Posts: 25
Location: Phoenix, AZ,USA

PostPosted: Thu Apr 10, 2008 9:56 am    Post subject: Select a particular SYSPRINT using PROCSTEP in SDSF
Reply with quote

Hello Folks,
I require some help in selecting a SYSPRINT or SYSOUT of a JOB using the PROCSTEP when we have multiple SYSPRINT or SYSOUT in the SPOOL.

Here is the Scenario:

Code:

     NPDDNAME StepName ProcStep DSID Owner    C Dest               Rec-Cnt Page
     JESMSGLG JES2                 2 JOBNAME  Q LOCAL                   32     
     JESMSGLG JES2                 2 JOBNAME  7 LOCAL                   32     
     JESMSGLG JES2                 2 JOBNAME  I LOCAL                   32     
     JESJCL   JES2                 3 JOBNAME  Q LOCAL                  331     
     JESJCL   JES2                 3 JOBNAME  7 LOCAL                  331     
     JESJCL   JES2                 3 JOBNAME  I LOCAL                  331     
     JESYSMSG JES2                 4 JOBNAME  Q LOCAL                  395     
     JESYSMSG JES2                 4 JOBNAME  7 LOCAL                  395     
     JESYSMSG JES2                 4 JOBNAME  I LOCAL                  395     
     SYSPRINT JOBNAME  S010      102 JOBNAME  Q LOCAL                   34     
     SYSPRINT JOBNAME  S020      102 JOBNAME  I LOCAL                   34     
     SYSPRINT JOBNAME  S030      102 JOBNAME  7 LOCAL                   34     
     SYSPRINT JOBNAME  S040      104 JOBNAME  Q LOCAL                   52     
     SYSPRINT JOBNAME  S050      104 JOBNAME  I LOCAL                   52     
     SYSPRINT JOBNAME  S060      104 JOBNAME  7 LOCAL                   52     


I wanted to select the SYSPRINT of S020.

As of now I am using the following JCL to get to that particular SYSPRINT.


Code:

//SPOOLINF JOB (@),       
//  'SPOOL SEARCH',MSGCLASS=X,CLASS=X,NOTIFY=&SYSUID   
//JOBNAME  EXEC PGM=SDSF                               
//ISFOUT   DD SYSOUT=*                                 
//ISFIN    DD *                                       
PRE JOBNAME                                               
OWNER                                                 
ST                                                     
FIND JOBNAME LAST                                     
++?                                                   
FIND SYSPRINT LAST                                     
FIND SYSPRINT PREV                                     
FIND SYSPRINT PREV                                     
FIND SYSPRINT PREV                                     
FIND SYSPRINT PREV                                     
++S                                                   
PRINT ODSN 'MYID.LOG.SDSF.JOBNAME' * NEW             
PRINT                                                 



Can anyone suggest me a better code.


Thanks!

Sreek
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 2:31 pm    Post subject: Reply to: Select a particular SYSPRINT using PROCSTEP in SD
Reply with quote

srikanth,

You can use FILTER to get the actual stepname and then FIND the dd name.

Check the following code:

Code:
++?
  FILTER STEPNAME EQ S020
  FIND SYSPRINT
  ++S


This would select the SYSPRINT of step S020.
Back to top
View user's profile Send private message
srikanth_cts

New User


Joined: 27 Feb 2008
Posts: 25
Location: Phoenix, AZ,USA

PostPosted: Thu Apr 10, 2008 5:41 pm    Post subject: The Solution Worked!
Reply with quote

Hi Aaru,
The solution you suggested had worked. Just one correction I made is:


Code:


++?
  FILTER ProcStep EQ S020
  FIND SYSPRINT
  ++S


Back to top
View user's profile Send private message
srikanth_cts

New User


Joined: 27 Feb 2008
Posts: 25
Location: Phoenix, AZ,USA

PostPosted: Thu Apr 10, 2008 5:42 pm    Post subject: Thanks a Ton!
Reply with quote

Thanks a Ton! , Aaru

Sreek
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 7:48 pm    Post subject: Reply to: Select a particular SYSPRINT using PROCSTEP in SD
Reply with quote

Not a Problem ! You are welcome.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 10, 2008 10:07 pm    Post subject:
Reply with quote

Take a look at Lionel B. Dyck's great little tool, SDFSEXT, a generalized SDSF batch tool to extract all or part of your sysout into a dataset that could be emailed.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts SDSF and SAF security danik56 TSO/ISPF 3 Wed Mar 15, 2017 12:51 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am


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