IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Capturing logs from spool dd


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Digvijay Singh

Active User


Joined: 20 Apr 2022
Posts: 148
Location: India

PostPosted: Fri Apr 29, 2022 6:22 pm
Reply with quote

Hi All,

My requirement is : I have a job which generate one report sometime it doesn't generate basis on business logic , I want to capture the detail from this report and ftp it to some other system if report is getting generated i need to check this logic as well.

so current the report is like below se i am looking for XCPT report which is directed to spool sysout=*. IF this report is getting generated and it has data , i have to run my FTP step and send this report data to other system.

Note: Currently i am not bother about how i will FTP

Code:


17 //SYSEXEC  DD DSN=*,DISP=SHR   
18 //SYSTSPRT DD SYSOUT=*                           
19 //POSTEXEC DD SYSOUT=*                           
20 //XCPTRPT  DD SYSOUT=*                           
21 //EMERRPT  DD SYSOUT=* 


Any help or suggestion here is appreciated .                     
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 730
Location: Denmark

PostPosted: Fri Apr 29, 2022 6:25 pm
Reply with quote

Write the report to a dataset, then have a SORT/ICETOOL step to set a condcode depending on the dataset being empty or not, then have a final FTP step running based on the condcode from the ICETOOL step.
Back to top
View user's profile Send private message
Digvijay Singh

Active User


Joined: 20 Apr 2022
Posts: 148
Location: India

PostPosted: Fri Apr 29, 2022 7:18 pm
Reply with quote

I forgot to mention this : This JOB is being called from rexx and i dnt want to modify rexx program.

I had this approach in my mind but anyother than this by any chance we can think of.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Fri Apr 29, 2022 8:10 pm
Reply with quote

You could write REXX to interface with SDSF and, if the ddname you want is present in the output, extract the data and write to a dataset that you can then FTP.

Garry
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2135
Location: USA

PostPosted: Fri Apr 29, 2022 9:18 pm
Reply with quote

Digvijay Singh wrote:
I forgot to mention this : This JOB is being called from rexx and i dnt want to modify rexx program.

I had this approach in my mind but anyother than this by any chance we can think of.


There is no way to CALL any job (e.g. JCL) from REXX, or from anywhere else. The JCL can be only SUBMITTED (for a batch run, or execution).

After any job has been submitted, and is running, then it doesn't matter: where it was submitted from?

All said above has not a minor relation to the original issue: how to get the result of one JCL step, to be used in any of subsequent steps?
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 730
Location: Denmark

PostPosted: Sat Apr 30, 2022 1:10 pm
Reply with quote

If you really want to make it complicated then do as Gerry suggest, write a REXX which uses the REXX/SDSF API to monitor job status and extract data. The REXX could be a separate process, or a subroutine in the original.
In my previous post I forgot to mention that you probably also would want a step to print the report? IEBGENER would be the simplest program here.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Sun May 01, 2022 9:52 pm
Reply with quote

May it be of interest https://groups.google.com/g/bit.listserv.ibm-main/c/OE2x3F6EAL0
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts SPOOL to Mainframe dataset in batch mode JCL & VSAM 7
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Rexx log capturing CLIST & REXX 15
No new posts Search string in job at regular Spool... CLIST & REXX 0
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
Search our Forums:

Back to Top