BookmarkSubscribeRSS Feed
Andre
Obsidian | Level 7

Hi,

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' ;

run;

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.;

run;

proc options group=envfiles;run;

there are no problems

Group=ENVFILES

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\autoexec.sas

                   Identifies AUTOEXEC files used during initialization

FMTSEARCH=(A.FSEX WORK LIBRARY)

                   List of catalogs to search for formats and informats

INSERT=(fmtsearch=a.fsex)

                   Insert at the beginning of an option value

BUT

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

http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/n0jvezaeilaok4n1jqkv8t28b3o0....

http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/p1q9ay0ai0h2ein1n68qxomn...

  i am misslucking the functionning  following those changes

i have created a sas program  " lib.sas" 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 autoexec.sas  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)

-APPEND AUTOEXEC  "d:\lib.sas"

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:\lib.sas"

-APPEND AUTOEXEC SASLIBN

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\autoexec.sas.

NOTE: AUTOEXEC processing completed.

1

2

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é.

TIA

Andre

i must add that if i suppress -autoexec "d:\My SAS Files\9.3\autoexec.sas" (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:\lib.sas"     the substitution of autoexec.sas by  lib.sas

5 REPLIES 5
Andre
Obsidian | Level 7

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\autoexec.sas" "d:\lib.sas")

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

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

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 autoexec.sas 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\autoexec.sas.

NOTE: AUTOEXEC source line.

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

                    ------

               11

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 autoexec.sas !

Andre

Quentin
Super User

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?

-Q.

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Andre
Obsidian | Level 7

Quentin,

filename saslibn "d:\";   or filename saslibn "d:\lib.sas";

options append=(autoexec=saslibn);

-are rejected in an ordinary program

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

                         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\autoexec.sas" "d:\lib.sas")

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

Andre

Quentin
Super User

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!

--Q.

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Andre
Obsidian | Level 7

Quentin

inserting this in the sasv9.cfg

-SET saslibn "d:\lib.sas"

-APPEND AUTOEXEC saslibn

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

ERROR: NOAUTOEXEC option.

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

Andre

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1843 views
  • 0 likes
  • 2 in conversation