View previous topic :: View next topic
|
Author |
Message |
Senthilkumar k Warnings : 1 New User
Joined: 07 May 2009 Posts: 51 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
|