Problem Note 46767: A loop occurs upon termination of SASĀ® 9.3 if autocall macros have been processed
In SAS 9.3, a loop might occur during termination of SAS if any autocall SAS macros had been processed during the session. The problem occurs when all of the following conditions exist:
- A file was allocated externally to SAS, such as in a Job Control Language (JCL) data definition (DD) statement.
- A FILENAME statement in the SAS program used the same DD name that was defined externally.
- The same files must have been allocated in the same order in both the external allocation and the FILENAME statement, with at least one additional file in the FILENAME statement at the beginning of the concatenation.
- The SAS system option SASAUTOS being set and making reference to the fileref/ddname.
- SAS macro autocall services were used subsequent to setting the SAS system option SASAUTOS.
When you terminate SAS during resource cleanup, SAS loops while trying to clear the SASAUTOS DD name. The SASLOG displays SAS termination messages, and all output is complete, but the job is still consuming CPU time.
If all of the above conditions are true except that the data set names are different or the order is different, then instead of the loop during termination, you get the following error in your SAS log:
ERROR: Logical name MYAUTOS assigned but not in current scope.
ERROR: Error in the FILENAME statement.
Click the Full Code tab for a simple example that illustrates the setup that causes this looping condition.
To circumvent this problem, remove either the external or internal allocation for the user autocall library.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.3 TS1M0 | 9.4 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
In this example the DD card and FILENAME statements for fileref USRAUTOS are used to illustrate the problem. These are partitioned data sets (PDSes) allocated with the same DCB attributes of RECFM=FB, LRECL=80. The SAS system option SASAUTOS specifies the autocall library sequence. The macro DAYS can be in any of the data sets allocated in the FILENAME statement, and because of the SASAUTOS option it will be executed through the SAS macro autocall facility.
//SAS1 EXEC SAS93 <- Your SAS 9.3 JCL proc
//MYAUTOS DD DISP=SHR,DSN=userid.USRAUTO1 <- Your macro library 1
// DD DISP=SHR,DSN=userid.USRAUTO2 <- Your macro library 2
//SYSIN DD *
FILENAME MYAUTOS ("userid.USRAUTO3" /* Your macro library 3 */
"userid.USRAUTO1" /* Your macro library 1 */
"userid.USRAUTO2") DISP=SHR; /* Your macro library 2 */
OPTIONS SASAUTOS=(MYAUTOS SASAUTOS); /* Setup autocall library sequence */
%DAYS; /* Execute a macro within MYAUTOS */
/* End of instream data
// End of JOB
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2016-10-25 11:59:16 |
Date Created: | 2012-06-08 09:28:34 |