PDSFLIST :- Rexx Fullscreen PDS list function. Version 4.3 ============================================== =========== Copyright : FadH Software 1989,1999 Fadh Software website http://www.btinternet.com/~ashleys/fadh_software.htm This Rexx function enables you to display the directories of multiple PDS's at the same time. Members within the listed libraries can then be edited, browsed, renamed copied, moved and deleted all from the same screen. Various subcommands are available to modify the order and details of the members displayed. Rexx execs, TSO Clists and TSO commands can be executed from the PDSFLIST command area. As PDSFLIST is a Rexx function it can be invoked from a Rexx exec by either :- 1) Call PDSFLIST or 2) rc=pdsflist() PDSFLIST Variables ------------------ Variable : pdslist Prior to invoking the function, the exec must set up a variable called PDSLIST. This variable is a list of Datasets to be processed. Each Dataset in this list must be separated by a blank. For example, PDSLIST="X99999.PRIVATE.JCL X99999.EXEC" would display members from both those PDS's. There is no limit to the number of datasets that can be included in the list. However, there is a display limit of 50,000 members. The dataset requested can be a fully qualified name, a partially qualified name, eg SYS1.USER.* or a DDNAME. If a DDNAME is being specified, it must be specified as DD=. For example, DD=ISPPLIB would request a display of the datasets allocated to ISPPLIB. When using the DD= parameter, you can also specify the 'virtual DD' names of APFLIST and LINKLST. This will cause those system lists to be displayed/searched. If you specify a dataset starting with a . (dot), your TSO userid will be prefixed to the DSN. If a requested dataset is uncataloged, the volume it resides on should be indicated by the VOL= parameter, ie PDSLIST="X99999.PRIVATE.CNTL,VOL=TEST01" (Note : the VOL= parameter can be abbreviated to V=). All of the DSN specifications may be specified in the same list, eg pdslist="DD=ISPPLIB TSG.SYS1.* TSG.TEST.LINKLIB,V=TEST01" If you wish to display multiple uncataloged DSNs from the same volume, you should use the VOLLIST variable. This indicates the volume on which all the requested datasets reside. If this method is used, you do not need the VOL= parameter on each DSN. Variable : memlist Additionally, the exec may initialise a 'member search option' variable called MEMLIST. This contains a search pattern for the members to be displayed. An example of search patterns and their meaning are listed below. Memlist Parameter Meaning ----------------- ------- * All members ABC Member called ABC ABC* Members starting with ABC *ABC* Members with ABC somewhere within the name ++++ All member names of four bytes +BCD+ All member names of five bytes with B,C and D in positions 2,3 and 4 respectively. Note : To provide compatibility with UNIX, the member search pattern can use a question mark (?) instead of a plus sign. Variable : helpdsn This variable should be set to indicate the location of the PDSFLIST help file (used by the PF1 Help function). Variable : opclass This variable specified the output class that will be used for Print requests. Variable : dsninfo The can be used to invoke the PDSFLIST Dataset Information screen directly. It is useful in execs to display various details about a DSN without going through the PDSFLIST member list display. The following values may be used, D - Display the Dataset Information screen A - Display the Dataset allocation summary V - Display the volume details C - Display the Catalog details Variable - safcheck When using the Generic Filtered List (GFL) function (ie requesting a group of DSNs by partial qualifier), it is useful to avoid any security allocation failure messages. If you wish a "pre allocation" authorisation check to be made, set this variable to Y Below is a sample Exec using PDSFLIST. A similar method is used by , an exec called 'FL' that provides a generalised tool for invoking this REXX function. /* REXX */ Trace pdslist=userid()".PRIVATE.JCL" , /* word list of datasets to display */ userid()".EXEC" memlist="TEST*" /* Show only members prefixed TEST */ call pdsflist exit /* End of exec */ Below is a list of the alternatives when invoking the exec as a TSO command and the action taken. Command Entered Action --------------- ------ FL List all members in userid.PRIVATE.JCL and userid.EXEC (where userid is your TSO ID) FL ABC* List all members starting with ABC from userid.PRIVATE.JCL and userid.EXEC FL *ABC* List all members with the string ABC in them from userid.PRIVATE.JCL and userid.EXEC FL TEST.PDS.EXEC List all members in TEST.PDS.EXEC FL ABC* TEST.PDS.JCL List all members starting with ABC from TEST.PDS.JCL FL *ABC* TEST.PDS.JCL List all members with the string ABC in them from TEST.PDS.JCL FL XYZ* .EXEC List all members starting with XYZ in Partitioned dataset 'userid.EXEC'. FL XYZ* DD=SYSEXEC List all members starting with XYZ in the datasets allocated to DDNAME SYSEXEC. FL ? Display FL command format and examples. PDSFLIST Subcommands -------------------- The following subcommands are available to help you once you enter PDSFLIST. If the command area is not large enough to contain a subcommand and it's parameters, use PF11 to extend the command area. Subcommand : TOP Format : /T Description : Display the first page of the current PDSFLIST level. Subcommand : BOTTOM Format : /B Description : Display the last page of the current PDSFLIST level. Subcommand : CURRENT Format : / Description : Display the list of members starting from this entry. i.e Position this member at top of screen. Subcommand : EDIT Format : X E EDIT Description : Edit the selected member. It should be noted that the ISPF editor will produce a return code of 4 when no data has been changed during an edit session. Subcommand : BROWSE Format : B CAT MORE TYPE Description : Browse the selected member. Subcommand : VIEW Format : V Description : View the selected member. Notes for EDIT/VIEW/BROWSE : Both the member and dsn parameters are optional. By default, the member selected is the one on the line where the subcommand is executed. However, using the member and DSN parameters, you can EDIT/VIEW/BROWSE any specific member directly. Neither the member or dsn parameters have to be within the currently displayed list. If you specify a member but omit the dsn, the dsn used will be that from the entry on the line where the subcommand is executed. Subcommand : ERASE Format : ER ERASE DEL KIL KILL RM Description : Delete the selected member. The name of the deleted member will continue to show in the displayed level, however, the line is protected and *Deleted is shown next to the member name. Subcommand : DELDSN Format : DELDSN DSNDEL Description : Delete the selected DSN. The DSN which contains the selected member is deleted. Once deleted, all entries for that DSN will show as *DSN deleted* Subcommand : RENAME Format : R newmem RE newmem REN newmem Description : Rename the selected member to a new name. The new member name is immediately reflected in the displayed list of members. Subcommand : COPY Format : C newmem newdsn COPY newmem newdsn CP newmem newdsn Description : Copy the selected member to the same dataset or another Dataset. The new member name can be specified as an equals sign '='. In this case, the new member name will be the same as the member that is being copied. The copy operation will not replace any like named members. Use the COPYR (replace) subcommand if need be. A copy command with a new member name of '=' and no new dataset name specified will fail. This is because two members with the same name cannot exist within the same PDS. The dataset that the member is being copied to does not have to be currently being displayed via PDSFLIST. If you are copying to an uncataloged DSN you should include the VOL= (or V=) parameter. Subcommand : COPYR Format : COPYR newmem newdsn CR newmem newdsn CPR newmem newdsn REPLACE newmem newdsn Description : Copy the selected member to a another dataset. If the member name already exists in the target PDS then it will will be overwritten. The dataset that the member is being copied to does not have to be currently being displayed via PDSFLIST. If you are copying to an uncataloged DSN you should include the VOL= (or V=) parameter. Subcommand : MOVE Format : MOVE newmem newdsn M newmem newdsn MV newmem newdsn Description : Moves the selected member to another Dataset. The new member name can be specified as an equals sign '='. In this case, the new member name will be the same as the member that is being moved. The dataset name that the member is being moved to must be specified. The dataset that the member is being moved to does not have to be currently being displayed via PDSFLIST. If you are moving a member to an uncataloged DSN you should include the VOL= (or V=) parameter. Once the member has been moved, it is deleted from the original dataset. The member will only be moved if it does not already exist in the target cataloged dataset. Use the MOVER command if you wish to replace an existing member. Subcommand : MOVER Format : MOVER newmem newdsn MR newmem newdsn MVR newmem newdsn Description : Moves the selected member to a another dataset. If the member name already exists in the target PDS then it will will be overwritten. The dataset that the member is being moved to does not have to be currently being displayed via PDSFLIST. If you are moving a member to an uncataloged DSN you should include the VOL= (or V=) parameter. Subcommand : COMPRESS Format : Z dsn COMPRESS dsn Description : Compresses the requested PDS. If no target DSN is given, then the PDS of the member selected is compressed. Subcommand : LOCATE Format : L member F member Description : Locate the requested member within the list. This member will then be moved to the top of the display. The RFIND PF Key, PF5, can then be used to find subsequent occurrences within the list. Subcommand : SORT Format : /SD /SN /SR Description : Sort the members in the order indicated. The subcommands and their meanings are listed below :- /SD - Sort by Date (Most recent file first) /SN - Sort by Name /SR - Sort by Records (Largest record count first) By default, the sort commands will operate within the dataset that the subcommand was issued against. This enables you to sort the members within a single dataset of a multiple dataset list. However, if you wish to sort across all the displayed DSNs, you should suffix the subcommand with ALL Subcommand : LEVEL Format : FL /L /E /EN LS CD DIR TREE Description : Invoke another level of PDSFLIST with the members from the requested dataset. If the dataset requested is uncataloged you should use the VOL= (or V=) parameter. If no dataset is requested, the dataset(s) currently being displayed is/are used. Examples of the Level subcommand are shown below, Subcommand Action ---------- ------ /L * X99999.EXEC List all members in X99999.EXEC /L X99999.EXEC List all members in X99999.EXEC /L ABC* List all members starting with ABC from the already displayed Dataset list. LS XYZ* > List all members starting with XYZ from the dataset this subcommand was entered against. FL *XYZ* .EXEC List all members with XYZ in their name from the dataset userid.exec (Note : As the DSN starts with a DOT the TSO userid is automatically inserted). Subcommand : INFO Format : I S Description : Display dataset information regarding the member selected. Subcommand : OMIT Format : /O Description : Prevents member information being included in the command being processed. This should be used to Edit a new member within a PDS that is currently empty. For example, /O E NEWMEM would edit a member called NEWMEM within a PDS that has no members in it. Subcommand : Jump function Format : =n Description : Jumps to the requested ISPF panel. Subcommand : Repeat Function Format : = Description : Repeat the last function issued. This can be useful when wishing to invoke multiple edit, browse or copy functions. Subcommand : Retrieve function Format : ? Description : Retrieves the last typed command issued and places it in the command area. PF keys are not retained by this feature. Subcommand : Quit function Format : /Q Description : Quits the current level of PDSFLIST. Subcommand : Cancel function Format : /C /CANCEL Description : Cancels ALL active levels of PDSFLIST. Subcommand : Help function Format : /H /HELP Description : Invokes the Help function. Subcommand : SDSF Format : SDSF Description : Invokes TSO SDSF. PF Key functions ---------------- The PF Keys for PDSFLIST are set as follows :- PF Key Action ------ ------ 1 Flip the PF Key display. 2 Browse the file to the left of the cursor. 3 End current level of PDSFLIST display. 4 Edit the file to the left of the cursor. 5 Repeat Find of a Located member. 6 Sort by name. 7 Scroll list backwards. 8 Scroll list forwards. 9 Sort by Date. 10 Switch to Dataset or Member Statistics. 11 Increase input area to end of line. 12 Refresh the current list. 13 Help facility. 14 Display list from Top. 15 Display list from Bottom. 16 Invoke DLIB facility. 17 Invoke SUBJOB facility. 18 Invoke TSO SDSF. 19 Move display to previous DSN. 20 Move display to next DSN. 21 Print current member list. 22 Invoke another level of ISPF/PDF. 23 Unused. 24 Display version details of PDSFLIST. Usage notes ----------- 1. As this facility is invoked via a Rexx exec, it may be useful to set a PF Key, for example PF24, to TSO. This means that rather than having to prefix all Rexx execs or TSO commands with TSO, you just enter the command name and press the PF Key. 2. Nested executions of PDSFLIST are allowed. Therefore, if you are editing a member from a PDSFLIST display, you can invoke PDSFLIST again from within that Edit session to get further displays. The Level number on the Title line gives an indication of the nested level you are currently displaying. 3. When in nested PDSFLIST displays, PF3 will end the current display and return you to the previous PDSFLIST display level. 4. The 'Type' information is obtained from the Low-Level-Qualifier of the relevant Dataset. 5. Following the execution of a command, the return code it produces is placed in the command area. A return code of zero will result in an asterisk. 6. Flat files are supported and can be browsed and edited. The Fname entry for them is left as blank and the Type entry has DSORG=PS. Other dataset organisations, such as VSAM, BDAM etc. are listed in the same manner (DSORG=VS, DSORG=DA etc.) but you cannot use ISPF functions on them. However, the PDSFLIST information subcommand can be used to obtain dataset details. 7. A PDS that has no members is displayed as a one line entry with the Fname and type left blank. Using either the /O subcommand or the member name parameter of the edit subcommand, new members can be be added to the PDS. 8. The subcommand 'newdsn' (target) dataset can have the HLQ (High Level Qualifier) omitted when it matches your TSO userid. Simply prefix the target dataset with '.' and your userid will be inserted in front. e.g '.TEST.DATA' would be treated as 'userid.TEST.DATA'. 9. Unrecognised PDSFLIST commands are passed to the TSO command search routine, along with a Datasetname(member) parameter list. This allows REXX execs/clists to be invoked from PDSFLIST. The format of the parameter list is compatible with that passed by ISPF from the member list screen. If you wish to execute TSO commands, Rexx execs or TSO Clists and need to pass different parameters, use the /O feature. 10.When displaying uncataloged DSNs, the title line will show 'Uncataloged DSN' and the volume on which the dataset resides. If you request to display a dataset as uncataloged from a particular volume but it is in fact cataloged on that volume, it will be treated as a Cataloged dataset. This is especially relevant when a display exec is invoked from the ISPF 3.4 (DSLIST) panel. It is possible to display both cataloged and uncataloged datasets in the same list. This may be useful to compare members in both production and test parmlib files. Due to the high risk of confusion, you should only do this if the dataset names are different ie, PROD.PRODUCT.PARMLIB and TEST.PRODUCT.PARMLIB. Specifying an uncataloged dataset is supported via the VOL= (or V=) parameter on :- * PDSLIST variable * /L target dsn * COPY and COPYR target dsn * MOVE and MOVER target dsn * EDIT/BROWSE/VIEW target dsn 11.If you request to display a single dataset that has been migrated by HSM, it is treated as a cataloged dataset. However, on a generic request, datasets that are migrated will be shown as "Not recalled". Dataset ALIAS's are also supported. The dataset name shown on the initial PDSFLIST screen will be the ALIAS name, however, when using option I (to display dataset information), the dataset name will be the actual DSN obtained from the VTOC. 12.The Help facility (PF13) requires the helpdsn variable to be set by an exec using PDSFLIST. Once set by one exec, the value is saved across further PDSFLIST executions, until explicitly overriden by another exec. The helpdsn can be either a flat file or a member of a PDS. Note : When defining the variable, you DO NOT have to enclose the dataset name within quotes. 13.The Sysout class (default is R) for the PF21 Print function, can be changed via the opclass variable. Once set by one exec, the value is saved across further PDSFLIST executions, until explicitly overriden by another exec. 14.The CANCEL function results in ALL active levels of PDSFLIST being cancelled. Nesting may occur as a result of a PDSFLIST subcommand or execution from an invoked ISPF environment, eg ISPF edit. If a nested level was entered from an invoked ISPF environment, the CANCEL will return there. However, once that environment is left, the CANCEL is propagated to any outstanding active levels. 15.Most file manipulation functions have UNIX and PC-DOS command compatibility. For example you can use CP to copy a member or CAT to browse a member. Two notable exceptions are COPY with Replace and MOVE with Replace. In UNIX, the copy and move commands default to replace. To provide a degree of safety in the MVS environment, if you use either CP or MV to replace members, you must use CPR or MVR to indicate replacement. 16. When using the member parameter on EDIT/VIEW/BROWSE, you can specify and equals sign (=). This will cause the member name from from the line you are on, to be the member name. 17. All subcommands can use the > (greater than) character to indicate "this line DSN". For example, if you have done a specific member search across multiple datasets but then, wish to display ALL members from one of the datasets in the list, you could use LS > 18. The Generic Filtered List support will only work if the Catalog Search Interface is available. This catalog function is shipped as standard in DFSMS/MVS 1.4 and above. If PDSFLIST finds the CSI support missing, any generic request will be ignored and the dataset will show as "Not allocated". Furthermore, the Catalog details display of the dataset information screen is only available with CSI support.