BookmarkSubscribeRSS Feed
Eileen1496
Obsidian | Level 7

Hi all,

 

I notice a weird phenomenon when I batch SAS codes to run overnight (sequentially). Before everything works fine, when I wake up, all SAS codes inside finish running. However, these days I found the batch stuck at the first code file without processing (not even give me any error). The most weird thing is the codes in the batch file are also the same, I'm just re-running them. And if I open each code and run them in interactive mode in SAS manually, they works. So I don't think it is the code's problem.

So I have to terminate the batch run, but I cannot close them by clicking close bottom directly, so I use CMD TASKKILL to kill all SAS process at once, and it always leave some ghost SAS process that I cannot kill. 

 

Do you know what might be the reason causing this? could it be because I did not delete the log and lst files from previous trial?

 

Thank you!

6 REPLIES 6
LinusH
Tourmaline | Level 20

Even if there is no SAS logs, there should be something logged somewhere...have you checked Windows event log?

Data never sleeps
Eileen1496
Obsidian | Level 7

Hi, there is sas log! But it does not print any error, it just stop in the middle. So I went to check the code in the interactive mode, but everything works fine.

SASKiwi
PROC Star

What step does it get "stuck" on? Can you please post a complete log of that step. Are you running this on a PC or a remote SAS server? 

Eileen1496
Obsidian | Level 7
1                                                          The SAS System                               18:36 Tuesday, April 9, 2024

NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened instead.
NOTE: All registry changes will be lost at the end of the session.

WARNING: Unable to copy SASUSER registry to WORK registry. Because of this, you will not see registry customizations during this 
         session.
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.
NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) Proprietary Software 9.4 (TS1M6) 
      Licensed to UNIVERSITY OF MARYLAND - T&R SFA, Site 70210321.
NOTE: This session is executing on the X64_SRV19  platform.



NOTE: Analytical products:
      
      SAS/STAT 15.1
      SAS/ETS 15.1
      SAS/IML 15.1
      SAS/QC 15.1

NOTE: Additional host information:

 X64_SRV19 WIN 10.0.20348  Server

NOTE: SAS initialization used:
      real time           0.46 seconds
      cpu time            0.37 seconds
      
1          /* this file takes out those who graduated from their highest degree in 2000*/
2          libname revelio "C:\Users\cmlei\Box\box-group-smith-finance-resesarch\revelio_data";
NOTE: Libref REVELIO was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\cmlei\Box\box-group-smith-finance-resesarch\revelio_data
3          libname hdrg2000 "D:\ralymax_cm\data\cleaned\hdg_2000_panel";
NOTE: Libref HDRG2000 was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: D:\ralymax_cm\data\cleaned\hdg_2000_panel
4          libname temp "D:\ralymax_cm\temp\hdg_2000_panel";
NOTE: Libref TEMP was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: D:\ralymax_cm\temp\hdg_2000_panel
5          libname linkedin "D:\ralymax_cm\data\raw\inidvidual_position_raw";
NOTE: Libref LINKEDIN was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: D:\ralymax_cm\data\raw\inidvidual_position_raw
6          
7          * change to the fast drive;
8          data _null_;
9          	rc=dlgcdir("C:\ralymax");
10             put rc=;
11         run;
2                                        The SAS System              18:36 Tuesday, April 9, 2024


NOTE: The current working directory is now "C:\ralymax".
rc=0
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

12         
13         /************** ma group **************/
14         * view vars we have;
15         proc contents data = hdrg2000.edu_uid_hgrd_2000_ma;
16         run;

NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.13 seconds
      cpu time            0.01 seconds
      
NOTE: The PROCEDURE CONTENTS printed page 1.

17         
18         * take out their complete career history;
19         data temp.user_ma;
20         set hdrg2000.edu_uid_hgrd_2000_ma (keep = user_id);
21         run;

NOTE: There were 229103 observations read from the data set HDRG2000.EDU_UID_HGRD_2000_MA.
NOTE: The data set TEMP.USER_MA has 229103 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.41 seconds
      cpu time            0.01 seconds
      

22         
23         proc sort data = temp.user_ma nodupkey dupout = dups;
24         by user_id;
25         run;

NOTE: There were 229103 observations read from the data set TEMP.USER_MA.
NOTE: 1932 observations with duplicate key values were deleted.
NOTE: The data set WORK.DUPS has 1932 observations and 1 variables.
NOTE: The data set TEMP.USER_MA has 227171 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.04 seconds
      cpu time            0.06 seconds
      

This is what shown in log, no error printed, just stop here and not going forward.

I'm running on a server through remote connection from my desktop. Things work fine if I run directly in sas interactive mode, but stuck when i submit multiple codes using batch sequentially

LinusH
Tourmaline | Level 20

Make sure you have set LOGPARM=“WRITE=IMMEDIATE” system option.

And again, check Windows event logs as well.

Data never sleeps
Eileen1496
Obsidian | Level 7

I don't have this line, but before it works fine. What is the function of this line? without it, the program may still run but not write log?

Can you point to me which windows event I should look for? Thanks a lot!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 850 views
  • 2 likes
  • 3 in conversation