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
 

 

Need help in pulling SPOOL information for latest JOB

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Mon Aug 30, 2010 11:05 pm    Post subject: Need help in pulling SPOOL information for latest JOB
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    Post subject:
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: 90
Location: Chennai

PostPosted: Tue Aug 31, 2010 8:27 am    Post subject: Reply to: Need help in pulling SPOOL information for latest
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

Senior Member


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

PostPosted: Tue Aug 31, 2010 10:33 am    Post subject: Re: Reply to: Need help in pulling SPOOL information for lat
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: 90
Location: Chennai

PostPosted: Tue Aug 31, 2010 10:57 am    Post subject: Reply to: Need help in pulling SPOOL information for latest
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

Senior Member


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

PostPosted: Tue Aug 31, 2010 7:32 pm    Post subject: Reply to: Need help in pulling SPOOL information for latest
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX 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 REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Obtaining file information pahiker COBOL Programming 25 Tue Sep 27, 2016 7:25 pm
No new posts Need information on COBOL MOVE CORRES... subratarec COBOL Programming 10 Tue Jun 28, 2016 10:38 pm
No new posts Passing information through JCL as in... Pia Baruah JCL & VSAM 5 Wed May 25, 2016 2:22 pm


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