Macro name. @DIR Edit macro @DIR
users. PDF EDIT users Author: David McRitchie
    
type. Edit Macro resides in SYS1.TSOCLIST, in clist form not in REXX
@DIREdit macro @DIRs data
Related macros There are no specifically related macros; however, @DIR provides the facility to invoke other edit macros.
Related and described here@DIRSTAT, @DIRPARM ABORT, @DIRPARM, @DIR LISTMEM,

Since @DIR has the ability to invoke a specified edit MACRO it can be used in combination with many other macros.

One particularly useful aspect is to search each member for specific strings and if found to interrupt the process so that the user can make changes or invoke additional edit macros before continuing on to the next member.   If a particular member is not identified for processing the @DIR continues on to examine the next member.   Refer to the MACRO Facility of @DIR for further details.

@DIR can obtain a PDS directory list at the terminal in a shorter form than seen in the directory when editing a dataset.   Allows user to find currently updated and/or own userid has last updated.  

@DIR is written in CLIST language and will probably not be rewritten into REXX. . @DIR would not be applicable for use in SPF/PC because PDS datasets do not exist in the world of PC's

Optionally allows user to invoke an EDIT MACRO for all selected members.


ISREDIT @DIR    [...all operands are optional see list and examples below...]

^ has been used throughout in place of the PLI not (¬) symbol, which can be coded in HTML as ¬ for x'AC'.  The character is represented in SPF/PC as x'AA'.  FTP does not have a consistent bi-directional translation which presents additional problems when using macros on both mainframes and PC's.

libraryquotes are optional (provided a period is included). Library name within quotes will be used as supplied; otherwise, will first attempt to prefix USERID (&USERID..), then if not found will attempt to use supplied library as the complete name.

userid(s)(optional) the first four characters will be compared to USERID that last updated member. Only members updated by the specified userid(s) will be selected. When (^) is in use, all members will be selected except those updated by the specified userids. Rejects cannot be mixed with requests. If userids are not specified all members will be listed.

  

      userid                   e.g.   IS03
      ^userid                  e.g.   ^IS03
                                 (show all but this userid)
      userid1 userid2 ... useridn
                               e.g.   IS02 IS03

  special cases
  *             userids will appear with membername
                         $SCRIPT -IS03
  ^*                 show blank userids
  *  ^*              show all userids, including blank userids
  **            userid and date modified will be included
                         $SCRIPT -IS03 -87/11/17
  ** userid     specified userid and date modified will be included
                         $SCRIPT -IS03 -87/11/17

mm/dd/yy(optional - 1st date) if specified only members updated on or after this date will be shown. If STATS missing and mm/dd/yy is specified then the member will not be listed. Date can be displayed see userid special cases above.

mm/dd/yy(optional - 2nd date) a second date can be specified as the upper limit, the first date being the lower limit.

DATE(optional) DATE last updated, and USERID will be displayed for selected members, use of "**" will also do this.

BROWSE(optional) selected members will automatically be browsed. This is faster than using the MACRO() feature which requires use of an edit macro. To terminate enter ===> TSO $DIRPARM ABORT

EDIT(optional) selected members will automatically be placed into PDF EDIT in the same manner as if you had specified MACRO(@DIREDIT) terminate

enter ==> @DIRPARM ABORT

CMD(COPYAFT)
  (optional) copy selected member after .ZLAST of current member, unless name is same as current member.

LISTMEM(optional) adds directory information as data lines at the bottom of the member currently in edit. This option is described in greater depth.

MACRO(macro)
  Invokes the named Edit macro, this use is known as an initial macro or IMACRO. Additional information on the MACRO facility of @DIR can be found on page @DATE. Certain commands are invalid in an initial macro because no data has been displayed (DISPLAY_COLS, DISPLAY_LINES, DOWN, LEFT, RIGHT, UP). Another problem with initial macros may be the use of LMOPEN when the file is already open, for this reason @DIRSTAT cannot be used from the macro @DIR as an initial macro -- @DIREDIT can be substituted only when the PDS is already been opened with LMOPEN. To terminate enter ==> @DIRPARM ABORT

The MACRO(macro) facility is described in greater depth later.

