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

Need help in pulling SPOOL information for latest JOB


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Mon Aug 30, 2010 11:05 pm
Reply with quote

Need help in pulling SPOOL information for latest JOB

I want to pull SPOOL information for this JOB, When I check in SPOOL it has 4 enetries. So I want to take the latest entry from that.

Code:

G123456K J0122422   1 PRINT     0 9020                2:25:58 2010.238
G123456K J0057947   1 PRINT     0  17T                2:30:39 2010.239
G123456K J0121934   1 PRINT     0  26T                2:33:24 2010.240
G123456K J0148135   1 PRINT     0  30T               20:33:58 2010.240


I have coded logic which will pull SPOOL information from SPOOL, but it is picking information for first entry

Code:

G123456K J0122422   1 PRINT     0 9020                2:25:58 2010.238


Below is the logic which I am using
Code:

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(134) RECFM(F,B,A) DSORG(PS)"     
"ALLOC F(LOGFILE1) DA('"USERID()".SATS.PULL.TOOL.SARPULL') MOD"
QUEUE " PRE " REGION                                           
QUEUE "OWNER"                                                 
QUEUE "ST"                                                     
QUEUE " FIND" REGION                                           
QUEUE "  ++?"                                                 
QUEUE " FIND  JESMSGLG"                                       
QUEUE "  ++S"                                                 
QUEUE " PRINT FILE LOGFILE1"                                   
QUEUE " PRINT"                                                 
QUEUE " PRINT CLOSE"                                           
QUEUE "END"                                                   
QUEUE " "                                                     
QUEUE "EXIT"                                                   
QUEUE " "       
QUEUE " "                                                           
QUEUE "EXIT"                                                         
QUEUE " "                                                           
QUEUE "EXIT"                                                         
"EXECIO" QUEUED()" DISKW ISFIN (FINIS" /* INPUT TO SDSF BATCH */     
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++25,80')"/* INVOKE SDSF */                                               


What changes I need to do to make it pull the latest version or any any previous processing to make it pull previous version.

Thanks in advance
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Aug 31, 2010 1:17 am
Reply with quote

Add a SORT command on JOBID or DATE/TIME DESCENDING to make the latest on top?
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Tue Aug 31, 2010 8:27 am
Reply with quote

I have tried adding


Code:


QUEUE " PRE " REGION                                           
QUEUE "OWNER"                                                 
QUEUE "ST"                       
QUEUE "SORT RDDATE D"                               
QUEUE " FIND" REGION                                           
QUEUE "  ++?"                                                 
QUEUE " FIND  JESMSGLG"                                       
QUEUE "  ++S"                 



I have added sort condition like this, but its not picking up the latest version
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Aug 31, 2010 10:33 am
Reply with quote

scorp_rahul23 wrote:
I have added sort condition like this, but its not picking up the latest version
If you issue those commands on command line, outside of your REXX, do you get to what you're looking for?
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Tue Aug 31, 2010 10:57 am
Reply with quote

Yes Anuj

I am getting proper result when I am using directly on Command line.

Is there any way to capture ST screen.( When I do Prefix of JOBNAME, it will display all JOBNAMES for all the dates).

Is there a way to capture that screen. Below is the screen after doing prefix. Is there any way to cpature this. I cant do it by submitting JCL, as I have series of JOBS for which I have capture and it will be like I have to submit JOB everytime.
Code:

JOBNAME  JOBID    PRI QUEUE     C POS  STAT NOTIFY   RDTIME   RDDATE 
G123456K J0146624   1 PRINT     0  27T               20:04:16 2010.240
G123456K J0118440   1 PRINT     0 6490                2:04:54 2010.238
G123456K J0055820   1 PRINT     0  15T                2:04:50 2010.239
G123456K J0118738   1 PRINT     0  23T                2:03:23 2010.240


I have tried almost all possible things. Checked manual also, but didnt found anything concrete.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Aug 31, 2010 7:32 pm
Reply with quote

What does your ISFOUT file look like?
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts Capturing logs from spool dd JCL & VSAM 6
Search our Forums:

Back to Top