IBM Security Z Security

 View Only
  • 1.  How to send the same CARLa report to: 1- E-mail 2- Dataset

    Posted Thu August 12, 2021 09:08 AM
    You guys show me how to code a CARLa to send the same report to two different outputs. Something like that:

    ALLOC TYPE=OUTPUT DSN=GABRIEL.REPORT1 DD=REPORT1

    ALLOC TYPE=OUTPUT DSN=GABRIEL.REPORT2 DD=REPORT2

    NEWLIST TYPE=RACF DD=REPORT1

    SELECT CLASS=USER SEGMENT=BASE

    SORTLIST KEY(8) NAME CONNECTS

    NEWLIST TYPE=RACF DD=REPORT2

    SELECT CLASS=USER SEGMENT=BASE

    SORTLIST KEY(8) NAME CONNECTS

    Now the customer wants to send one via e-mail and the other recording in a file. 

    Question: How can I send the same CARLa report to e-mail and to a file.

    ------------------------------
    Gabriel Vicoso Amaral
    ------------------------------


  • 2.  RE: How to send the same CARLa report to: 1- E-mail 2- Dataset
    Best Answer

    Posted Fri August 13, 2021 06:15 AM
    Hi gabriel

    sending reports to for instance email is contolled via OPTION statements. You can specify these either globally, so before a newlist statement or inside one. In that case they are effective for that specific query.

    so in your case it would look something like this.
     
    ALLOC TYPE=OUTPUT DSN=GABRIEL.REPORT2 DD=REPORT2

    NEWLIST TYPE=RACF DD=C2REMAIL
    SELECT CLASS=USER SEGMENT=BASE
    option smtpclass=B smtpwriter=SMTP smtpatsign=@,
    outputformat=emaildefault,
    mt=`rene_van_til@nl.ibm.com`,
    from=`me@me.com`,
    mfs=1
    SORTLIST KEY(8) NAME CONNECTS

    NEWLIST TYPE=RACF DD=REPORT2
    SELECT CLASS=USER SEGMENT=BASE
    SORTLIST KEY(8) NAME CONNECTS

    an easy way to get the correct OPTION statement is to run a normal report. for instance RA.U and then select send it via email. After doing that have a look at the SYSPRINT and you wll see the OPTION statement like in the sample above generated by the zSecure UI. You can copy that.

    hope this helps

    cheers

    ------------------------------
    RENE van TIL
    ------------------------------



  • 3.  RE: How to send the same CARLa report to: 1- E-mail 2- Dataset

    Posted Mon August 16, 2021 09:46 AM
    Thanks for the answer Rene!
    That's exactly what I'm looking for.

    ------------------------------
    Gabriel Vicoso Amaral
    ------------------------------



  • 4.  RE: How to send the same CARLa report to: 1- E-mail 2- Dataset

    Posted Tue August 17, 2021 08:44 AM
    Hi Gabriel,  ANother tip that will probably save you later is that when you have 2 reports that you need to have identical input data, there is always a possibility that someone down the road modifies one of them, but not the other.   You can avoid this by giving the first one a name (8 chars max),  and then in the 2nd query you refer back to the first query..

    NEWLIST TYPE=RACF DD=REPORT1  name=userids

    SELECT CLASS=USER SEGMENT=BASE

    SORTLIST KEY(8) NAME CONNECTS

    NEWLIST TYPE=RACF DD=REPORT2

    SELECT likelist=userids

    SORTLIST KEY(8) NAME CONNECTS

    ------------------------------
    Simon Dodge
    ------------------------------



  • 5.  RE: How to send the same CARLa report to: 1- E-mail 2- Dataset

    Posted Tue August 17, 2021 09:01 AM
    Hi Simon! Thanks a lot for the tip, that's definitely a very good thing to remember, saves a lot of time and help to don't forget to put the same data on the other parts of the CARLa.

    Thanks!

    ------------------------------
    Gabriel Vicoso Amaral
    ------------------------------