robert fuschetto Posted July 16, 2021 Posted July 16, 2021 I know I did this once but cannot find the fex. I have a WHERE statement that should run every month EXCEPT for JULY. In July the WHERE is different. I seem to recall having some of code in the fex: TABLE FILE xyz . . . BY period . . . -IF MONTH = July Where xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -GOTO CONTINUE IF MONTH <> JUL THEN Where bbbbbbbbbbbbbbbbbbbbbbbbbbb -GOT TO CONTINUE . . -CONTINUE . . . How do I evaluate the current Month and what is the syntax Thanks!
David Beagan Posted July 16, 2021 Posted July 16, 2021 Are you comparing against a date field TABLE FILE something ... WHERE Date_YYMD LT DTRUNC('&DATEYYMD',MONTH); ... END Which would remove all dates for current month, July-2021 if you dont have future dates in August-2021, etc.
robert fuschetto Posted July 16, 2021 Author Posted July 16, 2021 no, its not based on data but based on TODAYS date. Since today is July 16, the month is JULY I would to execute WHERE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx in the above.
David Beagan Posted July 16, 2021 Posted July 16, 2021 One way would be this: -IF &DATEM EQ '07' THEN GOTO July ELSE GOTO NotJuly; -July -TYPE Processing for July. -GOTO End07 -NotJuly -TYPE Processing non-July months. -End07
David Beagan Posted July 16, 2021 Posted July 16, 2021 Or you could: -IF &DATEMtr EQ 'July' THEN GOTO July ELSE GOTO NotJuly;
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now