BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
illmatic
Quartz | Level 8

Hi all,

 

I'm wondering if this is a training issue for a bug.

 

Whenever I schedule a SAS program to run, let's say everyday at 6 AM and it is stored in let's say /sas/usr/scheduled/daily.sas

 

If I need to make a change to daily.sas, i have noticed that if I do no schedule a new job and delete the old job, the old job will run the older version of daily.sas

 

Even when I am unable to see the old version, it is saved somewhere and being referenced by the job. 

 

Is this in the way I am scheduling my jobs? Ideally, I'd like to schedule code to run and just update the sas program whenever needed without having to reschedule the job.

 

Kind of like how I did with base SAS awhile back where I just had windows task scheduler run the sas program from a location on my drive and I could just update the sas code referenced by the batch file whenever needed.

 

Thanks in advance for your input!

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

It sounds like the job you schedule needs to reference the file you want to update.

 

If Viya support %INCLUDE (or the equivalent) then create a program that includes the actual file with the real code. And then schedule that little program instead.

View solution in original post

2 REPLIES 2
gwootton
SAS Super FREQ
When you create a job in Viya a copy of the code is written to the job definition, it is not linked back to the source program. If you make any changes to the code you will need to delete the old job and create a new one to schedule.
--
Greg Wootton | Principal Systems Technical Support Engineer
Tom
Super User Tom
Super User

It sounds like the job you schedule needs to reference the file you want to update.

 

If Viya support %INCLUDE (or the equivalent) then create a program that includes the actual file with the real code. And then schedule that little program instead.