IBM Security Z Security

 View Only
Expand all | Collapse all

CARLa: How to send the same report to two different outputs

  • 1.  CARLa: How to send the same report to two different outputs

    Posted Fri June 25, 2021 11:22 AM
    A customer wants to direct a report to two different outputs, for instance, two defined DDs in JCL. How to do that? 
    For instance: 

    NEWLIST TYPE=RACF

    SELECT CLASS=GROUP SEGMENT=BASE

    SORTLIST KEY(8) CONNECTS CREADATE

    I want to send the output, the same report,  to two different DDs, in order to avoid zSecure to read the input files twice.

    Any suggestion? Thanks!



    ------------------------------
    Eugenio Fernandes
    IBM
    Sao Paulo
    55 11 5042-0804
    ------------------------------


  • 2.  RE: CARLa: How to send the same report to two different outputs

    Posted Fri June 25, 2021 11:52 AM
    Hi Eugenio,

    You can send a report to a particular output file by using the DD= keyword on the NEWLIST statement.

    So, you could make two copies of the input report and put different DD= specifications on the two copies.

    Assuming that the report does not contain identifiers that cannot be duplicated (like a NAME= on a NEWLIST statement), you could also put the report without a DD= keyword into a member that you imbed twice while in the context of a particular DD= default specification, like:

    option dd=DDNAME1
    imbed member=MYRPT
    option dd=DDNAME2
    imbed member=MYRPT

    In both cases, for the engine these would be different reports (that would just happen to be the same), so storage use for storing the intermediate results would increase, but the RACF database would only be read only once[1] to generate all TYPE=RACF reports in the run.

    Regards,

    Jeroen

    [1] Well.. some reports always need more than a single pass. But in any case, the amount of needed reading would not increase.

    ------------------------------
    Jeroen Tiggelman
    Software Development and Level 3 Support Manager IBM Security zSecure Suite
    IBM
    Delft
    ------------------------------



  • 3.  RE: CARLa: How to send the same report to two different outputs

    Posted Tue June 29, 2021 09:59 AM
    Hi Eugenio..  KEy thing Jeroen mentioned is that multiple type=RACF queries in same step does not increase the I/O to the RACF database. 
    SO this would do what your customer needs, and NOT increase I/O to RACF db

    NEWLIST TYPE=RACF DD=REPORT1 NAME=connects
    SELECT CLASS=GROUP SEGMENT=BASE
    SORTLIST KEY(8) CONNECTS CREADATE

    NEWLIST TYPE=RACF DD=REPORT2
    SELECT likelist=connects
    SORTLIST KEY(8) CONNECTS CREADATE

    It may not be as elegant as Jeroens solution, but it might be clearer for the customer to understand. (jeroens is safer because in my example, if a future person adjusts one of the sortlist statements and not the other, you can get different results).
    BTW..  You don't say what the customer is planning to do with this data.. IS it going to be machine readable by another program ?.. If so, then you may want to consider this instead:- compare the output in REPORT1 vs REPORT2
    a) Nopage removes page headings
    b) retain causes single fields to be printed on subsequent lines for same profile instead of blanks

    NEWLIST TYPE=RACF DD=REPORT1 NAME=connects
    SELECT CLASS=GROUP SEGMENT=BASE
    SORTLIST KEY(8) CONNECTS CREADATE

    NEWLIST TYPE=RACF DD=REPORT2  NOPAGE  RETAIN
    SELECT likelist=connects
    SORTLIST KEY(8) CONNECTS CREADATE

    Running multiple queries in the same step should noticeably reduce both total I/O & total CPU when compared to running multiple steps, 1 query per step.
    This is a recognizable benefit from zSecure .. Input files are not read repeatedly for each query, but rather read once and data needed stored in memory.


    (there is a caveat here.. some queries may perform a two pass read of RACF, they will require you to read an UNLOAD)

    Regards.  Simon

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