IBM Security Z Security

 View Only
  • 1.  Can Carla write results to both Email and a DSN

    Posted Thu December 07, 2023 12:54 PM

    Is it possible to send the output of a single Carla report to both an email and a dsn?

    This is just a simple Carla report to use as an example.  The file REPORT will get allocated but it's empty and the report comes across in email only. 

    Is it possible to write report to both?  

    n type=racf segment=BASE DD=REPORT,   
    tt='List of Ids with a PassPhrase not equal to NONE    ',    

    st='Total = ',                                                                                           
    Empty='None Found'                                                       
     s s=base c=user HAS_PHRASE=YES phrint<>NONE                             
    option smtpclass=C smtpwriter=CSSMTP smtpatsign=@,                       
      outputformat=EMAILDEFAULT,                                             
      mt=&mailto,                                                            
      from=`&mailfrom`                                                       
    sortlist key(8) HAS_PHRASE,                          
    PHRDATE(10,USDATE) PHRASE_EXPIRED('PhrExp',6),                           
    PHRASEINT('PhrInt',6) PHRASEINT_EFFECTIVE('PhrIntEff',9)

    sum count(st) stamp(tt)



    ------------------------------
    Scott Lahner
    ------------------------------


  • 2.  RE: Can Carla write results to both Email and a DSN

    Posted Fri December 08, 2023 03:01 AM
    Edited by Tom Zeehandelaar Fri December 08, 2023 03:25 AM

    Hi Scott,

    according to my knowledge it is not possible to produce a report and an email simultaneously from running a single newlist.

    However, when you assign a name to your newlist and add a second newlist to your CARLa program that refers to the newlist this specification provides both an email and report with identical contents.

    n type=racf segment=BASE DD=REPORT name=pwphrase,       
    tt='List of Ids with a PassPhrase not equal to NONE',   
    st='Total =',                                           
    Empty='None Found'                                      
     s s=base c=user HAS_PHRASE=YES phrint<>NONE            
    option smtpclass=B smtpwriter=CSSMTP smtpatsign=@,      
      outputformat=EMAILDEFAULT,                            
      mt=&mailto,                       
      from=&mailfrom                                
    sortlist key(8) HAS_PHRASE,                             
    PHRDATE(10,USDATE) PHRASE_EXPIRED('PhrExp',6),          
    PHRASEINT('PhrInt',6) PHRASEINT_EFFECTIVE('PhrIntEff',9)
    sum count(st) stamp(tt)                                 
    
    n type=racf segment=BASE dd=ckr1rpt,                    
    tt='List of Ids with a PassPhrase not equal to NONE',   
    st='Total =',                                           
    Empty='None Found'                                      
     s likelist=pwphrase                                    
    sortlist key(8) HAS_PHRASE,                             
    PHRDATE(10,USDATE) PHRASE_EXPIRED('PhrExp',6),          
    PHRASEINT('PhrInt',6) PHRASEINT_EFFECTIVE('PhrIntEff',9)
    sum count(st) stamp(tt)                                 



    ------------------------------
    Tom Zeehandelaar
    z/OS Security Enablement Specialist - zSecure developer
    IBM
    ------------------------------



  • 3.  RE: Can Carla write results to both Email and a DSN

    IBM Champion
    Posted Fri December 08, 2023 04:59 AM

    That's an excellent solution, demonstrating that you can specify OPTION within a NEWLIST block to affect only this (local) report.  An OPTION before the first NEWLIST has GLOBAL scope.

    However, when you specify the SMTPCLASS/WRITER parameters on a NEWLIST or OPTION, the DD is no longer needed, so you could just take it off the 1st NEWLIST and use NEWLIST DD=REPORT for the 2nd report.  That's going to be less confusing than the DD=CKR1RPT.  And SEGMENT=BASE on the NEWLIST is sort of redundant? 

    Also, I wonder if the TT, ST and EMPTY parameters could be moved to a global OPTION.  Just for demonstration purposes, of course.



    ------------------------------
    Rob van Hoboken
    ------------------------------



  • 4.  RE: Can Carla write results to both Email and a DSN

    Posted Fri December 08, 2023 07:23 AM

    Thus, that would mean something along the line of this example:

    option tt='List of Ids with a PassPhrase not equal to NONE',              
           st='Total =',                                                      
           Empty='None Found'                                                 
    n type=racf segment=BASE name=pwphrase                                    
    option smtpclass=B smtpwriter=CSSMTP smtpatsign=@,                        
           outputformat=EMAILDEFAULT,                                         
           mt=&mailto                                    
           from=&mailfrom`                                             
     s s=base c=user HAS_PHRASE=YES phrint<>NONE                              
     sortlist key(8) HAS_PHRASE PHRDATE(10,USDATE) PHRASE_EXPIRED('PhrExp',6),
              PHRASEINT('PhrInt',6) PHRASEINT_EFFECTIVE('PhrIntEff',9)        
     sum count(st) stamp(tt)                                                  
                                                                              
    n type=racf DD=CKREPORT                                                   
     s likelist=pwphrase                                                      
     sortlist key(8) HAS_PHRASE PHRDATE(10,USDATE) PHRASE_EXPIRED('PhrExp',6),
              PHRASEINT('PhrInt',6) PHRASEINT_EFFECTIVE('PhrIntEff',9)        
     sum count(st) stamp(tt)                                                  


    ------------------------------
    Tom Zeehandelaar
    z/OS Security Enablement Specialist - zSecure developer
    IBM
    ------------------------------



  • 5.  RE: Can Carla write results to both Email and a DSN

    Posted Fri December 08, 2023 09:20 AM

    Thanks Rob and Tom. That's kind of what I thought (two newlists).   I do admire that Carla will not generate an email if the report returns zero records, so I typically only use Empty when writing to dsn's.   



    ------------------------------
    Scott Lahner
    ------------------------------