View previous topic :: View next topic
|
Author |
Message |
pema_yozer
New User
Joined: 16 Feb 2009 Posts: 54 Location: pune
|
|
|
|
Hi Guy,
I have a requirement where i need to run a certain JCL
and then load the log of that JCL into a table.
Actually i'm interested in the log of just one particular step.
Is they any way i can write the log of that step into a file
which i can then load into the table. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
Samples tell more than words. |
|
Back to top |
|
|
pema_yozer
New User
Joined: 16 Feb 2009 Posts: 54 Location: pune
|
|
|
|
I have a JCL which i run and then go to SDSF to check he log.
What im expecting to do is to specify the log output file in the JCL itself so once the JCL runs the log is written in the dataset i've specified in the JCL itself. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
Now have a closer look at your request. You have a finished job you presently check in SDSF, while on the other hand, you wish to write the result of something not fully finished. Possibly you can implement a two step solution using SDSF XDC to get what you aim for. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
If you know the log output ddname, then you can amend the JCL to write this to a dataset.... You can add a step to load that dataset into the table.
Garry. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
This sample lists files from the active job. The REXX step should be the last step of the job. Note, non-standard proc RXINSTREAM just allows in-stream REXX pgms.
Code: |
//*
//* browse active job
//*
//A EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD *
Kilroy
was
here
//SYSUT2 DD SYSOUT=*
//*
//B EXEC RXINSTRM
//REXX DD * */
call syscalls 'ON'
address syscall 'sleep 5'
/* Locate self */
isfprefix=mvsvar('symdef','jobname') /* jobname (me) */
file='ALL' /* ddname or ALL */
say 'Looking for active job' isfprefix
rc=isfcalls('ON')
Address SDSF
"ISFEXEC ST"
if rc<>0 then call SdsfErr 'ST'
ap=0
do i=1 to jobid.0
if queue.i='EXECUTION' then ap=i
end
if ap=0 then exit xmsg('Job not found',8)
/* List ddname(s) */
"ISFACT ST TOKEN('"TOKEN.ap"') PARM(NP SA)"
if rc<>0 then call SdsfErr 'ST NP SA'
do jx=1 to isfddname.0
if isfddname.jx=file | file='ALL' then do
say ''
say 'File...' isfddname.jx '(dsn='isfdsname.jx')'
address tso "EXECIO * DISKR" isfddname.jx "(STEM line. FINIS)"
if rc<>0 then exit xmsg('read rc' rc,8)
say 'Lines read:' line.0
say ''
do kx = 1 to line.0
Say line.kx
end
end
end
exit xmsg('Ok')
SdsfErr:
say arg(1)':' isfmsg
say isfdisplay
do i=1 to isfmsg2.0
say isfmsg2.i
end
exit 12
XMsg: if arg(1)<>'' then say arg(1);return word(arg(2) 0,1) |
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2133 Location: USA
|
|
|
|
The same story again: neither JCL, nor VSAM!
The TS is here since 2009, or earlier. Still no understanding - what JCL is, and how to use it... |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
sergeyken wrote: |
The same story again: neither JCL, nor VSAM!
The TS is here since 2009, or earlier. Still no understanding - what JCL is, and how to use it... |
If the solution I suggested above meets requirements, then it is JCL . .
Garry. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2133 Location: USA
|
|
|
|
Garry Carroll wrote: |
If the solution I suggested above meets requirements, then it is JCL . .
|
That is REXX+ISPF+ISPEXEC. Nothing to do with JCL. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
sergeyken wrote: |
Garry Carroll wrote: |
If the solution I suggested above meets requirements, then it is JCL . .
|
That is REXX+ISPF+ISPEXEC. Nothing to do with JCL. |
That was not my suggestion, that was in the panel by Willy Jensen which is after my suggestion. |
|
Back to top |
|
|
|