PATTERN(member)
  Copies indicated member from same library as in edit to end changing "$NAME$" to the membername.  The process is repeated for each selected member from the directory library.  This option may suffice for some of the batch procedure PROC=NEWJCL usage in creating JCL etc. from a pattern.  Do not confuse with membername mask() options.

This option is explained in greater depth.
The @ICOPY macro also some material using a pattern.

SUPPRESS(optional) the membername summary written to the screen for members selected will be suppressed, this is automatic for BROWSE, EDIT and for MACRO(@DIREDIT)

from:tolower and upper limit of members to be displayed. Same as FROM(from):TO(to)option below.

FROM(member),
  lower limit of members to be displayed

TO(member)upper limit of members to be displayed, also includes all members which begin with membername.

INDEX(string)
  Member in EDIT will be checked for occurrence of "string" within each membername.

LIBAllows the library whose directory members will be used to be specified later. Use when another library is to be used and the name will not fit on the command line with the other options wanted.

COL(nn)need not be collating sequence. Exact non-match across eight columns. See also XFIND(nn) which is a word match. The counter-part to COL() is LIST().

FIND(nn),Member in EDIT will be searched for "membername" in COL(nn), and as such is a part of the selection criterion. The use of "NX" can be used to restrict selections. This option is slower than LIST(nn) option but is easier to use, does not require list to in collating sequence. Since this is a word comparison membernames in the current member to be examined need only be aligned on a column on the left side and do not need to be filled out with blanks if the membername is less than eight characters. This is especially useful if the membername is followed by a colon or a close parenthesis. The counterpart to FIND() is XFIND, also see COL().

LISTSame as LIST(1), select from presorted list at column 1

LIST(nn),Member in EDIT has members whose names begin in column nn, and as

such is a part of the selection criterion. See also FIND(). The
counterpart to LIST() is COL().

XFIND(nn),Members are excluded from selection if they can be found in

column nn as in "FIND 'string1' word nn". The counterpart to
XFIND() is FIND(), see also COL().

NXRestrict COL(), FIND(), XFIND() to NX lines.

INDEX(index)
  Member name must contain the INDEX string anywhere in the membername.

MASK(mask)
  Member name must match masking, multiple masks may be entered.

maskcorresponding position of membername blank) ignore testing this position (not currently available use "-" instead)

"-"ignore testing this position ( -, minus sign or hyphen)

"%"must be A-Z, or "@". or "#", or "$"

