10-15-2010 07:27 PM
10-16-2010 01:49 AM
10-21-2010 04:09 PM
12-13-2010 10:25 AM
08-02-2011 07:37 AM
I haven't found an elegant solution, but I'm using this code in Enterprise Guide:
*-- start code --;
length WORD $8;
do j = 1 to 8;
WORD = byte(int(65 + ranuni(0)*26)) || WORD;
call symput("mylibrary", WORD);
libname &mylibrary 'physical_path_to_library';
*-- end code --;
This assign every time a different random LIBREF to you library.
08-02-2011 08:21 AM
this seems a very parallel thread.
See my response in the other, at
When (if) this problem occurs in enterprise guide, instead of puting code in the autexec, place your "one-time-code" at the code box in
menu: tools/options/sas programs/"submit code when server is connected"/edit
08-02-2011 10:13 AM
Are you trying to point the libref to a different location? Or are you just re-running the code that assigned the libref?
If the latter then test first before defining the library. Here is can example command using the IFC and LIBREF functions to conditionally issue the libname statement only when the libref does not already exist.
4 %sysfunc(ifc(%sysfunc(libref(macros)),libname macros '~/temp',));
NOTE: Libref MACROS was successfully assigned as follows:
Physical Name: /home/abernt/temp
5 %sysfunc(ifc(%sysfunc(libref(macros)),libname macros '~/temp',));
The other thing to consider is changing the SASMSTORE option before trying to modify the libref.