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
Pete,
I bet it's working as designed. I cannot find anything that says it's a bug. The point is, I assumed these vars would be filled in. After all, all the info is there, isn't it? But they aren't. Why?
And as for the LIKE, given that the new dataset has all the correct attributes, you would assume that all the info's there also. So why isn't it passed to the ACS-routines?
No, I do not exclude these vars with an ACSENVIR-check.
Joined: 31 Oct 2007 Posts: 38 Location: Amsterdam, the Netherlands
Anuj,
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!
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
Speak to your storage management group and if you are lucky they may give you a full explanation as to why the site specifics are defined the way that they are.
It has to be them, because we didn't set up the SMS environment
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:
Read-Only Variables
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:
&DSNTYPE
&MAXSIZE
&RECORG
&SIZE