![]() | ![]() | ![]() | ![]() | ![]() |
When using Base SAS running under z/OS, a %INCLUDE statement for an explicit path of a cataloged disk data set might fail and cause the following message to occur:
ERROR: SVC99 ERROR RC=4, REASON=0218 : IKJ56221I DATA SET x.y.z NOT ALLOCATED, VOLUME NOT AVAILABLE+IKJ56221I VOLUME xxxxxx NECESSARY TO SATISFY YOUR REQUEST NOT ON SYSTEM, AND CANNOT BE MOUNTED.
The following is an example of an explicit path %INCLUDE statement:
This error occurs because of what happens within DYNALLOC based on the text units that are built by SAS to have the resource allocated. For the %INCLUDE statement, the text units that are built by SAS for the DYNALLOC request are as follows:
DALDSNAM TU Key 0002 (data set name) Length 44 padded with blanks x'40' DALPERMA TU Key 0052 (Use data sets permanently allocated attributes) DALRTDDN TU Key 0055 (Return DDname) Length 8 filled with blanks x'40' DALSTATS TU Key 0004 x'08' (DISP=SHR) Length 1 DALVLSER TU Key 0010 (volume serial) Length 6
The text unit DALVLSER causes DYNALLOC to assign a unit name based on a default search order. If the volume serial is not defined to the selected default unit name, then the allocation will fail. Note that the order of the search differs between TSO and Batch environments. Because of this, code that works in one environment might fail in the other.
For information on the default search order used by DYNALLOC for assigning a default unit name, see IBM Info APAR II06423 INCORRECT DEVICE TYPE ALLOCATION BEING PERFORMED WHEN THERE IS NO UNIT SPECIFIED - DEFAULT UNIT TAKES PRECEDENCE.
A workaround for this problem is to preallocate the data set with a FILENAME statement, and then the %INCLUDE from the file reference. See an example of the code for this workaround below:
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 |