사이트맵  |  Contact Us
 
홈 > SAS Stories > SAS 활용 노하우
&SYSJOBID 를 이용하면 SAS 작업의 process id 를 알아 내실 수 있답니다. 2010.06.23
MYSAS 5047 0
http://www.mysas.co.kr/sas_club/d_freeboard.asp?b_no=1423&gotopage=6&con=subject&keyword=&cmd=content&bd_no=04&gubun=

&SYSJOBID 를 이용하면 SAS 작업의 process id 를 알아 내실 수 있답니다.

 You can use &SYSJOBID to get the Process ID (PID) of SAS tasks running on UNIX and Linux servers. For example, this allows you to correlate the PID of a particular SAS batch task with UNIX/Linux system performance information.

Here is the code that I use, ripped from the heart of one of my SAS/Connect programs:

data _null_;
pid     = &SYSJOBID;
put '************************************************************************';
put '*   Attention: The Process ID (PID) of this SAS/Unix Session is: ' pid '*';
put '*                                                                      *';
put '*   Attention: The Process ID (PID) of this SAS/Unix Session is: ' pid '*';
put '*                                                                      *';
put '*   Attention: The Process ID (PID) of this SAS/Unix Session is: ' pid '*';
put '*                                                                      *';
put '************************************************************************';
put '_';
run;

This code produced the following, just now, when running SAS/Connect on a Linux server:

1    data _null_;
2
3    pid     = &SYSJOBID;
4
5    put '************************************************************************';
6    put '*   Attention: The Process ID (PID) of this SAS/Unix Session is: ' pid '*';
7    put '*                                                                      *';
8    put '*   Attention: The Process ID (PID) of this SAS/Unix Session is: ' pid '*';
9    put '*                                                                      *';
10   put '*   Attention: The Process ID (PID) of this SAS/Unix Session is: ' pid '*';
11   put '*                                                                      *';
12   put '************************************************************************';
13   put '_';
14
15   run;

************************************************************************
*   Attention: The Process ID (PID) of this SAS/Unix Session is: 31037 *
*                                                                      *
*   Attention: The Process ID (PID) of this SAS/Unix Session is: 31037 *
*                                                                      *
*   Attention: The Process ID (PID) of this SAS/Unix Session is: 31037 *
*                                                                      *
************************************************************************
_
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

 

 
 
휴대폰 번호
휴대폰 인증번호
 
 오늘의 팁 7/15 SAS에서 AUC(Area Under the Curve)와 Wilcoxon Rank Sums 더 정확히 계산하기
 특정 디렉토리 밑에 있는 모든 sas프로그램을 수행해야 할때