Published on :
Général CREATION_INTERNE

Sans titre

This code is also available in: Deutsch Español Français
Data Analysis

Type : CREATION_INTERNE


The script does not read external data. It interacts with the local file system of the SAS session (WORK directory).

1 Code Block
DATA STEP
Explanation :
Execution of system functions (DCREATE, LIBNAME, LIBREF) to dynamically manage the physical location and assignment of the library.
Copied!
1DATA _null_;
2 LENGTH rc0 $ 32767 rc1 rc2 8;
3 lib = "myLibB";
4 rc0 = DCREATE(lib, "%sysfunc(pathname(work))/");
5 put rc0 = ;
6 rc1 = LIBNAME(lib, "%sysfunc(pathname(work))/" !! lib, "BASE");
7 rc2 = LIBREF (lib);
8 IF rc2 NE 0 THEN
9 rc1 = LIBNAME(lib, "%sysfunc(pathname(work))", "BASE");
10RUN;
2 Code Block
LIBNAME
Explanation :
Displays detailed information for the 'myLibB' library in the log to verify assignment.
Copied!
1LIBNAME myLibB LIST;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.