BookmarkSubscribeRSS Feed

[SAS로 시스템환경 들여다보기] - EG에서 SAS서버의 파일 읽기/쓰기

Started ‎12-31-2020 by
Modified ‎12-31-2020 by
Views 683

아래와 같이 SAS/EnterpriseGuide를 이용해서 SAS서버(Linux) 파일의 내용을 읽고 복사하고 수정할 수 있습니다. 

 

[EG사용자 계정의 .bash_profile 확인하기

 

data _null_;

infile "~/.bash_profile";

input;

put _infile_;

run;

 

(EG로그)


# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

 

 

 [SAS설치경로에 존재하는 "sasenv_local" 파일 확인

 

%let fileloc = %sysget(SASROOT)%STR(/bin/sasenv_local);

data _null_;

infile "&fileloc";

input;

put _infile_;

run;

 

(EG로그)

 

############################################################################

# This file is sourced by the sasenv script in !SASROOT/bin

############################################################################

export LANG=ko_KR.euckr

export ORACLE_BASE=/sas/oracle/app/oracle

 

 

 [파일 복사하기

 

filename in "~/.bash_profile";

filename out "~/.bash_profile.bak";

 

data _null_;

infile in;

file out;

input;

put _infile_;

run;

 

data _null_;

infile out;

input;

put _infile_;

run;

 

(EG로그)

 

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

 

 

 [파일 수정하기

 

filename in "~/.bash_profile.bak";

filename out "~/.bash_profile.bak2";

 

data _null_;

infile in;

file out;

input;

put _infile_;

if _infile_="fi";

put "# Copy test!!";

run;

 

data _null_;

infile out;

input;

put _infile_;

run;

 

 

(EG로그)

 

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

       . ~/.bashrc

fi

# Copy test!!

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

 

Version history
Last update:
‎12-31-2020 01:45 AM
Updated by:
Contributors

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Article Tags