View previous topic :: View next topic
|
Author |
Message |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Add a SORT command on JOBID or DATE/TIME DESCENDING to make the latest on top? |
|
Back to top |
|
|
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
What does your ISFOUT file look like? |
|
Back to top |
|
|
|