'IS03.SHARE.TEXT(NCADD)' -- April 1st, 1995 6:54 a.m. -- dev(1403W8) -- ART001 .df $$DFNAME. type( '' ) codepage +------------------------------------------------------------------------------+ | | | | | The Toolbox | | | | Items in this section: | | | | 1. Edit Macros | | 2. Checking JCL with !EDCHEK | | 3. PF keys | +------------------------------------------------------------------------------+ -------------------------------------------------------------------------------+ By David McRitchie (E-Mail ID - DMcRitchie@hotmail.com ) Intended audience -- TSO users already familiar with and who use the BROWSE, and EDIT menu options of PDF (Program Development Facility). The Toolbox column will provide information on using clists, utilities, and other in-house tools. This month's column will describe several EDIT macros that have some bearing on comparisons and/or working with JCL. EDIT Macros EDIT macros are invoked by entering the macro name on the command line, just like edit commands. EDIT macros are a collection of commands, which may consist of any number of edit commands, CLIST (Command List) commands, REXX executes, or other EDIT macros. The advantage of using a macro just like using a clist is to execute many commands toward a single goal, keying in as little as possible. Edit macros have access to the datasetname and membername currently in edit, and can use this information to invoke commands without having to key it in on some other panel. Comparison of PDS members SUPERC and SUPERCE (PDF options 3.11 and 3.12) are available on panels with lots of options and HELP panels. For normal comparisons the use of a specially designed edit macro such as @COMPARE may serve you better. @COMPARE can make choices based on file attributes or other criteria determined within the macro. A major advantage of using an EDIT macro, such as @COMPARE, is that the dataset name and member you are editing will be determined by the macro, eliminating the need to reenter this information on a SUPERC panel. Another advantage of using an EDIT macro is that the END key returns to the same edit panel and data that you were working with before you invoked the EDIT macro. ===> @COMPARE member Compare member in edit with another member in the same library. ===> @COMPARE * Compare the unsaved member in edit with the previously saved member of the same name in the same library. ===> @COMPARE datasetname Compare member in edit with same named member in another fully qualified dataset. ===> @COMPARE datasetname(member) Compare saved member in edit with a member of same or different name in another fully qualified dataset. Additional options may be added: LIST(LONG|DELTA), LONG lists all lines not just changed lines, DELTA is the default. CTYPE(FILE|LINE|WORD|BYTE), comparison type of LINE is the default. R, to use current as the OLD file instead of being the new file (Reverse). Additional information is available for @COMPARE and many other clists, and TSO commands online. Try each of the following at your terminal. TSO CLIST @compare HELP TSO QHELP outdes TSO QHELP allocate QW T=ALLOCATE An actual clist (also edit macros) may be examined as follows: TSO CLIST @save @SAVE Will issue a SAVE, only if the data has been changed. Doing a save when nothing has been changed will fill up a PDS library just as fast as if there had been something that needed to be saved. This macro may help alleviate the need to compress by only saving when the data has been changed. SYSDSN related clists. The SYSDSN macro is intended to be used on several pfkeys, described later. In each usage the cursor must be repositioned at or within a dataset name or member name, and the command issued via PFkey. For SYSDSN an indication of OK appears in the upper right corner if the dataset does infact exist. Exit from the following is by means of the END key, which returns you to the panel from which you invoked the macro. SYSDSN BROWSE will invoke browse for the indicated dataset (also available using TSO $BROWSE datasetname). SYSDSN EDIT (or EDITDSN) will place you into edit of the dataset name at the cursor (also available with TSO $EDIT datasetname). EDITMEM will place you into edit of the member name located at the cursor (also available using EDIT membername). Realignment of JCL and boxing JCL comments Use of the FIXJCL macro will realign JCL. Normal precautions would be to save the member before invoking and to use !EDCHEK afterwards to check out the JCL. Use of JCLBOX will indent and place within asterisked comment cards all lines indicated by a single CC-range. Variations exist for CLIST (CLISTBOX) and for REXX (REXXBOX). Checking JCL !EDCHEK EDCHEK will check JCL for syntax and other errors. A return code of 00 is ideal. A return code of 04 will usually work. A return code of 08 or higher will almost certainly fail. EDCHEK is a valuable tool, it is not infallible. The use of LOCATE SPECIAL can help you get to notelines quickly. The exclamation point (!) used with !EDCHEK is required and denotes usage as a program macro. PF keys After you have tried the above items you may wish to set up PF keys for convenience. For example: Pfkeys 1-12 are left alone except as follows: PFK 4 ===> :TS (Text Split) PFK 12 ===> CURSOR PFK 13-16 (reserved for usage not shown) PFK 17 ===> SYSDSN BROWSE (will browse dsn) PFK 18 ===> SYSDSN PFK 19 ===> EDITDSN PFK 20 ===> EDITMEM PFK 21 ===> *open for temporary assignment* PFK 22 ===> !EDCHEK PFK 23 ===> *open for temporary assignment* PFK 24 ===> RETRIEVE The Text Split(:TS) will split a single line at the cursor, use of PFkey reduces several repositionings of the cursor. n ART001 on