View previous topic :: View next topic
|
Author |
Message |
Mathivanan Chinnaraj
New User
Joined: 07 Mar 2014 Posts: 4 Location: INDIA
|
|
|
|
Hi All,
I am trying to use SARBCH to route SAR sysout to a PS file. During this process i concatenate multiple SYSOUTs to the same PS file.
I need to add a line after every SYSOUT so that the start and end of each SYSOUT is known, which i need for further processing.
Can someone enlighten me how to add a line like 'REPORT 1' before the start of each SYSOUT? Your suggestions are appreciated.
I tried to find similar examples but couldnt find. If there is a topic that i missed please share it so that i can refer.
I use the below JCL for my SARBCH for concatenating multiple SYSOUTs.
Code: |
//STEPSAR EXEC PGM=SARBCH,PARM='SYS4.SAR'
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//OUTPUT1 DD DSN=<<<<<>>>>>,
// DISP=(MOD,CATLG,DELETE),
// DCB=(RECFM=FBA,LRECL=879,BLKSIZE=0),
// SPACE=(CYL,(100,400),RLSE),UNIT=(DISK,10)
//SYSIN DD *
/LOAD ID=<<>> DDNAME=OUTPUT1 GEN=<<>>SEQ=<>
/LOAD ID=<<>> DDNAME=OUTPUT1 GEN=<<>> SEQ=<>
/LOAD ID=<<>> DDNAME=OUTPUT1 GEN=<<>> SEQ=<>
/* |
|
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
Instead of "/LOAD" you are using to extract data from SAR using SARBCH, try using "/PRINT" card. The utility will add start and end data by itself.
Otherwise you can use multiple OUTPUT DDs like below in your SARBCH card:
Code: |
/LOAD ID=<<>> DDNAME=OUTPUT1 GEN=<<>>SEQ=<>
/LOAD ID=<<>> DDNAME=OUTPUT2 GEN=<<>> SEQ=<>
/LOAD ID=<<>> DDNAME=OUTPUT3 GEN=<<>> SEQ=<>
|
|
|
Back to top |
|
|
Mathivanan Chinnaraj
New User
Joined: 07 Mar 2014 Posts: 4 Location: INDIA
|
|
|
|
Thanks for your repsonse TheMFKid.
I had tried using the PRINT keyword and yes, it does add the start and end data.
The SYSOUTS that i print or copy to a PS are reports/letters. When i use PRINT keywords it adds a lot of lines before and after the actual report.
I would just need one line to identify the report's start and end so that i can use it for the next process.
The lines that the PRINT statement adds in the reports, adds complexity for my subsequent processes, after concatenation of reports.
Is there any other way where i can just add one line to state the report name alone? |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
How about using different output DDs for each LOAD card and later concatinating using IEBGENER?
You can insert blank lines or report headers during the concatination. |
|
Back to top |
|
|
Mathivanan Chinnaraj
New User
Joined: 07 Mar 2014 Posts: 4 Location: INDIA
|
|
|
|
Thanks for the suggestion TheMFkid.
My test JCL just has 3 SYSOUTs. But the actual Job would have close to 30 SYSOUTs that needs to be concatenated.
I had thought about printing to individual PS files and then using IEBGENER to concatenate.
Just because of the number of steps, files and memory within the JCL, i chose to concatenate within a single step using SARBCH.
But yes, using different DDs and then using IEBGENER would be the last option. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
Mathivanan Chinnaraj wrote: |
Thanks for the suggestion TheMFkid.
But yes, using different DDs and then using IEBGENER would be the last option. |
I dont see any other way unless someone else has a better solution to suggest. Good luck.. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
This may not be the clean way, but it would work.
1) Run a job with IEBGENER or any utility, which will generate a report to SAR.
The content of the report being only "REPORT 1 " and with some name like JOBRPT-001
2) Run SARBCH job with LOAD statements for JOBRPT-001 interleaved.
Code: |
/LOAD ID=<<>> DDNAME=OUTPUT1 GEN=<<>>SEQ=<>
/LOAD ID=JOBRPT-001 DDNAME=OUTPUT1 GEN=<<>>SEQ=<>
/LOAD ID=<<>> DDNAME=OUTPUT1 GEN=<<>> SEQ=<>
/LOAD ID=JOBRPT-001 DDNAME=OUTPUT1 GEN=<<>>SEQ=<>
/LOAD ID=<<>> DDNAME=OUTPUT1 GEN=<<>> SEQ=<>
/LOAD ID=JOBRPT-001 DDNAME=OUTPUT1 GEN=<<>>SEQ=<> |
3) Be happy :-) |
|
Back to top |
|
|
Mathivanan Chinnaraj
New User
Joined: 07 Mar 2014 Posts: 4 Location: INDIA
|
|
|
|
Thanks Vasanthz.
That seems to be 'something' suiting to my need. But, just because i had to have the report name 'alone' before the SYSOUT, i would end up in having 30 temporary SAR reports with only one line in it.
But, i did some work around in between which made me to come out with a solution, on my own.
I used /PRINT instead of /LOAD and had a small rexx routine to remove all lines added before and after the report, except the line that contains below in exact positions.
Code: |
* SYSOUT ID: <<<<<<>>>>> JOBNAME: <<<>>>
|
This could temporarily complete my job with all processes.
I am still curious to know if there is a way to add a line while concatenating using SARBCH. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
Mathivanan Chinnaraj wrote: |
But, just because i had to have the report name 'alone' before the SYSOUT, i would end up in having 30 temporary SAR reports with only one line in it.
|
As Vasanthz suggested, you can have just one temporary SAR report and call that as per your need. You do not need to have 30 temporary SAR reports with only one line in it.
If you can run REXX on the report, then sure you can customize the report as per your need. |
|
Back to top |
|
|
|