Page 1 of 1

Is there a way to read JESMSGLG in program?

PostPosted: Wed Apr 11, 2018 9:01 pm
by chong_zhou
Given a system ID and a JobNr (job number), we can find the job in SDSF (or CA Sysview), then we can view the JESMSGLG, JESJCL, JESYSMSG and etc. My question is that is there a way to read those DDs in my program (a standalone program, not a step of the target job)? (for some reason I want to read them in my program and send them off platform for some crazy auto-analyzers)

Any TSO commands that can be used in Rexx? or any LE APIs for C program? or any system macros for HLASM? Any clue would be welcome. Thank you guys in advance!

Re: Is there a way to read JESMSGLG in program?

PostPosted: Wed Apr 11, 2018 9:32 pm
by Robert Sample
SDSF has an API (application programming interface) that allows you to extract JES output into a data set, which could then be read by a program.

Re: Is there a way to read JESMSGLG in program?

PostPosted: Sat Apr 28, 2018 2:08 pm
by Steve Coalbran
I use REXX to do this. You need to get into the manual. Search your DDLIST ONLY SYSPROC &/or DDLIST ONLY SYSEXEC for examples perhaps for ISFCALLS & ISFEXEC. These are some lines I cut from an exec that runs at the end of a job and analyses the step return codes. I can't send the whole code as it's proprietary.
RC = ISFCALLS("ON")                                        
isffilter = 'JOBID EQ 'thisjes                              
ADDRESS SDSF "ISFEXEC ST "                                  
   ADDRESS SDSF "ISFACT ST TOKEN('"token.1"') PARM(NP XDC) "
thisjes is obtained from a STATUS ST command, trapping the output and looking for the jobname (from SYSVARS) currently EXECUTING.

Hope this tip helps?
Image