I find that neither DSNTYPE, nor DSORG is filled in: both are null. When I add number-of-directoryblocks in SPACE, DSNTYPE is still null and DSORG is PO.
So, when are DSNTYPE and DSORG filled in? Looking at the JCL it would seem that all necessary information is available.
And BTW, why is DSORG null when I use LIKE? I know, it's in the manual, so it must be a case of "works as designed". But, again, all information about the dsorg seems to be available. So why is it empty?
Neither value is coded in the JCL so probably working as designed. Did the LIKE dataset have proper values for DSNTYPE and DSORG? You do sometimes get anonomiles with LIKE.
The Writing ACS Routines manual details what variables are available in each environment. Some are not available in the Storgrp routine for example. Also do you have a ACSENVIR check in the code that would exclude these variables maybe?
Joined: 31 Oct 2007 Posts: 38 Location: Amsterdam, the Netherlands
Our users do not usually code DSORG or DSNTYPE in their JCL. Yes, if you code it the way you've shown, then it's certain to come out with all the correct attributes.
My problem is that I assumed that DSNTYPE as well as DSORG could be derived by the system (DFSMSdfp) from the info available thru the JCL and subsequently passed to the ACS-routine, where I then could react on it.
But nothing like that happens! My JCL would result in a normal, sequential dataset. So, why don't I get a DSORG=PS in my DC-routine? Why is DSORG null when somebody uses the LIKE-parameter? And why, if I specify SPACE=(CYL,(5,2,2)), don't I get a DSNTYPE=PDS in my DC-routine, but only a DSORG=PO? In this last case I see a DSNTYPE that's null!
Expat hit the nail on the head - talk to your Storage bods, but here's some background anyway...
According to the Writing ACS Routines manual (a very old version admittedly) the &DSNTYPE value is null unless set externally (e.g. in th JCL) or by assigned classes (Dataclas presumably)
For &DSORG it says for PS datasets it's set to null unless REFDD is used or it is specified externally, and set to null unconditionally if LIKE is used.
The Storage Administration Reference manual confirms the above:
Most ACS variables are read-only. Read-only variables contain data set and system information, and they reflect what is known at the time of the allocation request. You can use read-only variables in comparison operations, but you cannot change their values. All of the read-only variables appear below in Table 22. The read-only variables are
case sensitive. The following pages explain the uses of the read-only variables.
Note: In the data class ACS routine, the &DSNTYPE, &DSORG, &MAXSIZE,
&NVOL, &RECORG, and &SIZE variables all default to null if no
corresponding value is specified in the JCL.
Read-Only Variables Not Available when LIKE is Used
When you use the LIKE parameter on a JCL DD statement or the ALLOCATE command, the following read-only variable values are not available to the ACS routines: