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

SDSF in Batch - How to select second batch from spool


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Wed Nov 23, 2011 10:37 am
Reply with quote

Hi All,
I have more than one jobs with same name present in SDSF spool. I like to copy the last job JESMSG from the list to a dataset. Anyone please help me to take this details.

EXAMPLE:
------------
Code:

 -------------------------------------------------------------------------------
 SDSF STATUS DISPLAY ALL CLASSES                        LINE 1-3 (3)           
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
  PREFIX=jobname1*  DEST=(ALL)  OWNER=*  SYSNAME=                                 
 NP   JOBNAME  JobID    Owner    Prty Queue      C  Pos  SAff  ASys Status     
      jobname1  xxx27169 yyy      15 EXECUTION          mvs mvsE             
      jobname1  xxx15704 yyy       1 PRINT          714                       
      jobname1  xxx02049 yyy       1 PRINT         3018                       
                                                                               

in above spool I need to take JESMSG detail for JOBID xxx02049, which means the last job from the list.

I have a job to get the details from the first job, means to get JESMSG details from JOBID xxx27169. please find the job below, but I need to know how to get the details from last job.

Code:


//STEP02 EXEC PGM=ISFAFD                           
//PRINTDD DD DISP=SHR,DSN=xxx.xxx.xxx     
//ISFOUT DD SYSOUT=*                               
//ISFIN DD *                                       
SET CURSOR OFF                                     
OWNER *                                           
PREFIX *                                           
ST                                                 
SELECT jobname1                                     
AFD REFRESH                                       
FIND jobname1                                       
PF5                                               
++?                                               
FIND JESMSG                                       
++S                                               
PRINT FILE PRINTDD       
PRINT       
PRINT CLOSE 
END         
/*
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Nov 23, 2011 1:00 pm
Reply with quote

Read the SDSF manual, it is possible to do this because I remember a couple of years ago the exact same question was raised and answered.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 23, 2011 1:12 pm
Reply with quote

if You had cared to search the forums You would have found ...

www.ibmmainframes.com/viewtopic.php?t=54926&highlight=

with tested snippets whch do exactly what You ask for
well... almost ( there job selection logic is a bit different )

but also Your description of LAST is a bit murky, so up to you to modify the snippets for the proper selection logic

note...
the process You are using is difficult to <debug>, there is no error handling facility,
and the only visible symptom of something going wrong is an empty output dataset

using the REXX SDSF interface You are in full control and can provide proper error handling facilities
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
Search our Forums:

Back to Top