IBM Security Z Security

Security for Z

Join this online user group to communicate across Z Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  SUMMARY by MONTH value

    Posted Thu November 18, 2021 03:53 PM

    I would like to run a summary on a date field in order of the MONTH value, thereby ignoring DAY and YEAR values.


    #ZSecurity
    #SupportMigration
    #Support


  • 2.  RE: SUMMARY by MONTH value
    Best Answer

    Posted Thu November 18, 2021 04:20 PM

    Hello Francis,

    The CARLa Command Reference describes the supported date output formats in the topic titled:

    Date output formats: Formatting date field output for different locales and standards

    and there you can see that using usdate format with a length of 2 isolates the month.

    You could therefore try something like:

    summary date(usdate,2)

    Regards, Mike


    #ZSecurity
    #SupportMigration
    #Support


  • 3.  RE: SUMMARY by MONTH value
    Best Answer

    Posted Thu November 18, 2021 04:47 PM

    Hi Mike, thanks for your quick response.


    I still get multiple entries when I expect only 2 entries,

    example:


    summary  phrase_expire_date(usdate,2)


    Ph  Count

    11    2

    11    2

    11    55

    11    26

    12    38

    12    32

    12    3

    12    1

    12    79





    #ZSecurity
    #Support
    #SupportMigration


  • 4.  RE: SUMMARY by MONTH value
    Best Answer

    Posted Fri November 19, 2021 09:54 AM

    This issue can be closed, as I managed to create the report by MONTH, by executing 4 NEWLISTs with the following SELECT criteria:

    PHRASE_EXPIRE_DATE>=2021-11-01 PHRASE_EXPIRE_DATE<=2021-11-30

    PHRASE_EXPIRE_DATE>=2021-12-01 PHRASE_EXPIRE_DATE<=2021-12-31

    PHRASE_EXPIRE_DATE>=2022-01-01 PHRASE_EXPIRE_DATE<=2022-01-31

    PHRASE_EXPIRE_DATE>=2022-02-01 PHRASE_EXPIRE_DATE<=2022-02-28

    report:

    Records Title

    243 November 2021

    904 December 2021

    485 January 2022

    595 February 2022


    #SupportMigration
    #ZSecurity
    #Support


  • 5.  RE: SUMMARY by MONTH value
    Best Answer

    Posted Fri November 19, 2021 10:21 AM

    Hi Francis,

    Good to hear you've achieved your goal.

    There's a thread about the challenges with working with the various date formats in the IBM Security Z Security community where Rob van Hoboken made some useful comments :


    https://community.ibm.com/community/user/security/communities/community-home/digestviewer/viewthread?MessageKey=69a57c47-4fce-4a91-bbe3-aed919c756e8&CommunityKey=44eb7c0d-9bc2-419b-9158-ad693e734065&tab=digestviewer#bm69a57c47-4fce-4a91-bbe3-aed919c756e8


    In this case, one of my colleagues suggested another option, using an intermediate work data set to store phrase expiration months might be of interest to you.


    //JOBNAME JOB                                        <- add valid jobcard here!

    //GETDATES EXEC PGM=CKRCARLA,REGION=64M                               

    //STEPLIB DD DISP=SHR,DSN=CONSUL.CKR250.GA.SCKRLOAD  <- provide correct LOAD lib name               

    //SYSPRINT DD SYSOUT=*                                                

    //EXPDATES DD DISP=(NEW,PASS),SPACE=(TRK,10),DSN=&&DATES,             

    //           RECFM=VB,LRECL=100                                      

    //SYSIN   DD *                                                       


    newlist type=racf nopage dd=expdates                                  

     select exists(phrase_expire_date)                                    

     sortlist phrase_expire_date(usdate,2)                                


    //STEP2   EXEC PGM=CKRCARLA,REGION=64M                               

    //STEPLIB DD DISP=SHR,DSN=CONSUL.CKR250.GA.SCKRLOAD   <- provide correct LOAD lib name                 

    //EXPDATES DD DISP=(OLD,PASS),DSN=&&DATES                             

    //SYSPRINT DD SYSOUT=*                                                

    //REPORT  DD SYSOUT=*                                                

    //SYSIN   DD *                                                       


    deftype type=$dates                                                   

    alloc type=$dates dd=expdates                                        

    define type=$dates $phexpmon(2,"MM") as substr(record,1,2)            


    newlist type=$dates dd=report,                                        

     tt="Password phrase expiration month summary"                        

     summary $phexpmon count(5)


    #Support
    #ZSecurity
    #SupportMigration


  • 6.  RE: SUMMARY by MONTH value
    Best Answer

    Posted Mon November 22, 2021 09:47 PM

    Hi Mike, I tested the sample you provided and it works fine.

    Pass my appreciation to your colleague.


    regards Francis


    #SupportMigration
    #ZSecurity
    #Support