IBM Security Z Security

 View Only
  • 1.  Method to pass results between queries (but not 2-pass)?

    Posted 30 days ago

    Hi Everyone,

    Does anyone know of a method to pass results between two queries that isn't 2-pass CARLa?

    Multiple steps isn't an option because it's for an alert in zAlert.

    Would like to be able to add some information to the output of a TYPE=SMF search via a lookup and then filter those results further.  Haven't had any success with lookups, DEFINEs, etc. in the TYPE=SMF SELECT statement so hoping that passing the results is an option.

    Trying to append a CSDATA field value to the SMF results (this part is working fine):

    NEWLIST TYPE=SMF (NAME=?? DD=??)

    SELECT EVENT=RACINIT(0)

    SORTLIST USERID(8) USERID:$SOMECSDATAFIELD

    And in the same jobstep, read those results into another query where I can filter on the lookup value (this is not working):

    DEFTYPE TYPE=$INPUT

    ALLOC TYPE=$INPUT (first query results, how?)

    DEF $FINDIT(1,CHAR) AS SUBSTR(RECORD,10,1)

    DEF $FULLREC(11,CHAR) AS SUBSTR(RECORD,1,11)

    SELECT $FINDIT='X'

    SORTLIST $FULLREC

    Know that I'd need to identify the results of the first query somehow, but no idea how to pass the results or if it's even possible.

    Thanks for having a look.



    ------------------------------
    Steven Hoover
    ------------------------------


  • 2.  RE: Method to pass results between queries (but not 2-pass)?

    IBM Champion
    Posted 30 days ago
    Edited by Rob van Hoboken 30 days ago

    zSecure Alert already has a 2-pass capability built into the skeletons.  The first pass, the environment pass, is executed once an hour (or whatever you specified as your environment interval).  It typically generates CARLa that is executed in the second pass, the reporting pass.

    For SMF processing, the generated CARLa would contain stub newlists with a select statement that is generated from CKFREEZE or RACF profile information.  The actual alert newlist would refer to the stub using select likelist=stub.  Here is an example of an old APF dataset alert.

    That means, your skeleton could be something like (I leave it up to you to write the SELECT command correctly):

    )CM environment pass
    )SEL &C2PEPASS = Y
    newlist type=racf nopage
      define once(nd) boolean where complex==complex
      define every(nd) count
      select class=user segment=csdata $somecsdata=:x

      summary once,
      "newlist type=smf outlim=0 name=user_x",
    / "select user=(,"

      summary each profile(0) | ","

      summary once,
      ")",
    / "sortlist recno"

    )ENDSEL 

    This generates CARLa code like

    newlist type=smf outlim=0 name=user_x
    select user=(,
    A,
    B,
    C,
    )
    sortlist recno

    As stated, this code is executed in the SMF reporting pass, so it sets up an SMF newlist that selects SMF records for the user IDs with the right CSDATA values.  You use this stub newlist in the skeleton with

    SELECT EVENT=RACINIT(0) likelist=recent likelist=user_x

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



  • 3.  RE: Method to pass results between queries (but not 2-pass)?

    Posted 29 days ago

    Hi Rob,

    Thanks for the quick reply, will give this a shot.



    ------------------------------
    Steven Hoover
    ------------------------------



  • 4.  RE: Method to pass results between queries (but not 2-pass)?

    Posted 28 days ago

    Worked perfectly, thanks very much!



    ------------------------------
    Steven Hoover
    ------------------------------