Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What happens when Volume is not specified in DD statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Mon Feb 05, 2007 8:18 am    Post subject: What happens when Volume is not specified in DD statement
Reply with quote

Hi,

I know that to allocate more than one volume to a large dataset, in a DD statement volume-count can be specified in Volume subparameter.

But what happens when Volume is not specified in DD statement, but instead multiple units are specified e.g. UNIT=(sysda,12)

Since 12 devices will be allocated, does it implicitly mean volume count is now 12?

thanks in advance for any response!
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 05, 2007 8:49 am    Post subject:
Reply with quote

Hello,

Specifying sysda,12 does not mean 12 will be allocated. It means up to 12 may be allocated, if needed.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Mon Feb 05, 2007 8:57 am    Post subject:
Reply with quote

Dick,

So, if system does decide to allocate 12 devices, does it mean that I now have access to 12 volumes on the 12 devices?

thanks!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 05, 2007 9:25 am    Post subject:
Reply with quote

Hello,

When you allocate dasd, 1 device = 1 volume. When you process tape/cart files, multiple volsers may be used on the same device. Dasd volumes tend to be permanently mounted while tape/cart volumes seldom are. Dasd volumes may be shared by many users at the same time while tape drives/volsers can not.

When you read a cataloged dasd file that spans volumes/devices, you do not need to specify a count (nor the volser(s)) - that is taken care of automatically. When you create/catalog a large dasd file, the system may span volumes/devices and you will still not need to be concerned with the volser(s). Whatever the file uses will be entered in the catalog and used when the dataset is read by your program, backed up, sorted, etc.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Mon Feb 05, 2007 10:32 am    Post subject:
Reply with quote

dick scherrer wrote:
When you create/catalog a large dasd file, the system may span volumes/devices and you will still not need to be concerned with the volser(s). Whatever the file uses will be entered in the catalog and used when the dataset is read by your program, backed up, sorted, etc.


Dick,

In what kind of situations then unit-count > 1 e.g. UNIT=(SYSDA,12) is necessary while using dasd?

The second part of my question is, if I am planning use a tape, then suppose I estimate that 12 tape volumes will be needed, and then use something like UNIT=(tape,12), will I get 12 tape volumes? I know vol-count is a better thing to use here, but what will be the result in such a case?

Appreciate much for answering all these!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 05, 2007 10:45 am    Post subject:
Reply with quote

Hello,

Second question first - if you submit a job with unit=(tape,12), be prepared for the operations staff to cancel the job immediately. That tells the system you want 12 tape drives for one dataset. The reason for the vol count is that most systems have a maximum number of volumes that may be created in one "write". The vol count is used when you know the amount of data written will exceed the site standard limit. If there was no limit and a program went into a loop writing data, you could create many tape volumes before the job was canceled or abended due to a timeout.

The reason for a dasd unit count is that the file you are writing will not fit on one volume or the storage is fragmented and to get the needed space, it must be allocated on multiple volumes.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Mon Feb 05, 2007 11:01 am    Post subject:
Reply with quote

dick scherrer wrote:

The reason for a dasd unit count is that the file you are writing will not fit on one volume


But you said earlier that if the file spans multiple volumes, system is going to provide that automatically.

dick scherrer wrote:

or the storage is fragmented


By this do you mean there is no contiguous space in a single volume for either primary or secondary allocations?

Thanks for the clarification on 'tape'. I understand it now.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 05, 2007 8:27 pm    Post subject:
Reply with quote

Hello,

While the system will automatically allocate across volumes, you usually have to tell it what the limit is for large files or if your site is short on dasd space and you want to get as uch as possible. What the unspecified limit is and how it is enforced is local. If you check with your storage management people they can tell how this is handled at your site. SMS will make a difference also.

There is typically NO requirement that space be contiguous. If your dasd is not fragmented, you will typically get contiguous space.

Either the primary or secondary may not be able to get enough space on a particular volume. Depending on how you run out of space will generate some kind of x37 abend. The particulars of each may be found in the "system completion codes" which will refer you to an particular error message number that may be found in the "messages and codes" manuals. If memory serves, the messages will be IECxxxx.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Feb 06, 2007 8:01 am    Post subject:
Reply with quote

The rules are as follows (if I recall correctly):

Each DASD unit specified is allotted 16 extents to allocate the JCL-specified space. Note that extents (ext) and allocations (alloc) are 2 separate and distinct cocepts.

The primary alloc can use up to 5 ext if there's no contiguous space. If this happens, only 11 ext remain to allocate the 2ndary space.

