Hi Kolusu, Beautiful, elegant and delivers the intended result. Many thanks Best wishes Jack
On Wed, 20 Mar 2024 at 16:59, Sri Hari Kolusu <[email protected]> wrote: > >> What I am trying to achieve is simple. I want to select, using DCOLLECT > TYPE D records, files that have been created after the last IPL and ten > days before today: > > Jack, > > As I showed you earlier , you can use the SDSF REXX interface and get the > IPLINFO and we can parse to create a symbol with that. > > So please add the following > > // SET DCOLSYM=Your.dcollect.symbols.pdsname > // SET DCOLINP=Your.dcollect.output > > Change the SYSTSPRT dd in step SDSFREXX to the following. > > //SYSTSPRT DD DSN=&&INFO,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE), > // RECFM=FB,LRECL=133,DSORG=PS > > > The IPLDATE on my test systems have the format MM/DD/CCYY. I am > converting the IPLDATE to Julian format as a SYMBOL so that you can compare > it with create date on type D record. You concatenate this newly created > symbol dataset to your existing symbols. > > Note : If your date format is different then we need a slight change in > the control cards for extracting and converting the date. > > > //********************************************************** > //* Extract the IPL date and convert it to Julian format * > //* so that we can use it for comparing it against the * > //* dataset create date which has the CCYYDDDF format * > //********************************************************** > //EIPLDATE EXEC PGM=SORT,COND=(0,LT) > //SYSOUT DD SYSOUT=* > //SORTIN DD DISP=(OLD,DELETE),DSN=&&INFO > //SORTOUT DD DSN=&&S,DISP=(,PASS),SPACE=(TRK,(1,0)) > //SYSIN DD * > OPTION COPY,NULLOUT=RC4,STOPAFT=1 > > INCLUDE COND=(45,12,SS,EQ,C'SYSTEM IPLED') > > INREC PARSE=(%01=(STARTAFT=C'ON ',ENDBEFR=C' ',FIXLEN=10)) > BUILD=(%01) > > OUTREC OVERLAY=(15:01,10,UFF,M11,LENGTH=8, > 25:15,08,Y4W,TOJUL=Y4T) > > OUTFIL BUILD=(C'IPLDATE,',25,07,80:X) > /* > //********************************************************** > //* Extract the Type D DCOLLECT records that are created * > //* 10 days prior to current date and greater than or equal* > //* the IPL date. * > //********************************************************** > //GETTYPD EXEC PGM=SORT,COND=(0,LT) > //SYSOUT DD SYSOUT=* > //SYMNOUT DD SYSOUT=* > //SYMNAMES DD DISP=SHR,DSN=&DCOLSYM(HEADER) > // DD DISP=SHR,DSN=&DCOLSYM(TYPED) > // DD DISP=(OLD,DELETE),DSN=&&S > //SORTIN DD DISP=SHR,DSN=&DCOLINP > //SORTOUT DD SYSOUT=* > //SYSIN DD * > OPTION COPY > INCLUDE COND=(DCURCTYP,EQ,DCUDATAT,AND, * Type = Data type > DCDCREDT,LT,DATE3P-10,AND, * Created < curr date - 10 > DCDCREDT,GE,IPLDATE) * Created >= IPLDATE > /* > > > Further if you have any questions, please let me know > > Thanks, > Kolusu > DFSORT Development > IBM Corporation > > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
