Public MVS Software - The PDS Program - Part One Sam Golob MVS Systems Programmer (845) 362-2287 In my last article, which was an introduction to Public Domain software available for MVS, I mentioned one of the most amazing products, the PDS program product. This is a facility that one literally can't afford to do without. It is unbelievably powerful and a great time saver. The main thing is that you must learn how to use its many features. STARTING to use PDS has proven to be the greatest barrier. PDS has many subcommands, each of which in turn, has a variety of options. (Help!!) The new user, unaware of the things he potentially can do, and swamped by the number of things to choose, doesn't know where to start. In this article, we'll use a method of progression developed for my course on PDS. It is a methodology to get you INTO PDS. Once you know how PDS works, you can expand your knowledge on your own. It's just a question of learning "where everything is at". We should begin from what PDS is. PDS is a facility for manipulating a DATASET, which can be either PARTITIONED or SEQUENTIAL. Other types can also be dealt with, but for simplicity, we shall restrict our discussion to these two types. PDS is a TSO COMMAND PROCESSOR. At minimum, we can enter PDS from TSO READY, by typing PDS 'dataset.name' or PDS86 'dataset.name', depending on what name we have given to the PDS load module. PDS must always point to a dataset (which we call the "current dataset"). If we try to enter "PDS" from TSO READY, without a target dataset, there will be a TSO prompt: "ENTER NAME OF DATASET". Suppose we enter a dataset name. The resulting display will look like the following: - DSN=SBGOLOB.B.CNTL,VOL=SER=DATA02 MEM= ----------------------------------- PDS100I PDS -- VERSION 8.6.19.0 DECEMBER 19, 2022 MVSLEV=MVS725 PDS200I DISP UNIT OPT RECFM LRECL BLKSIZE ALLOCTRK FREETRK SECONDARY FREEDIR PDS200I SHR 3390 C FB 80 27920 1X 600 210 120 TRK 15 PDS300A ENTER OPTION -- DSN=SBGOLOB.B.CNTL,VOL=SER=DATA02 MEM= This display itself is almost worth the price. It can be recreated by entering the DSNAME or DSN subcommand. You'll notice that the basic PDS prompt is "ENTER OPTION", just as the basic prompt for TSO is "READY". Suppose we take the hint and enter "OPTIONS" or "O". What will appear is a list of about 48 options or SUBCOMMANDS, in PDS parlance. This gives you quite a choice! So where do you start? Here's where this article comes in. Basically, we're here to ORGANIZE the options, so we can get decent coverage of them--a good once-over. This will give you the knowledge to get going on your own. Please take a look at the organized list of PDS options in Figure 1. This is merely a re-sorted and re-commented list of what you get when you enter the PDS "OPTIONS" command yourself. We have divided the subcommands into five general groups. As we cover the commands in each group, the general nature of the capabilities of PDS will gradually fall into perspective, and you'll start to get the picture. (This will bring you to the stage where I am. I've just about started to get the picture myself.) The whole thing should take about three articles, and I'm ready if you are! (Really, it's worth the time spent. Your productivity rate will start to fly.) OK. The first class of commands deals with the "current dataset" itself. Remember that the PDS command processor must always be pointed at a "current dataset". If you want to change the "current dataset", all you have to do is enter a "CHANGE" or "C" subcommand followed by the TSO-qualified new dataset name after the "ENTER OPTIONS" prompt. PDS will switch to the new dataset and show you the new dataset's characteristics. Let's look at the some of the subcommands in SECTION ONE. We've mentioned the "OPTIONS" subcommand, now let's discuss "HELP". Help is what we always need, especially with such a versatile product. I'll assume you installed the "HEL" full-screen TSO help program from CBT tape file 134, and genned the "HEL" TSO help option when you installed PDS from the CBT tape. Now when you see the "ENTER OPTIONS" prompt, enter "H" or "HELP" followed by a subcommand name. You'll get a full-screen scrollable view of the 6000-line PDS help member, but conveniently positioned to the subcommand you want. You can scroll up and down as much as you want for as long as you want. This is convenient to say the least. The full-screen help program "HEL" is a separate TSO command, called by PDS, which can be used to view other TSO help datasets as well. If this is working, you now have a lot of help available. (Be sure the PDS help member has an alias of "PDS80" in your SYSHELP dataset. In later releases, this should be "PDS81", etc.) What's next? "END". If you see the "ENTER OPTIONS" prompt and you enter "END", you'll pop out of PDS. This will even happen if you enter "EN". But if you enter "E" alone, PDS will try to allocate ISPF datasets and "EDIT" the dataset you're currently pointing to. This is because of the way PDS subcommands are set up. You can abbreviate to the point of uniqueness, but beyond that, PDS has a table of preference for subcommands, and EDIT is higher on that table than END. Therefore if you try entering "E" alone, EDIT is the command that PDS chooses to execute, and not END. "DSNAME" is next on the list. We saw what you get when you enter this subcommand at the "ENTER OPTIONS" prompt. That should be all of DSNAME, right? NO! That's definitely not right. Here, we'll begin to sense the unique beauty of the PDS product. There are THREE "DSNAME" displays. Enter "DSN MSG" and you get the above display. Enter "DSN TSO" and you get the equivalent information in the format of the TSO ALLOCATE command: >dsn tso ALLOC F(SYS01286) DA('SBGOLOB.B.CNTL') SHR UNIT(3390) - RECFM(F B) LRECL(80) BLKSIZE(27920) OPTCD(C) VOLUME(DATA02) - TRA SPACE(600,120) DIR(314) /*FREE TRK=210,FREE DIR=15*/ Finally, if you enter "DSN JCL", the format is that of a JCL dataset allocation: >dsn jcl //SYS01286 DD DSN=SBGOLOB.B.CNTL,DISP=SHR,UNIT=3390, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920,OPTCD=C),VOL=SER=DATA02, // SPACE=(TRK,(600,120,314)) /*FREE TRK=210,FREE DIR=15*/ Good automatic formatting? We'll see more and more, that the whole product is pervaded with such versatility. These formats are not just pretty pictures, but they will prove to be darn useful. We'll see that from ISPMODE, all of these generated outputs can be written to a file for subsequent use. They can prove to be machine-readable timesavers for your later processing. Let's go further down our list. We'll look at the "USAGE" or "U" subcommand. This shows us a thorough picture of the dataset's vitals. Enter "U" at the "ENTER OPTION" prompt and you get the display below. Adding any extra character such as "U T" gives you the track map of the dataset as well. (In PDS 8.1, "U ALL" will also dump the entire VTOC entry for the current dataset, and will format each field of the VTOC. Wow!) For our dataset... >u t //SYS01286 DD DSN=SBGOLOB.B.CNTL,DISP=SHR,UNIT=3390, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920,OPTCD=C),VOL=SER=DATA02, // SPACE=(TRK,(600,120,314)) /*FREE TRK=210,FREE DIR=15*/ DATA SET: CREATED EXPIRES LAST USE UPDATED SECURITY 1/06/22 0/00/00 3/23/23 YES NONE EXTENTS IN TRACKS: 600 TRACKS: ALLOCATED USED FREE EXTENTS 600 390 210 1 DIRECTORY: BLOCKS USED FREE TRACKS MEMBERS ALIASES 314 299 15 7 1821 2 EXTENT UCB LO TT-HI TT TRACKS LOW CCHH-HIGH CCHH BOUNDARY ------ ---- ----- ----- ------ ----------- ----------- -------- 0 0A94 00.00 02.57 600 08.EF.00.00 09.16.00.0E CYL FORMAT 1 DSCB: 0 4 8 C 10 14 18 1C 20 24 28 2C 30 34 38 3C 40 44 SBGOLOB.B.CNTL 1DATA02..:........IBMOSVS2 ECCDDDC4C4CDED444444444444444444444444444444FCCECFF00700000000CCDDEEEF 2276362B2B3533000000000000000000000000000000141310201A0600010092462522 48 4C 50 54 58 5C 60 64 68 6C 70 74 78 7C 80 84 88 #.........._..&...b.....e.....a.................................. 44444705000000926105000880070815100800E0001000000000000000000000000000 00000B0200002000D0000002000815B9E00108F00960E0000000000000000000000000 LOC NAME VALUE DESCRIPTION --- ---- ----- ----------- 00 DS1DSNAM SBGOLOB.B.CNTL 2C DS1FMTID F1 FORMAT IDENTIFIER 2D DS1DSSN DATA02 DATA SET SERIAL NUMBER 33 DS1VOLSQ 1. VOLUME SEQUENCE NUMBER 35 DS1CREDT 7A0006 CREATION DATE 38 DS1EXPDT 000000 EXPIRATION DATE 3B DS1NOEPV 1. NUMBER OF EXTENTS ON VOLUME 3C DS1NOBDB 0. NUMBER OF BYTES USED IN LAST DIRECTORY BLOCK 3D DS1FLAG1 00 FLAG 1 3E DS1SYSCD C9C2D4D6E2E5E2F24040404040 4B DS1REFD 7B0052 DATE LAST REFERENCED 4E DS1SMSFG 00 SYSTEM MANAGED STORAGE INDICATORS 4F DS1SCEXT 000000 SECONDARY SPACE EXTENSION 52 DS1DSORG 0200 DATA SET ORGANIZATION 54 DS1RECFM 90 RECORD FORMAT 55 DS1OPTCD 20 OPTION CODE 56 DS1BLKL 27,920. BLOCK LENGTH 58 DS1LRECL 80. LOGICAL RECORD LENGTH 5A DS1KEYL 0. KEY LENGTH 5B DS1RKP 0. RELATIVE KEY POSITION 5D DS1DSIND 82 DATA SET INDICATORS 5E DS1SCALO 80000078 SECONDARY ALLOCATION 62 DS1LSTAR 01851B TTR OF LAST USED TRACK AND BLOCK ON TRACK 65 DS1TRBAL 22,814. BYTES REMAINING ON LAST TRACK USED 67 00 RESERVED (ONE BYTE) 68 DS1TTTHI 00 HIGH ORDER BYTE OF TRACK NUMBER IN DS1LSTAR 69 DS1EXT1 8100.08EF0000.0916000E FIRST EXTENT DESCRIPTION 73 DS1EXT2 0000.00000000.00000000 SECOND EXTENT DESCRIPTION 7D DS1EXT3 0000.00000000.00000000 THIRD EXTENT DESCRIPTION 87 DS1PTRDS 0000000000 CCHHR OF ANY ASSOCIATED FORMAT 2 OR 3 DSCB Not bad, not bad. We're now about half way down the list in Section One. For completeness at this point, it's probably best to mention some stuff from Section Two and talk about ISPMODE a bit. Then we'll be able to finish Section One with better perspective. What's ISPMODE? Remember that PDS is a TSO command processor. In non-ISPMODE, or what we'll call LINE MODE, the results of the PDS subcommands are output to the terminal, as in any TSO command. When PDS is in ISPMODE however, it is operating in a full ISPF environment, and it is an ISPF dialog manager. Prompting lines for subcommands are at the top of the full screen ISPMODE displays, while the results of the commands go to a scrollable DISPLAY LOG at the bottom of the screen. Another name for this scrollable DISPLAY LOG is VIEW MODE. There are three other ISPMODE scrollable displays supported in the current version (8.0) of PDS. They are MEMLIST, LISTA, and LISTV. You can switch back and forth between them. We'll get to a discussion of them by and by. If ISPF is available in the TSO environment, ISPMODE may be entered from a PDS session in LINE MODE, merely by entering "ISPMODE" or "ISPM" at the "ENTER OPTIONS" prompt. PDS will then allocate all relevant ISPF datasets and call itself again as a dialog manager. PDS can also be entered directly in ISPMODE from an ISPF menu option. You can refer to the PDS installation literature for more direction on how to set this up. The information can be found in the install pds that comes from CBT tape file 182. For now, I'd like to mention the existence of the "Data Table Output" option "7" in ISPMODE. This option is used to write the ISPMODE LOG to a disk dataset or to SYSOUT, thus preserving the results of your PDS subcommands. All four ISPMODE scrollable displays have this capability. Now we can go on to finish the commands of Section One. The "DISPLAY" and "PATTERN" subcommands display subsets of members of the "current dataset" if it is partitioned. "DISPLAY" deals with ranges of names in collating sequence order. "DISPLAY" or "D" without any operands displays all members. The colon ":" is the range indicator. "D A:C" will display all members in collating sequence starting from those beginning with "A" thru those beginning with "C". If you genned the "display delimit" option when you installed PDS (&CONDRNG SETC 'Y' in #PDSGEN), the subcommand "D A" will mean the same as the command "D A:A". This allows easy abbreviation of DISPLAY commands and has other unexpected dividends. If you don't gen this option at install time, then "D A" will mean "D A:x'FF'", and the display will fly off to the end of the directory. "PATTERN" displays all members containing a string. The string does not have to occur at the beginning of the name, but can occur anywhere in the member name. The control character indicating "PATTERN" is the slash, "/". "DISPLAY ABC/" or "PATTERN ABC" will display all member names containing the string ABC, such as EXABC, ABCDE, OR XABCY. The DISPLAY and PATTERN subcommands have many variations in their use, and you'd be advised to see the HELP entries for them. At this point, there is an important PDS concept that should be introduced. This is the MEMBER GROUP. You always have a default MEMBER GROUP if your current dataset is partitioned. (It can be EMPTY or UNDEFINED if you haven't defined it yet with one of the subcommands from Section Three or Section Four). The member group can either be defined as a rule with the MEMBERS subcommand (using logic from DISPLAY, PATTERN, or a combination of these - see HELP GROUP), or as a list of member names, with the SUBLIST subcommand. The fact that PDS keeps track of MEMBER GROUPS allows it to do subcommand operations on many members at a time. We don't want to discuss MEMBER GROUPS now. They are the main topic of the next article. Suffice it to say that the "MEMBERS" subcommand of PDS will display or redefine the "current member group". So will the "SUBLIST" subcommand. To learn more about groups, you should refer to the TSO HELP for PDS under HELP MEMBERS, HELP SUBLIST, and the special entry HELP GROUP. (There is no GROUP subcommand in PDS.) How does this relate to DISPLAY and PATTERN? DISPLAY and PATTERN do not alter the "current member group". However the internal logic used for the DISPLAY and PATTERN subcommands in PDS code IS used in executing OTHER subcommands which DO alter the current group. Next case. The "RECALL" or "R" subcommand is particularly useful throughout your travels in PDS-land. If "R" is entered from the command line in ISPMODE or from the "ENTER OPTION" prompt, you will get a display of the last command you entered. In ISPMODE, the RECALL subcommand has the additional capability of finding previous commands entered, that are still in the VIEW MODE log. The RECALL ISPF panel prompts you how to use the facility, and it saves you a lot of retyping. We are left with the "TSO", "COMPRESS", "VERIFY", "FIXPDS", and "CONTROL" subcommands to complete our discussion of Section One. "TSO" allows the execution of an arbitrary TSO command while we are still within a PDS session. It can (and should) be abbreviated to "TS" or "T". Why? When you are using ISPF, there is a "TSO" prefix you can issue from the command line of any ISPF panel. The prefix "TSO" allows you to execute a TSO command that is typed after it. The facility is a part of native ISPF, and not of PDS. Now what if we are using PDS in ISPMODE, and we enter "TSO" on the command line of an ISPMODE panel followed by a TSO command. What gets executed, ISPF's TSO, or PDS's "TSO"? The answer is ISPF's TSO. (In LINE MODE execution of PDS, this is not a problem.) So when you abbreviate PDS's "TSO" command to "TS" or "T", you can be sure you're not getting the ISPF version. What's the difference? It makes a difference to execute PDS's version, because you can gen PDS so that "TS" really means "TSO TSOEXEC" (for users having TSO/E). That way, you can efficiently execute authorized TSO commands, even though you are within ISPF. The TSOEXEC command that comes with TSO/E allows execution of authorized commands from within ISPF, and it is quicker to type "T" than to type "TSO TSOEXEC". Saves your fingers. The "COMPRESS" subcommand invokes the program IEBCOPY to compress a partitioned dataset. IEBCOPY has the hitch that it must run authorized, and it is somewhat difficult to get an authorized program to run under TSO. Special measures must be taken. There are several programs described in the #PDSGEN install member which do the authorization process for IEBCOPY. They are either the SPFCOPY front end for IEBCOPY, which calls a user SVC (info can be found in the ISPF program directory from IBM or file 300 on the CBT tape). Or the TSO module IKJEFTSR (which is dangerous because it accepts attention interrupts during a compress). If you have the vendor product PDSFAST (sold by Software Engineering Associates of Lake Success, New York), this is the most convenient COMPRESS and COPY program of all. It doesn't have to be authorized, and PDS is fully compatible with it. PDSFAST is also much faster than IEBCOPY, making foreground compresses more convenient. You can gen PDSFAST as PDS's COPY or COMPRESS program during the install process. The second best COPY/COMPRESS choice is probably SPFCOPY, if your company doesn't have PDSFAST. "CONTROL" sets certain PDS internal mechanisms and display defaults for subcommands. If you enter the "CONTROL" subcommand without any operands, one of the items shown will be the available virtual storage for your TSO session. CONTROL can be very significant when you know more about how PDS works, but for now, I'll just refer you to the TSO help for it. "VERIFY" "verifies" the current dataset or its members. It does all kinds of block size measurements and other things. It tries to make sure that the members have characteristics consistent with the DCB attributes of the dataset, and that the members are consistent with each other. When there's something wrong, you get a message. VERIFY also counts logical records and physical blocks. You get a statistical report concerning them. Some examples of VERIFY messages: If you do a VERIFY on a dataset, and a member has a block size bigger than what's in the DCB, this will show up. If there are members which are "orphaned" (marked as aliases but with no main member) or "apparent aliases" (not marked as aliases, but two members point to the same disk location), that will show up. A VERIFY run will also show how many tracks can be gained by a compress. There is much more. As usual, please refer to the TSO help member for this subcommand. "FIXPDS" is an extremely multifaceted subcommand incorporating at least ten functions in one. Space prohibits a big discussion here, but I'll try to whet your appetite before sending you off to the HELP member. You can use FIXPDS to reduce the current dataset's unused allocated space, without deleting and reallocating the dataset. It just gets rid of the extra space. Another thing you can do is to release the space taken up by the dataset's unused extents, or you can release all the unused space. These features of FIXPDS use the RELEASE program from File 296 of the CBT tape. You can add or reduce the number of DIRECTORY BLOCKS a pds has, ON THE FLY, with the "EXPANDDIR" and "FREEDIR" options of FIXPDS. You can change many of the DCB characteristics of the dataset ON THE FLY. For instance you can change the RECFM, DSORG, or BLKSIZE. You can also clear a pds of all its members, and optionally readjust the number of directory blocks while doing so. Pretty good, and there's much more in FIXPDS. Well we got through Section One! We already know enough now to start working with the PDS product and to get some major use out of it. We also have enough information to start exploring ahead on our own. However, there's a lot of BASIC work still to cover. We still don't know much about manipulating GROUPS of members at once. I haven't even mentioned the magnificent "MEMLIST" capability, that allows ISPF BROWSE or EDIT or RENAME or PRINTOFF (and 20 other things) from a SINGLE fullscreen list of pds members. "MEMLIST" also makes possible exquisitely delicate manipulation of the member GROUPS. So there's lots more to follow folks!!! Tune in next month... same time... same station. * * * * * * * * * * * * * * * * * Figure 1. PDS SUBCOMMANDS - Organized by Type - (for PDS version 8.0) SECTION ONE. General Commands concerning the CURRENT DATASET. OPTIONS - Display the list of subcommands HELP - HELP for PDS subcommands END - STOP THE PROGRAM DSNAME - Display allocation of the "CURRENT DATASET" USAGE - "CURRENT DATASET" STATISTICS (very comprehensive) CHANGE - Change the "CURRENT DATASET" RECALL - Display a PREVIOUS SUBCOMMAND DISPLAY - Display MEMBER NAMES of the "CURRENT PDS" by RANGE PATTERN - Display MEMBER NAMES matching a PATTERN TSO - Invoke a TSO COMMAND from within PDS COMPRESS - Compress the "CURRENT DATASET" in place VERIFY - VALIDITY CHECK the "CURRENT DATASET" FIXPDS - Modify DATA SET ATTRIBUTES (very very powerful) CONTROL - Set PROGRAM CONTROLS for general PDS execution SECTION TWO. ISPMODE Commands. ISPMODE - Put this PDS session into ISPMODE VIEW - View the ISPMODE log MEMLIST - ISPF DISPLAY TABLE of members (very versatile) LISTA - Display DATASET ALLOCATIONS for this TSO session LISTV - Display statistics for MOUNTED DISK VOLUMES (Each of these has options and subcommands of its own) SECTION THREE. MEMBER GROUP Manipulation Commands. MEMBERS - DISPLAY/DEFINE a MEMBER GROUP SUBLIST - Define a MEMBER LIST SUBGROUP MEMLIST - ISPF DISPLAY TABLE of "MEMLIST SUBSET" of members IF - Conditionally Execute a PDS SUBCOMMAND (powerful) FIND - LIST occurrences of a STRING for members in a GROUP REPLACE - CHANGE occurrences of a STRING for members in a GROUP ATTRIB - LIST/CHANGE ATTRIBUTES of all members in a GROUP VERIFY - VALIDITY CHECK a MEMBER GROUP COPY - COPY MEMBER GROUP to another Data Set OUTCOPY - Generate IEBCOPY MEMBER SELECT STATEMENTS for a GROUP SECTION FOUR. Individual MEMBER Manipulation Commands. EDIT - EDIT a member using ISPF EDIT BROWSE - BROWSE a member with ISPF BROWSE REVIEW - BROWSE a member using REVIEW (doesn't need ISPF) LIST - DISPLAY a member RENAME - RENAME a member DELETE - DELETE a member ATTRIB - LIST/CHANGE ATTRIBUTES of a member (Source or Load) ALIAS - ASSIGN AN ALIAS to a member (Source or Load) HISTORY - LIST HISTORY of a LOAD MODULE CSECTS and ZAPS MAP - MAP A LOAD MODULE COPY - COPY a member to another Data Set CONTROL - Set PROGRAM CONTROLS for display of MEMBERS COMPARE - COMPARE TWO MEMBERS from the Data Set FIND - LIST LINES containing a STRING REPLACE - CHANGE LINES containing A STRING REPRO - RECOPY A MEMBER in this Data Set RESTORE - RESURRECT a PREVIOUSLY DELETED member PRINTOFF - PRINT A HARDCOPY of a member SUBMIT - SUBMIT JCL VERIFY - VALIDITY CHECK a dataset member DIRENTRY - DUMP a DIRECTORY ENTRY of a member and DISPLAY FIELDS SECTION FIVE. Other Commands. "UNDOCUMENTED" OPTIONS - See member $$$UNDOC in install pds EXEC - Execute PDS subcommands from a CLIST ISPF - Invoke ISPF Primary Panel from PDS TSOEDIT - EDIT using TSO EDIT TSOLIST - LIST DATA with TSO LIST FSE - EDIT using FSE (vendor product or free product) DSPRINT - Print a HARDCOPY with DSPRINT (vendor product) VPSPRINT - Print a HARDCOPY with VPSPRINT (vendor product) "There is more. You have to explore."