Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SDSF in Batch - How to select second batch from spool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SDSF in Batch - How to select second batch from spool
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: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 23, 2011 1:00 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Wed Nov 23, 2011 1:12 pm    Post subject: Reply to: SDSF in Batch - How to select second batch from sp
Reply with quote

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

http://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    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. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts Spool Extract for Z /os 1.04 version Khadhar Basha CLIST & REXX 3 Thu Sep 28, 2017 3:14 pm
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 3 Fri Sep 15, 2017 9:20 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us