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

Add a line while concatenating using SARBCH


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mathivanan Chinnaraj

New User


Joined: 07 Mar 2014
Posts: 4
Location: INDIA

PostPosted: Thu Mar 13, 2014 2:05 am
Reply with quote

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
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Thu Mar 13, 2014 9:59 am
Reply with quote

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
View user's profile Send private message
Mathivanan Chinnaraj

New User


Joined: 07 Mar 2014
Posts: 4
Location: INDIA

PostPosted: Thu Mar 13, 2014 11:13 am
Reply with quote

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
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Thu Mar 13, 2014 11:32 am
Reply with quote

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
View user's profile Send private message
Mathivanan Chinnaraj

New User


Joined: 07 Mar 2014
Posts: 4
Location: INDIA

PostPosted: Thu Mar 13, 2014 12:54 pm
Reply with quote

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. icon_cry.gif
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Thu Mar 13, 2014 1:06 pm
Reply with quote

Mathivanan Chinnaraj wrote:
Thanks for the suggestion TheMFkid.
But yes, using different DDs and then using IEBGENER would be the last option. icon_cry.gif


I dont see any other way unless someone else has a better solution to suggest. Good luck..
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Mar 13, 2014 9:34 pm
Reply with quote

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
View user's profile Send private message
Mathivanan Chinnaraj

New User


Joined: 07 Mar 2014
Posts: 4
Location: INDIA

PostPosted: Fri Mar 14, 2014 12:00 am
Reply with quote

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. icon_rolleyes.gif
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Fri Mar 14, 2014 10:23 am
Reply with quote

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
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
No new posts Repeat a DD line- comment and insert ... CA Products 3
Search our Forums:

Back to Top