04-06-2017 09:50 AM
is it possible to override system date in SAS Program. I have a batch job that I need to re-run.
I need to ensure that system date is read as 1st April 2017 and not actual today's date.
04-06-2017 09:59 AM
Well, technically it possible to get your IT to change the system clock. I would however find that to be a major breach of the infrastructure. The current date time is there for a reason, if you want to put a specific date in a document or something then put that in, but don't refer to it as "system date" then.
04-06-2017 10:16 AM
Is your program using any variable to hold the date of interest? It may be that you need to modify the program as "one time" job to have the date literal for the day of interest in place of whatever may be looking at system dates or date functions such as today().
Or show the code that uses a date value to see what suggestions may be available.
04-06-2017 10:46 AM
The IT people will have your hide hanging over their door, as a reminder for others. And do so for a reason. Actually not one reason, but many.
If you need to re-run a batch job, it should correctly record today's date as the date of the rerun. Job specific date values (eg the month for which an accounting job runs) should NEVER be taken from the system date, but be supplied to the job from the scheduler.
Our end-of-month batch jobs run over the course of several days, but all have the same "execution date". Rerunning them correctly is as easy as editing a script file and running that. And the logs will fatefully capture that a certain job was rerun for a certain execution date on a later day; this way we hold everything accountable, as mandated by law(!).