IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ACS-vars DSNTYPE and DSORG


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Willem Vermeer

New User


Joined: 31 Oct 2007
Posts: 38
Location: Amsterdam, the Netherlands

PostPosted: Tue May 17, 2011 7:30 pm
Reply with quote

Greetings.

My JCL is as follows:

Code:
//DLET    EXEC PGM=IEFBR14                             
//DS       DD DSN=Z537815.TESTDS2,UNIT=SYSDA,           
//            SPACE=(CYL,(5,2),RLSE),LRECL=340,RECFM=FB,
//            DISP=(,CATLG,DELETE)


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?

We're running z/OS 1.11.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 582
Location: London

PostPosted: Tue May 17, 2011 7:51 pm
Reply with quote

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?
Back to top
View user's profile Send private message
Willem Vermeer

New User


Joined: 31 Oct 2007
Posts: 38
Location: Amsterdam, the Netherlands

PostPosted: Tue May 17, 2011 8:02 pm
Reply with quote

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.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue May 17, 2011 8:13 pm
Reply with quote

I'm little unsure what exactly the question is; this
Code:
//STEP10  EXEC PGM=IEFBR14                                 
//DD01      DD DSN=ABCD.PDSE1,                             
//             DISP=(NEW,CATLG,DELETE),                     
//             UNIT=DISK,SPACE=(CYL,(2,1)),                 
//             DCB=(LRECL=80,BLKSIZE=0,DSORG=PO,RECFM=FB), 
//             DSNTYPE=LIBRARY                             

gives:
Code:
                             Data Set Information                             
 Command ===>                                                                   
                                                                               
 Data Set Name . . . . : ABCD.PDSE1                                             
                                                                               
 General Data                              Current Allocation                   
  Management class . . : PDS                Allocated cylinders : 2             
  Storage class  . . . : LIBRARY            Allocated extents . : 1             
   Volume serial . . . : QLIQ07                                                 
   Device type . . . . : 3390                                                   
  Data class . . . . . : DEFAULT           Current Utilization                 
  Organization  . . . : PO                Used pages  . . . . : 5             
   Record format . . . : FB                 % Utilized  . . . . : 1             
   Record length . . . : 80                                                     
   Block size  . . . . : 32720                                                 
   1st extent cylinders: 2                                                     
   Secondary cylinders : 1                 Dates                               
   Data set name type  : LIBRARY      Creation date . . . : 2011/05/17   
                                            Referenced date . . : ***None***   
                                            Expiration date . . : ***None***                                                                                   


And this
Code:
//DLET    EXEC PGM=IEFBR14                             
//DS       DD DSN=ABCD.TESTDS2,UNIT=SYSDA,             
//            SPACE=(CYL,(5,2),RLSE),LRECL=340,RECFM=FB,
//            DISP=(,CATLG,DELETE)                     

Gives:
Code:
                            Data Set Information                             
 Command ===>                                                                   
                                                                               
 Data Set Name . . . . : ABCD.TESTDS2                                           
                                                                               
 General Data                           Current Allocation                     
  Management class . . : MC2             Allocated cylinders : 5               
  Storage class  . . . : GENERAL         Allocated extents . : 1               
   Volume serial . . . : QVSQC7                                                 
   Device type . . . . : 3390                                                   
  Data class . . . . . : DEFAULT                                               
  Organization  . . . : PS                Current Utilization                     
   Record format . . . : FB              Used cylinders  . . : 0               
   Record length . . . : 340             Used extents  . . . : 0               
   Block size  . . . . : 27880                                                 
   1st extent cylinders: 5                                                     
   Secondary cylinders : 2              Dates                                   
   Data set name type  :                 Creation date . . . : 2011/05/17       
   SMS Compressible. . : NO              Referenced date . . : ***None***       
                                         Expiration date . . : ***None***       
Back to top
View user's profile Send private message
Willem Vermeer

New User


Joined: 31 Oct 2007
Posts: 38
Location: Amsterdam, the Netherlands

PostPosted: Tue May 17, 2011 8:28 pm
Reply with quote

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!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 17, 2011 11:56 pm
Reply with quote

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
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 582
Location: London

PostPosted: Mon May 23, 2011 2:44 pm
Reply with quote

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
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Is it possible to allocate DA dataset... All Other Mainframe Topics 5
No new posts what is the DSORG(Datset orgnisation)... JCL & VSAM 8
No new posts Access file which has DSNTYPE=LIBRARY JCL & VSAM 17
No new posts How to browse RECFM=VBS DSORG=PSE seq... JCL & VSAM 7
No new posts Which Control block has the DSNTYPE i... PL/I & Assembler 4
Search our Forums:

Back to Top