Date Last Reviewed:
03/15/2007
Superwylbur users can utilize the possibilities of Partitioned Data Sets (PDSs). Although the concept of PDSs may seem a bit difficult at first, you'll find that once you use them, the advantages will far outweigh any problems associated with learning to use them. You should use PDSs because our disk space is scarce. A partitioned data set will save you money by using your disk allocation more efficiently.
A Partitioned Data Set (PDS) is nothing more than a data set which contains a number of smaller data sets within it. Because of this feature, a PDS can make better use of track space by putting more than one data set on a track. A data set that is not a PDS or not a member of one will take up at least one track, no matter how little data there is. Each PDS contains a directory to keep track of the data sets (called "members") within it, much the same way that Superwylbur keeps track of the data sets that you create in the usual way. Ordinarily, the members may be treated just like standard Superwylbur data sets. There are a few new commands to learn, but other than that a member of a PDS behaves just the way a common data set does.
There are a number of very good reasons why most people who use a number of small data sets should begin using a PDS to store them.
Creating a Superwylbur PDS is very much like saving an ordinary data set. The only differences lie in the name, which must have two parts, and the SPACE parameter, which must be included. The name of a member of a PDS has two parts. These two parts are specified by putting the name of the PDS first, then a colon (:) followed by the name of the member. For instance, a member named ONE in a PDS called PROGRAMS is referred to as
PROGRAMS:ONE
When you create a PDS, you must tell Superwylbur the names of the PDS and the first member, and you must also allocate space. This is done with the SPACE parameter. A Superwylbur SPACE parameter looks very much like a JCL SPACE parameter. It consists of three parts: primary space, secondary space, and directory blocks. For instance, if you wanted to create a PDS called PROGRAMS with a member called ONE, you would have to do the following: first, create the data set called ONE in the normal way; next, save it with a SAVE command which includes the SPACE parameter. When you create a PDS, it would probably be best to use a command like the following:
SAVE INTO PROGRAMS:ONE ON ACA301 SPACE=(TRK,(1,1,5))
Following "SPACE" is the space allocation information. "TRK" is an abbreviation for "tracks," which means that space is being requested in terms of tracks (as opposed to 15-track cylinders). The first "1" represents the number of tracks requested to start with (primary space). The second "1" represents the increment in additional tracks to add to the PDS when needed (secondary space). This increment can be taken up to fifteen times. The "5" represents the number of directory blocks to allocate to the PDS. One directory block can contain entries for up to seven data sets.
So this command allows your PDS one track initially, up to 15 more tracks if needed (1 x 15), and enough directory blocks for about 35 data sets (5 x 7). One track can hold up to forty-one small data sets. This number will differ depending upon how long the individual members are.
If you wished to save a temporary working storage data set, you would have to use a command like the following:
SAVE TEMPORARY ONE INTO PROGRAMS:ONE ON ACA301 SPACE=(TRK,(1,1,5))
TEMPORARY may be abbreviated TEMP or T.
If the PDS already exists, you do not need to use the SPACE parameter on the SAVE command. Simply say
SAVE INTO PDSname:membername ON volume
For a temporary data set which is not the default, use
SAVE TEMP data.set.name INTO PDSname:membername ON volume
To put a member of a PDS into working storage, the USE command can be used just as with any other data set. To get the member ONE from the PDS PROGRAMS, you could say
USE FROM PROGRAMS:ONE ON ACA301
This will make a copy of ONE the default data set. To make ONE a temporary data set with the same name, you would say
USE TEMP ONE FROM PROGRAMS:ONE ON ACA301
Many of the other options such as ON and CLEAR can, of course, be used.
Use the SCRATCH command to scratch either a member or an entire PDS. To scratch ONE from PROGRAMS, you would say
SCRATCH PROGRAMS:ONE ON ACA301
To scratch the entire PDS and all of its members, say
SCRATCH PROGRAMS PDS ON ACA301
Use either the SHOW DSNAMES MEMBERS command or SHOW MEMBERS FROM 'PDSname' command. The first will list all the data sets on the default volume and all the members of any PDS on it. The second command will just list the members of a specific PDS. If you want the members of the default PDS, WYLIB, you may leave off the FROM `PDSname' option.
Occasionally, you will receive a message telling you that there is no space left in your PDS, either in the data set itself or in the directory. When this happens, you have two choices. You may either create a new, larger PDS and move the members of the old one to the new one, or you can "compress" the old PDS.
When members are scratched from a PDS, their space can't be used again until something called "compression" is done to the PDS. This can be accomplished either by using the IBM utility IEBCOPY or by using a Superwylbur macro which will do the same thing. To use this macro, type
CALL FROM &PUBLIC.MAC1:COMPRESS or CALL FROM &PUBLIC.MAC1:COMPRESX
and follow the instructions listed at your terminal. COMPRESS will release all unused space in your PDS, whereas COMPRESX will retain your original primary space allocation.
To use a member of a Superwylbur PDS, you must be sure that the member is in the correct format, that you give the fully qualified name for the PDS itself, and that you include the member name in parentheses at the end. A fully qualified name will include not only your AccountID but also the name of the PDS and the name of the member you want. Thus, to use member ONE of the PDS PROGRAMS, the DSN statement on your program would look something like this:
//DATASET DD DSN=AccountID.PROGRAMS(ONE)
Never mix formats in a PDS. Ordinarily, the members of a Superwylbur PDS are saved in EDIT format. This may be changed by specifying the CARD option with the SAVE command. If you mix these two formats within the same PDS, you will probably lose all of your data. The best policy is to save all Superwylbur data sets in EDIT format, which is the default.