View previous topic :: View next topic
|
Author |
Message |
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
hi,
I have CA-SAR. Can anybody please help me to get start time and end time of a batch.
Means how to find out first and last job of a batch trail.
Thanks, |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
This can be done if u tailor the below steps to your requirement.
1)Generate parms to decide which Generation of output u need in SAR.
2) Get the details of the starting and the ending job timings in batch.
3) Process it using REXX.
1) If u need to get the details of the most recent run of a job from then u can generate this below parm (OR have it readymade in a PDS member)
Code: |
/LOAD ID=CICDLMC GEN=-0 |
CICDLMC - required job name...
-0 stands for the most current job in SAR, -1 corresponds to last but first and so on.....
2) Use the below step to get SAR data into the PS member XK89.BOMB.DATA. I guess the PGM name might be different in ur shop,
Ask your SAR administrators.
Code: |
//UNLOAD EXEC PGM=SARBCH,PARM='SAR.SARJLD01'
//SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=133
//REPORT DD SYSOUT=*,DCB=BLKSIZE=133
//SARLOAD DD DSN=XK89.BOMB.DATA,DISP=MOD
//SYSIN DD *
/LOAD ID=CICDLMC GEN=-0
/* |
3) Process it using REXX.
Code: |
/*REXX*/
"ALLOC F(THINK) DS('"XK89.BOMB.DATA"') SHR"
"ALLOC F(THINKS) DS('"XK89.JWA.OUTPUT"') MOD"
"EXECIO * DISKR THINK (FINIS STEM IN."
DO I = 1 TO 7
IF SUBSTR(IN.I,20,9) = 'ICH70001I' THEN
DO
DATETIME = SUBSTR(IN.I,54,40)
END
IF SUBSTR(IN.I,20,7) = 'IEF403I' THEN
DO
JOBNAME = SUBSTR(IN.I,28,8)
END
END
OUT.0=1
OUT.1= JOBNAME 'LAST RUN WAS AT' DATETIME
"EXECIO * DISKW THINKS (FINIS STEM OUT."
"FREE FILE(THINK)"
"FREE FILE(THINKS)"
EXIT |
Use the above 3 steps for finding the start time of the batch trail. U may have to edit ICH70001I in the above REXX code for reading the end time of the batch trail. That I will leave it to you.
Let me know your comments if you try it.
Happy coding |
|
Back to top |
|
|
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
hi thanks for ur reply...sorry to say i m not aware of REXX...so is there any other way in this tool to find out this....
but i will surely try ur solution
once again thank u very much... |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
If you follow the first 2 steps, then u will have the JES data of the specified job in xk89.bomb.data.
The contents will be something like this,
Code: |
********************************* Top of Data **********************************
J E S 2 J O B L O G -- S Y S T E M M V S E -- N O
03.18.02 JOB05566 ---- TUESDAY, 17 MAR 2009 ----
03.18.02 JOB05566 IRR010I USERID XCICS IS ASSIGNED TO THIS JOB.
03.18.03 JOB05566 ICH70001I XCICS LAST ACCESS AT 03:18:03 ON TUESDAY, MARCH
03.18.03 JOB05566 $HASP373 DLLCPGAL STARTED - INIT 4 - CLASS P - SYS MVSE
03.18.03 JOB05566 IEF403I DLLCPGAL - STARTED - TIME=03.18.03
03.18.03 JOB05566 TES0001I --- EXCP -- (MINS
03.18.03 JOB05566 TES0002I JOBNAME STEPNAME PROCSTEP RC DISK OTHER CP
03.18.03 JOB05566 TES0003I DLLCPGAL COPY2 TRNKCOPY 00 2 0 .0
03.18.03 JOB05566 TES0003I DLLCPGAL HOSTPG GDGUPD01 00 4 0 .0
03.18.04 JOB05566 IEC130I A02 DD STATEMENT MISSING
03.18.04 JOB05566 TES0003I DLLCPGAL HOSTPG SWEOF 00 0 0 .0
03.18.04 JOB05566 IEF404I DLLCPGAL - ENDED - TIME=03.18.04
03.18.04 JOB05566 TES0004I DLLCPGAL ENDED. NAME- TOTAL CPU
03.18.04 JOB05566 $HASP395 DLLCPGAL ENDED
------ JES2 JOB STATISTICS ------
17 MAR 2009 JOB EXECUTION DATE |
In the above data, the time in the line containing the WORD ICH70001I
is the start time of the job. Use some programming language or DFSORT to extract the date.
DFSORT is very powerful try it out... |
|
Back to top |
|
|
|