DATA _NULL_ ;
***** FILE OUTFILE ;
tdy=today();
yyyy = year(tdy);
month=month(tdy);
day = day(tdy);;
FDT = MDY(month,1,yyyy0;
IF MONTH=12 THEN TDT = mdy(12,31,YYYY);
ELSE TDT =
MDY(MONTH+1,1,YYYY)-1;
PUT @02 "EXTRACT SID(FIRA) " FDT mmddyy. " " TDT MMDDYY.
;
PUT @10 'SELECT(30,70,101) TAPEVOLCHG(RELEASE) TODD(SMFOUT).' ;
RUN;
You will need to tweak the format fod FDT and TDT.
Michael
At 12:50 PM 10/15/2025, Steve Beaver wrote:
Does anyone speak SAS?
What I'm attempting to do is COMPUTE the FIRST day of the MONTH FDT and
Compute the LAST day of the month and it hates me
%LET TDY = %SYSFUNC(TODAY(),8.) ;
%LET FDT = %SYSFUNC(PUTN(%SYSFUNC(INTNX(DAY,&TDY,-1),8.),MMDDYY6.)) ;
%LET TDT = %SYSFUNC(PUTN(&TDY,MMDDYY6.)) ;
%LET FDATE = FROM(&FDT 030000) ;
%LET TDATE = TO(&TDT 025959) ;
DATA _NULL_ ;
FILE OUTFILE ;
PUT @02 "EXTRACT SID(FIRA) &FDATE &TDATE" ;
PUT @10 'SELECT(30,70,101) TAPEVOLCHG(RELEASE) TODD(SMFOUT).' ;
RUN;
Any assistance would be appreciated
----------------------------------------------------------------------
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