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!
Is there a way to read JESMSGLG in program?
-
- Posts: 40
- Joined: Wed Nov 01, 2017 8:59 pm
- Skillset: XL/C, ISPF, USS
- Referer: My colleagues
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Is there a way to read JESMSGLG in program?
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.
- Steve Coalbran
- Posts: 138
- Joined: Wed Apr 06, 2011 11:49 am
- Skillset: z/OS, JCL, TSO, REXX, ISPF, IPT, TWS
- Referer: searching for associates in Google
- Location: Stockholm, Sweden
Re: Is there a way to read JESMSGLG in program?
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.
thisjes is obtained from a STATUS ST command, trapping the output and looking for the jobname (from SYSVARS) currently EXECUTING.
Hope this tip helps?

Code: Select all
RC = ISFCALLS("ON")
isffilter = 'JOBID EQ 'thisjes
ADDRESS SDSF "ISFEXEC ST "
ADDRESS SDSF "ISFACT ST TOKEN('"token.1"') PARM(NP XDC) "
Hope this tip helps?
Steve
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Calling Java program on UNIX/USS from a COBOL CICS program?
by zbius » Tue Nov 05, 2024 2:37 pm » in IBM Cobol - 2
- 2547
-
by zbius
View the latest post
Wed Nov 06, 2024 6:02 pm
-
-
- 6
- 6023
-
by Mainframe_Dev
View the latest post
Mon Jan 30, 2023 1:06 am
-
- 3
- 7848
-
by socker_dad
View the latest post
Thu Jan 28, 2021 4:13 am
-
- 2
- 1423
-
by naga821
View the latest post
Fri Oct 28, 2022 7:31 pm
-
- 2
- 3981
-
by zbius
View the latest post
Wed Nov 06, 2024 2:16 pm