>> Mr. Natural says, Use the right tool for the job.

Gil,

I agree with the statement, however in this case rexx isn't the right tool.   
Here are a few reasons I can think off

1.  Most shops discourage the use of REXX in production jobs
2.  In this case the exec is simple , however if your exec needs ISPF services 
then running REXX in batch is a pain to set up.
3.  For smaller input rexx might be good, but it is a poor choice to process 
large volumes of data.


I for one prefer using the existing IBM utilities and there are utilities like 
DFSORT (of course I am biased towards it ) which does have plethora of Date 
arithmetic functions.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
abc
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY
  INREC BUILD=(C'get NonMon_DailyExtract_KWT_',
               DATE1-1,
               C'.txt',
               80:X)
/*

Will produce  get NonMon_DailyExtract_KWT_20220621.txt

If you want the date with separators it is quite simple. Use DATE1(.)-1, and it 
will produce get NonMon_DailyExtract_KWT_2022.06.21.txt


Thanks,
Kolusu


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to