Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Add a line while concatenating using SARBCH

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Add a line while concatenating using SARBCH
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 1445
Location: Azeroth

PostPosted: Thu Mar 13, 2014 9:34 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts ISREDIT - Position Cursor on the Comm... Tarique Anwer TSO/ISPF 5 Wed Feb 03, 2016 12:44 pm
No new posts Use Edit Line Command Table with ISPF... Mickeydusaor TSO/ISPF 5 Thu Jan 28, 2016 4:52 pm
No new posts ISPF 3.4, SF line command does not su... Pedro TSO/ISPF 0 Fri Jan 15, 2016 11:09 pm
No new posts Can someone explain me this JCL line ... PeterHolland JCL & VSAM 9 Sat Dec 12, 2015 7:22 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us