BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi all

I have SEG 2.1 on my Windows 2000 and SAS 9.1.3 on a UNIX server.
We have 4 users working on same data with same macros and one file format.sas which contains all our formats.
We have a lot of trouble with the formats. Either the format is not used in our programs, or bad formats names are used.

Below is a part of the file SEGautostart.sas. This is a file automatically launched at SEG start :
%let formlib =&root/saslib/format/saseg;
libname formlib "/project/poolrecht/pks/saslib/format/saseg";
libname sasprog "/project/poolrecht/pks/sasprog";
options fmtsearch=(formlib, saslib, library);
options gwindow linesize=88 ps=57 MAUTOSOURCE SASAUTOS=(sasautos, "/project/poolrecht/pks/sasprog");
%include '/project/poolrecht/pks/sasprog/formate.sas';

Is there a problem ? The formats are recreated each time a new instance of SEG is started...

Any clue ?

Thanks in advance

Christophe Paratte
www.paratte.net
4 REPLIES 4
Olivier
Pyrite | Level 9
I was wondering about this statement :

%include '/project/poolrecht/pks/sasprog/formate.sas';

Is it the "format.sas" that you mentionned to contain the entire Proc Format definition ? If so, your %include statement DOES recreate formats catalog each and every time EG is launched.
Assuming I am not misunderstanding your needs neither your environment, maybe you'd better :
1) execute ONCE the whole Proc Format thing in an EG session, checking that
PROC FORMAT LIB = formlib ;
for the formats to be stored in a permanent catalog at the right place.

2) comment out the %include statement, and stick to the
OPTIONS FMTSEARCH = (formlib saslib library work) ;
statement to do the fiding formats job. I suggest you add the Work library to the Fmtsearch list for users to create and use temporary formats in addition to "regular" ones.

Does this help you in any way ?
deleted_user
Not applicable
Thank you Olivier !

I commented out this line (%include...) and it seems to work better.

Christophe Paratte
Cynthia_sas
SAS Super FREQ
In addition to Olivier's suggestions, I am wondering about the %let statement for formlib with &root. Where do you subsequently use &formlib???? It is NOT in the libname statement for formlib library reference in your example.

I would usually expect to see this:
[pre]
%let formlib =&root/saslib/format/saseg;
libname formlib "&formlib";
[/pre]

...assuming that &root was set in the config file or was an environment variable that was already set.

cynthia
deleted_user
Not applicable
Thank you Cynthia !

Yes I know 😞 I am using a file I did not create and I am new to SAS.
I will make some cleaning !

Christophe Paratte

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 652 views
  • 0 likes
  • 3 in conversation