Hi Leonid,

Similar problems spawn similar solutions around the world. I wasn't aware of the permission option. Thanks.
In 2006 I created a similar SAS macro which would a) write a .sh script b) create the log _.log. and c) email the submitting user the log on completion. In this way the script contains the date context of the program (could be daily, weekly or monthly) and completion status.
Combining this with a 'master' sas program running continuously every 5min a SAS developer with little experience can create a fully functional batch schedule with inter-dependencies written completely in SAS code. Who would think 14 years later it runs multiple organisations entire SAS batches. I've expanded it to allow SAS GRID script creation when a Grid queue is specified.

Scripting really is something mechanical which should rarely be done by hand.