The system can use up to 3 ext to satisfy each 2ndary alloc if there's no contiguous space. Now this means you may only be able to satisfy 3 2ndary allocs before you abend.

Of course, if you specify multi units you get 16 additional 2ndary exts for each DASD unit specified.

The advantage of multi unit allocations is the greatly expanded 2ndary space alloted. Another advantage is that you can reduce a huge primary allocation and decrease the likelyhood of an abend tyring to alloc that space.

Anyway, that's an approximation of how it works.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 06, 2007 9:05 am    Post subject:
Reply with quote

Hello Wanderer,

Also, please keep in mind that while both dasd and tape/cart use very similar dd parameters, the allocation consierations are quite different.

Most every dasd volume will have multiple concurrent users throught the day. The dasd volumes are nearly always online. A given dasd device will have only 1 volume for that device address (aka UCB). The entire dasd inventory is usualy online.

Very few tapes of the total tape inventory are ever mounted at one time. A tape drive device address may see 1000 separate mounts in a day. Many jobs will create or read multi-volume files. This is typically done allocating 1 tape drive for each DD statement.

When a job allocates a tape drive, it has complete control of that drive. When a job allocates a dasd device, it only controls some of the files on it, it does not control the entire device.

As i mentioned a bit ago that while they appear similar they are not, you should study their allocation characteristics separately.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Tue Feb 06, 2007 11:34 am    Post subject: Re: What happens when Volume is not specified in DD statemen
Reply with quote

Thanks Dick and mmwife for your thoughtful answers!

mmwife, now that you have brought to fore the difference between allocations and extents, I would very much like to know if there is any manual I can refer to.

In recent past, I had the wrong concept that every secondary allocation is 1 extent. But I am not very clear yet about the max 16 extents are possible in a single volume. Anyway, I suppose it makes sense now to provide multiple units in DD statement as a dataset can span about 123(or 251?) extents in MVS.
Back to top
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Wed Feb 07, 2007 9:46 am    Post subject:
Reply with quote

A sequential data set can have 16 extents on each volume.

An extended-format sequential data set can have 123 extents per volume.

A PDS can have 16 extents.

A direct data set can have 16 extents on each volume.

A non-system-managed VSAM data set can have up to 255 extents per component. System-managed VSAM data sets can have this limit removed if the associated data class has extent constraint removal specified.

A striped VSAM data set that is not system-managed can have up to 255 extents per stripe. Striped VSAM data sets that are system-managed can have this limit removed if the associated data class has extent constraint removal specified.

A PDSE can have 123 extents.

An HFS data set can have 123 extents on each volume

But keep in mind that an extent is not always equal to the primary or 2ndary values specified in the allocation.

A primary alloc may take up to 5 extents to be satisfied. That will leave only 11 extents to satisfy your 2ndary allocs.

The 2ndary alloc may take up to 3 extents to satisfy each alloc. So that means you may get as little as 3 2ndary allocs.

The reason for this is that each alloc is attempted to be satisfied with 1 extent of contiguous DA space. If it can't, it takes what it can get contiguously then uses another extent for the remaining space, if it can't get enough contiguously, it tries again until it uses all the extents and ... well you get the idea.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Wed Feb 07, 2007 10:22 am    Post subject: Re: What happens when Volume is not specified in DD statemen
Reply with quote

TizMe,

That was very clear. Thanks for answering!
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Feb 08, 2007 7:55 am    Post subject:
Reply with quote

Hi Wanderer,

I got that info from a text book not a manual. I'll try to search it up and give you the name/author. Half.com has these books at reasonable prices (usually under $15 - many ~ $5 & under).

The big advantage I find w/multi unit DASD alloc is that you can keep the primary request for large datasets reasonable to assure you get the space w/o abending.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Feb 09, 2007 7:48 am    Post subject:
Reply with quote

Hi Wanderer,

I just checked half.com. The book I suggested is on sale for $4.38 + s&h. Use the link below for details:

http://product.half.ebay.com/_W0QQprZ22680QQcpidZ17128
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Fri Feb 09, 2007 11:16 am    Post subject: Re: What happens when Volume is not specified in DD statemen
Reply with quote

mmwife, thanks much for all your effort!
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Feb 10, 2007 4:56 am    Post subject:
Reply with quote

My pleasure.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
This topic is locked: you cannot edit posts or make replies. Updating value of key using rewrite s... ParminderKumar COBOL Programming 4 Thu Aug 04, 2016 12:46 am
No new posts Reading selected volumes of a multi-v... RickBig JCL & VSAM 6 Wed Jul 13, 2016 7:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us