DATA Step, Macro, Functions and more

Problem with SAS work library after SAS9.2 installation

Reply
N/A
Posts: 0

Problem with SAS work library after SAS9.2 installation

Hi all,

Recently we migrated our SAS software from SAS8.2 to SAS9.2. We use SAS under Z/OS. Below is the problem description,

I have a JCL with two steps,

Step1: Execute a sas program (say SASPGM1). I have specified a work library for this step. SASPGM1 creates an intermittent SAS dataset (e.g. DATASET1);
Step2: Execute another SAS program (say SASPGM2). Here I use the same work library as used in step1. But when I try to access the intermittent sas dataset (dataset1) created in step1, the program fails stating that WORK.DATASET1.DATA does not exist.

The same JCL works fine with SAS8 but not with SAS9.2. Below is the sample JCL:

//STEPA EXEC SAS
//WORK DD DSN=&&WORKLIB,DISP=(,PASS),UNIT=DISK
//SYSIN DD DSN=HLQ1.HLQ2.SAS(SASPGM1),DISP=SHR
//*
//STEPB EXEC SAS
//WORK DD DSN=&&WORKLIB,DISP=(OLD,KEEP)
//SYSIN DD DSN=HLQ1.HLQ2.SAS(SASPGM2),DISP=SHR

I have workarounds, but I want to know why is this not working.
Super Contributor
Super Contributor
Posts: 3,174

Re: Problem with SAS work library after SAS9.2 installation

Since you are passing the SAS "WORK" allocated library, I expect your SAS CONFIG option WORKINIT is specified, rather than a previous default-behavior of NOWORKINIT.

If this is the case, your next option might be to discuss the default-assignment change with your SAS System Administrator. Then you can decide if your situation requires you to code NOWORKINIT or you may need to change from using WORK to some other LIBNAME that is not so dependent on the SAS system.


Scott Barry
SBBWorks, Inc.

//S1 EXEC SAS913
//WORK DD DSN=&&WORK,DISP=(NEW,PASS)
//SYSIN DD DATA,DLM=ZZ
%PUT %SYSFUNC(GETOPTION(WORKINIT));
DATA WORK.DUMMY;
DUMMY=1;
RUN;
ZZ
//S2 EXEC SAS,OPTIONS=WORKINIT
//WORK DD DSN=&&WORK,DISP=OLD
//SYSIN DD DATA,DLM=ZZ
DATA ;
SET WORK.DUMMY;
RUN;
%PUT %SYSFUNC(GETOPTION(WORKINIT));
ZZ
N/A
Posts: 0

Re: Problem with SAS work library after SAS9.2 installation

Thanks a lot. This was very helpful.
Ask a Question
Discussion stats
  • 2 replies
  • 129 views
  • 0 likes
  • 2 in conversation