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