Architecting, installing and maintaining your SAS environment

autoexec insert or append in 9.3

Super Contributor
Posts: 273

autoexec insert or append in 9.3


Reading sas documentation, i see that there are new system options  APPEND or INSERT

tested upon the fmtsearch functionning already under 9.2.3

libname a "d:\notes\test";

proc format ;

value rage low - 11 ='en avance' 12-14= 'jeune' 15-16 ='en retard' ;


proc format library=a.fsex;

value $sex "M"= "hommes" "F"="femmes";

options insert=(fmtsearch=a.fsex);

proc freq data=sashelp.class;

tables age * sex;

format sex $sex. age rage.;


proc options group=envfiles;run;

there are no problems


APPEND=           Append at the end of the option value

APPLETLOC=C:\Program Files\SASHome\SASGraphJavaApplets\9.3

                   Location of Java applets

AUTOEXEC=d:\My SAS Files\9.3\

                   Identifies AUTOEXEC files used during initialization


                   List of catalogs to search for formats and informats


                   Insert at the beginning of an option value


when i tried to apply this to the AUTOEXEC   as mentionned as possible

  i am misslucking the functionning  following those changes

i have created a sas program  "" at root of D:\  with the only line

                        libname a "d:\notes\test";

in order to   "ADD" if i may say a second kind of  to the existing one

with the goal adding a sas pgm with one or many libnames 'at start of sas'!

so i have written this last line in my sas9.cfg

(following the description of the documentation presenting only a fmtsearch= sample but pretending autoexec is allowed)


and at restart the original program  (with a  neutralized libname line of course)

shows an error as  libref a is not existing  ===>

symtom that the second APPENDing operation was not successfull.

Has somebody of you already tested this kind of new starting mode of sas 9.3.0

this remain true with

-SET  SASLIBN  "d:\"


NOTE: L'initialisation de SAS used:

      real time           1.29 secondes

      cpu time            0.95 secondes

NOTE: AUTOEXEC processing beginning; file is d:\My SAS Files\9.3\

NOTE: AUTOEXEC processing completed.



3    proc format ;

4    value rage low - 11 ='en avance' 12-14= 'jeune' 15-16 ='en retard' ;

NOTE: Format RAGE has been output.

5    run;

NOTE: PROCEDURE FORMAT used (Total process time):

      real time           0.03 secondes

      cpu time            0.01 secondes

6    proc format library=a.fsex;

ERROR: Nom A non attribué.



i must add that if i suppress -autoexec "d:\My SAS Files\9.3\" (and addd -verbose) the resuts are -for my try with saslibn   a severe error with the saslibn substitution but i have perhaps made an error -for my try  with  -insert autoexec "d:\"     the substitution of by

Super Contributor
Posts: 273

Re: autoexec insert or append in 9.3

Today trying again i have found some tricks

If i set this in the sasv9.cfg file

-INSERT AUTOEXEC ("d:\My SAS Files\9.3\" "d:\")

without an icon with an explicit  -autoexec "d:\My SAS Files\"
the results is ok

NOTE: AUTOEXEC processing beginning; file is ('d:\My SAS Files\9.3\' 'd:\').

NOTE: Libref A was successfully assigned as follows:

      Engine:        V9

      Physical Name: d:\notes\test

NOTE: AUTOEXEC processing completed.

If i put a options statement using append in the file

without any added line in the sasv9.cfg , the statement is rejected as invalid or  warning and the libref not created

NOTE: AUTOEXEC processing beginning; file is d:\My SAS Files\9.3\

NOTE: AUTOEXEC source line.

8      options append=(autoexec=("d:\"));



NOTE: AUTOEXEC processing completed.

this remain true with two files or with a insert= alternative.

My conclusion is that you are only allowed to add lines to the sasv9.cfg

the difference between -INSERT  or  -APPEND  autoexec ...

are not clear  but you may have  a list of sas programs that are accepted all together as

an entire !


Posts: 1,396

Re: autoexec insert or append in 9.3

HI Andre,

The auto exec option wants a FILEREF pointing to a directory of code,, not a libref. Odd but true. if you change to using a FILEREF, does that help?


Super Contributor
Posts: 273

Re: autoexec insert or append in 9.3


filename saslibn "d:\";   or filename saslibn "d:\";

options append=(autoexec=saslibn);

-are rejected in an ordinary program

-are maked by  a green error 11 if inserted in an ordinary

                         the 11 apply to the words  insert= or append= 

the only way that is working is in the sasv9.cfg  with a list of .sas files like in

-INSERT AUTOEXEC ("d:\My SAS Files\9.3\" "d:\")

so where did you see that a fileref was neccessary? on the two referenced pages?


Posts: 1,396

Re: autoexec insert or append in 9.3

My Apologies Andre,

I completely misread your question.  And in a haze this morning mistook your question about AUTOEXEC, thinking it was about autocall libraries (SASAUTOS).  Sorry for the confusion. That is my punishment for reading SAS posts before being fully awake!


Super Contributor
Posts: 273

Re: autoexec insert or append in 9.3


inserting this in the sasv9.cfg

-SET saslibn "d:\"


provoke a fail at start of sas with the message

Physical file saslibn does not exist  AND SAS  is searching  in the  -SASINITIALFOLDER "d:\My SAS Files\9.3"  !

ERROR: Le fichier physique n'existe pas, d:\My SAS Files\9.3\saslibn. 

ERROR: The AUTOEXEC file d:\My SAS Files\9.3\saslibn cannot be accessed. The

ERROR: SAS System will not be invoked. AUTOEXEC can be overridden with the


so i remark that SAS needs a real existing file name like !


Ask a Question
Discussion stats
  • 5 replies
  • 2 in conversation