View previous topic :: View next topic
|
Author |
Message |
Digvijay Singh
Active User
Joined: 20 Apr 2022 Posts: 148 Location: India
|
|
|
|
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 |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
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 |
|
|
Digvijay Singh
Active User
Joined: 20 Apr 2022 Posts: 148 Location: India
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2135 Location: USA
|
|
|
|
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 |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
Back to top |
|
|
|