"#"must be 0-9, a single numeric digit ( #, number sign)

"*"must be blank (asterisk).  Usually used to force an exact match in the number of characters to less than eight.

@ # $must be an exact match

A-Z, 0-9must be an exact match

$NDUUseful for global updating using a MACRO(imacro). Works similar to LISTMEM except that entry will appear based on the invoked macro. The invoked macro must set @DIRNOTE to a non-blank value and issue a ISPEXEC VPUT (@DIRNOTE) SHARED. Directory information will remain essentially unchanged, except that the USERID will prefixed with an "X-". The invoking member, which need not be in the same library, will get updated with information supplied by the macro within MACRO(). For example see the macros (if still available) used by Operations Support and/or D.McRitchie -- ACCTG06, ACCTNO, CTDIFIX, RESPLIT.

e.g.
COMMAND ==> @DIR MACRO(macro) SUPPRESS $NDU

NDUDo not update date when changed by MACRO(). Userid will receive "X-" prefix same as $NDU option. By itself will not cause or require update to invoking member.

NOSHOWDo not show membername list -- might be equivalent to SUPPRESS,

though coded in a much different area.

STETDo not update statistics when changed by MACRO().

NUSER(newuserid)
  Reassign selected members to the newuserid id. If used with the LISTMEM option, the listed members will show the old userid, but the directory will be updated. Options EDIT, BROWSE will be ignored. This option provides the function found in the RESET PDF Utility (3.3) coupled with all of the selection capability of @DIR.
e.g.
@DIR NUSER(IS03-xx) FIND(1) is03 from(z) index(h)
@DIR NUSER(IS03-yy) FROM(z) TO(z)

Examples:

@DIRdisplays membernames only of all members in the library of

 the member currently in edit.

@DIR *displays membername and last update userid (*) for all members in the library of the member currently in edit.

@DIR **displays membername, last update userid, date of last update for all members of the dataset currently in edit.

@DIR  *  ^IS03
 excludes userid IS03 (^IS03) from the display of all membernames in the library of the member currently in edit the additional asterisk (*) in front of the requested userid
causes the last update date to also be displayed.

@DIR 10/01/85
 displays membername and last update userid for all members in the library of the member currently in edit which have stats indicating updated on/after 10/01/85.

@DIR TSOMODEL.PUBLIC.TEXT ^IS27
 displays membername and last update userid for all members in the library "TSOMODEL.PUBLIC.TEXT" which were last updated by a user other than "IS27" including members for which the userid is missing.
@DIR TO(A)displays all membernames from lowest possible "$$$$$$$$" through" A9999999".

@DIR FROM(Y) TO(Z)
 displays all membernames from "Y" through "Z9999999".

@DIR TSOMODEL.PUBLIC.TEXT 08/15/85
 displays selected membernames in the "TSOMODEL.PUBLIC.TEXT" library which were last updated on or after 08/15/85 according to STATS present for each member.

Additional parameters and examples describing the LISTMEM options can be found on page @DATE-1.

More examples: done while editing dsname and member SYS1.TSOCLIST($)

@DIR * 10/01/85 show userid for all members after specified date
 
$       -IS03 $B      -IS03 $DMS     -IS03 $EDIT   -IS03
$EDITB  -IS03 @B      -IS03 @DIR     -IS03 @TSO    -IS03
ALIGNJCL-IS03 BROFIL2 -IS02 CSTMAIL1 -IS0J CSTTSLOG-IS0J
DATASPAN-IS03 DDNAME  -IS03 GETACCT  -IS02 GETMAIL -IS0J
IFPSDEMO-IS03 IFPSFOC -IS03 IFPSFS   -IS03 IFPSPLUS-IS03
IFPS10VB-IS03 ISRFC07 -IS0J IS0RTEST -IS0R MAIL    -IS0JA
NETMANT -IS0P NETMANX -IS0P NETMAN30 -IS0P PROFILU -IS0RA
PROFIL2 -IS27 PROFIL2B-IS27 PROFIL2P -IS27 PROFIL2X-IS27
QMFGACCT-IS0E SENTRY  -IS03 SORTCR   -IS03 SORTEM  -IS03
SYSDB2A -IS27 TSYSOUT -IS02
**SELECTED 38 OF 323, NO UNMATCHED USERIDS,
** REJECTED 285 BEFORE LMOD-DATE 10/01/85
@DIR 10/01/85 all members after specified date
 $ $B $DMS $EDIT $EDITB @B
 @DIR     @TSO     ALIGNJCL BROFIL2  CSTMAIL1 CSTTSLOG
 DATASPAN DDNAME   GETACCT  GETMAIL  IFPSDEMO IFPS
 IFPSFS   IFPSPLUS IFPS10VB ISRFC07  IS0RTEST MAIL
 NETMANT  NETMANX  NETMAN30 PROFILU  PROFIL2  PROFIL2B
 PROFIL2P PROFIL2X QMFGACCT SENTRY   SORTCR   SORTEM
 SYSDB2A  TSYSOUT
**SELECTED 38 OF 323, NO UNMATCHED USERIDS,
** REJECTED 285 BEFORE LMOD-DATE 10/01/85
LISTMEM [top] [bottom]

LISTMEM support facility of @DIR

LISTMEM, adds directory information as data lines at the bottom of the member currently in edit.


1...5...10...15...20...25...30...35...40...45...50...55...60...65 create modify modif curr. orig. modif. modif. MEMBER VV.MM LCDATE LMDATE MTIME LCNORC LINORC LMNORC LUSER @DIR 01.99 85/12/30 91/02/27 09:47 677 82 0 IS03 AFIXNC78 01.02 85/12/27 85/12/27 17:32 24 23 0 IS03.... 1...5...10...15...20...25...30...35...40...45...50...55...60...65

The dialog variable and values are as follows: (SC34-4119 ISPF/PDF Services)

ZLVERSVersion number; a number from 1 to 99. |
ZLMODChange level; a number from 0 to 99. |
ZLCDATECreation date
ZLMDATE Last change date |
ZLMTIMELast change time |
ZLCNORCCurrent number of records; a number from 0 to 65535. |
ZLINORCBeginning number of records; a number from 0 to 65535. |
ZLMNORCNumber of changed records; a number from 0 to 65535. If there are no sequence numbering then this number will be zero, because there are no lines that can be identified as changed.
ZLUSERUser ID of the last user to change the member; the user ID can have a maximum length of seven characters. It can be changed to some other value using PDF option 3.5 RESET ISPF Statistics.

LISTMEM support options
LISTMEMMembername and STATS as seen in directory will be added at the end of the member currently in edit. This parameter is not needed by implication if $BUILD$ $BUILD$T SPECIAL RECS().
AST(a)Single non-blank character used in place of asterisk if member is found. See COL() FOUND().
BEGIN()Directory string will be prefixed by content |
COL()No directory line added if membername already appears in specified column. Also see NX option. Exact non-match across eight

columns. See also XFIND().

FOUND()Optional with COL(), FOUND() specifies a single blank column for a change command to place an "*" if member is found in the PDS. If specified column non-blank no change for the line can be done. Change occurs only on the first occurrence. If LISTMEM is also specified, then in addition to the above members not found will be added at the end.
NXRestrict COL() search to NX lines
RECS()Optional with COL(), RECS() specifies column for a change command to place number of records, requires six blank columns.Turns on LISTMEM, which will place all members not found in COL(nn) at end of your member in edit. Change occurs only on the first occurrence.
$BUILD$Order is ZLMDATE ZLMTIME ZLUSER ZLCNORC |
$BUILD$TOrder is ZLMDATE ZLMTIME ZLUSER ZLCNORC ZLUSER |

LISTMEM support facility of @DIR (continued) |
Before hitting ENTER with "LISTMEM SYS1.TSOCLIST 10/01/85" on command the li
EDIT -- IS03.LIBR.CNTL(Z@DIR) - 00.00 --------------------------------------
COMMAND ===> @dir $BUILD$T 'SYS1.TSOCLIST' from(@) to(@) 10/01/85
****** *************** TOP OF DATA **********************
****** ************ BOTTOM OF DATA **********************
After hitting ENTER, directory material obtained from "SYS1.TSOCLIST".
EDIT -- IS03.LIBR.CNTL(Z@DIR) - 00.00 --------------------------------------
COMMAND ===>
****** ********** TOP OF DATA ************************
COLS> ----+----1----+----2----+----3----+----4----+- ... --6----+----7----+-
00001 =============== 04/23/86 16:43:59 @DIR SYS1.TSOCLIST $BUILD$T
00002 @CAPS    85/09/26 09:51  18 IS03 ............. ... ...... IS03
00003 @DIR     86/04/23 15:44 372 IS03 ............. ... ...... IS03
00004 @PRINT   86/02/26 21:40  32 IS03 ............. ... ...... IS03
00005 @SMALLS  85/09/23 18:57  93 IS03 ............. ... ...... IS03
00007 @STRAPD  86/01/29 18:41  52 IS03 ............. .......... IS03

======== 08/09/88 19:43 @DIR 'IS03.SHARE.TEXT' TO($) $BUILD$ =============
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75.
$BROWSE  88/03/18 13:19   41

======== 08/09/88 19:43 @DIR 'IS03.SHARE.TEXT' TO($) $BUILD$80 ===========
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75.
$BROWSE  88/03/18 13:19   41 ....IS03

======== 08/09/88 19:44 @DIR 'IS03.SHARE.TEXT' TO($) $BUILD$T ============
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75.
$BROWSE  88/03/18 13:19   41 IS03
EDIT -- IS03.SHARE.TEXT(@DIR) - 00.00 -----------------------------
COMMAND ===> @DIRSTAT
****** *********************** TOP OF DATA *****************************
NOTE== === MEMBER-- VV.MM CREATED- ---MODIFIED--- CURR INIT MOD LASTUSER
NOTE== === @DIR 01.32 85/12/30 86/05/02 17:17 296 82 0 IS03
NOTE== =========================================
00001 You can obtain the STATISTICS seen in the directory, by invoking
00002 edit macro @DIRSTAT as shown above which obtains the statistics
00003 at the time of invocation. The @DIREdit macro which displays
00004 a similar heading was supplied information in a different manner.
COMMAND ===> @DIRSTAT CLIST
NOTE== === MEMBER-- VV.MM CREATED- ---MODIFIED--- CURR INIT MOD LASTUSER
NOTE== === CLIST    01.00 91/02/08 91/02/08 16:11 1421 1421 0 IS03
NOTE==
MACRO FACILITY OF @DIR    [top] [bottom]

The MACRO(macro) facility of @DIR indicates an edit macro that is to be run upon selection by the @DIR macro. MACRO implies EDIT.

You will find that using TSO to search large libraries is very slow so you might wish to consider using a batch job instead.   Some jobs which may be of interest to you reside in IS03.SHARE.CNTL and are described in a member named @INDEX which describes other members in this library such as SLCTTSO, and EDITISPF. EDITISPF is shown in APPENDIX B with directions on using it.  Latest method use -- Option 2.3.14 SEARCHFOR to narrow original selections down, then use the FIND(col) option when invoking @DIR.


additional parm options [top] [bottom]

MACRO(your_macro) specify a macro in your CLIST library.   For convenience a simple edit macro has been made available name @DIREDIT which will put you into edit mode and supply you with the statistics.

EDIT same as use of MACRO(@DIREDIT)


  sample macro 
    ISREDIT MACRO
    ISREDIT X ALL
    ISREDIT F ALL 'RJE'
    ISREDIT F ALL 'R J E'
    ISREDIT F ALL REMOTE
    ISREDIT F ALL PRINTER
    ISREDIT F ALL 'R6'
    ISREDIT SEEK ALL NX ' '
    ISREDIT (SEEKSTRS,SEEKLNS) = SEEK_COUNTS
    IF &EVAL(&SEEKSTRS) = 0 THEN DO
       ISREDIT CANCEL
       EXIT CODE(0)
    END
    ISREDIT @DIRSTAT

  sample macro 
    ISREDIT MACRO
    ISREDIT F T'.SE NTITLE'
    IF &LASTCC ^= 0 THEN DO
       ISREDIT END
       EXIT CODE(0)
    END
    ISREDIT (MEMBER) = MEMBER
    ISREDIT LINE_BEFORE .ZCSR = -
         DATALINE ".se nmember = &MEMBER."
    ISREDIT END

  sample macro 
    /*REXX*/
    address "ISREDIT";"MACRO"
    "F T'.se NTITLE'"
    IF RC /= 0 THEN DO
       "END"
       EXIT 0
    END
    "(MEMBER) = MEMBER"
    "LINE_BEFORE .ZCSR =",
        "DATALINE "".se nmember =" MEMBER""""
    ISREDIT END

The use of an edit macro on all members in a library is a very useful tool.  Used unwisely it can be very damaging.   Please do not use ISREDIT END in your edit macro until you are sure of your results.   You should make a trial run of your edit MACRO before having it invoked as in initial macro.


========= change your mind ABORT facility for @DIR ========

Should you change your mind about continuing and if the macro stops in EDIT for you to examine or make changes to the member you can terminate further processing by entering the following on the EDIT panel screen
====> @DIRPARM ABORT
or if you are in BROWSE the TSO version must be used
====> TSO $DIRPARM ABORT


Although the use of a macro within a macro give certain advantages such as being able to make a closer check of each member selected it will tie up your terminal in the process.  Using a batch job to perform a similar search // EXEC SLCTTSO //SEARCH DD * *RJE* *R J E*

    *REMOTE*
    *PRINTER*
    *R6*
    //SYSIN    DD  *
    @         Select only entries with "@" in pos 1 of membername
The SearchFor options of SuperC provides a quick search facility and can be run in batch.   For more information refer to member SUPERC which has some batch examples.   Using SuperC for searches under TSO also check out macros @SEARCH4, and the execute equivalent SEARCH4. Also SRCH400 which invokes SRCH401 internally will simplify the list for viewing.


//SEARCH   DD  *
*RJE*
*R J E*
*REMOTE*
*PRINTER*
*R6*
//SYSIN    DD  *
@

Select only entries with "@" in pos 1 of membername The SearchFor options of SuperC provides a quick search facility and can be run in batch. For more information refer to member SUPERC which has some batch examples. Using SuperC for searches under TSO also check out macros @SEARCH4, and the execute equivalent SEARCH4. Also SRCH400 which invokes SRCH401 internally will simplify the list for viewing.

pattern [top] [bottom]

PATTERN FACILITY OF @DIR
See also PATTERN changes in macro @ICOPY

This facility allows you to copy a pattern from within the library of the member that you are in EDIT on when you invoke the @DIR macro.

Suppose you have a member named PATTJCL as follows:

//5NAME$   EXEC ASMHCL,SYSOUT=V
//SYSLIN   DD  DSN=&&$NAME$,DISP=(,PASS)
//SYSIN    DD  DSN=SYS6.SOFTWARE.PKGA.FIXES($NAME$),DISP=SHR
//L.SYSLMOD DD DSN=SYS6.SOFTWARE.PKGA.LOAD($NAME$),
//             DISP=SHR,UNIT=,SPACE=
Then you enter a command in one of the following forms:

===> @DIR PATTERN(PATTJCL)  'another.pds.library'  FROM(B) TO(CC)

===> @DIR PATTERN(PATTJCL)  LIB  FROM(B) TO(CC)

The LIB option will request the name of the library whose directory entries you will be using.  Specify dsn without quotes when prompted.  The results will be that the pattern is copied and the "$NAME$" string will be replaced for each selected member. The use of a PATTERN() will be mutually exclusive to the use of LISTMEM $BUILD$ $BUILD$T and MACRO().  Suppose members selected include CHOOSE, GETRPT, and LSTSET. The generated JCL that would be added at the bottom would appear as follows:

//CHOOSE   EXEC ASMHCL,SYSOUT=V
//SYSLIN   DD  DSN=&&CHOOSE,DISP=(,PASS)
//SYSIN    DD  DSN=SYS6.SOFTWARE.PKGA.FIXES(CHOOSE),DISP=SHR
//L.SYSLMOD DD DSN=SYS6.SOFTWARE.PKGA.LOAD(CHOOSE),
//             DISP=SHR,UNIT=,SPACE=
//GETRPT   EXEC ASMHCL,SYSOUT=V
//SYSLIN   DD  DSN=&&GETRPT,DISP=(,PASS)
//SYSIN    DD  DSN=SYS6.SOFTWARE.PKGA.FIXES(GETRPT),DISP=SHR
//L.SYSLMOD DD DSN=SYS6.SOFTWARE.PKGA.LOAD(GETRPT),
//             DISP=SHR,UNIT=,SPACE=
//LSTSET   EXEC ASMHCL,SYSOUT=V
//SYSLIN   DD  DSN=&&LSTSET,DISP=(,PASS)
//SYSIN    DD  DSN=SYS6.SOFTWARE.PKGA.FIXES(LSTSET),DISP=SHR
//L.SYSLMOD DD DSN=SYS6.SOFTWARE.PKGA.LOAD(LSTSET),
//             DISP=SHR,UNIT=,SPACE=


Internal Aspects:    [TSO code] 
The library name must be at least 8 characters in length; otherwise, it may be taken to be a userid.  i.e. sys1.tsoclist or 'sys1.tsoclist'

PFKeys are retained when @DIR is invoked and are restored when @DIR ends this macro does not otherwise change PFKEY content, but allows the user to make changes during use of @DIR, which will be undone when @DIR ends.


You are visitor  counter since count started May 29, 1997.

Comments

Please send your comments concerning my pages or materials to:  David using send email comments

Disclaimer and site usage:  Material at The REXX Macros Toolbox is available without warranty of any kind.  Redistribution of source, coding and documentation other than from this site is prohibited.

Copyright © 1995 - 2006, F. David McRitchie, All Rights Reserved