ZZUtils - ZZUTIL


This is the user-customizable front-end to the ZZUtils menu program.  Refer to the embedded comments for instructions on how to include and exclude both ZZUtils modules and user-written programsfrom the on-line menu.

ZZUtils is a collection of Natural utilities.


Menu program for ZZUtils

************************************************************************
* Program : ZZUTIL
* System  : ZZUTILs
* Function: Natural Utilities Menu
* Author  : Ralph G. Zbrog
* Written : 02/18/89
* Maintenance log :
************************************************************************
*   Date   ||   Name   || Summary of Changes
************************************************************************
*          ||          || 
************************************************************************
* Purpose : Simplify access to Natural utility programs
*
*           A maximum of thirty menu entries may be defined.  Each entry
*           is comprised of an eight character program name and a
*           twenty-five character description.
*
*           Well-behaved programs may be added to the menu.  These are
*           standalone programs which terminate normally via a STOP
*           statement.  ZZUTIL controls execution via STACK COMMAND
*           statements.  Each program may be executed in three ways:
*           selection from the ZZUTIL menu; "ZZUTIL n" at the NEXT
*           prompt, where "n" is the corresponding ZZUTIL entry number;
*           "program" at the NEXT prompt, where "program" is the name of
*           utility program.
*
*           Ill-behaved programs may be added to the menu at the user's
*           discretion, but ZZUTIL may be unable to regain control.
*
*           A menu entry may point to a program which does not exist, or
*           which is not accesible to the user's current library or step
*           library.  ZZUTIL issues an error message to that effect.  An
*           alternative to the error message is to remove the entry from
*           ZZUTIL and catalog it as a customized version in the user's
*           library.
*
*           If a menu entry is to be removed but may be reinstated at a
*           later time, it should not be deleted; this would require
*           re-keying the program name and description.  Rather, the
*           entry should be moved beyond a delimiter, a blank program
*           name, eliminating it from the menu at execution time.
*
*           ZZUTIL assumes that Natural Security has initialized
*           *USER-NAME in the format 'Last, First I. (Dept)', where
*           '(Dept)' is an optional department name.  For non-employees,
*           '(Dept)' could designate a company name or contractor
*           status.
*
* Calls to: ZZUTIL02
*     from: None
* Exits   : Various utility programs
* Input   : None
* I/O     : None
* Output  : None
************************************************************************
*
DEFINE DATA LOCAL
1 MAX#(I1)                             /* Max menu entries
                   CONST<30>           /* MUST be set to 30
1 TABLE(A33/MAX#)  /* Up to 30 menu entries; Null entry is delimiter
                   INIT <'ZZADACMD' - 'ADABAS command analysis  ',
                         'ZZBLKSIZ' - 'Block size computation   ',
                         'ZZCALC  ' - 'Calculator               ',
                         'ZZDATES ' - 'Date conversions         ',
                         'ZZDUMP  ' - 'Module formatted dump    ',
                         'ZZERRMSG' - 'SYSERR message list      ',
                         'ZZLIST  ' - 'List a Natural module    ',
                         'ZZLOCATE' - 'Locate a Natural module  ',
                         'ZZSRCNT ' - 'Count source lines       ',
                         'ZZSWITCH' - 'Switch a module"s type   ',
                         'ZZVECOPY' - 'Copy verrule to work area',
                         'ZZVEDATE' - 'List verrule time stamps ',
                         'ZZVELIST' - 'List verification rules  ',
                         'ZZVESCAN' - 'Scan verrules  (beta)    ',
                         'ZZWHOIS ' - 'Identify a Userid by name',
                         'ZZWHOLST' - 'Userid list              ',
                         '        ' - 'Delimiter                ',
                         'XXXXXXXX' - 'Sample "removed" entry   ',
                         '        ' - '                         '>
                        1 REDEFINE TABLE
  2 LINE(MAX#)
    3 PGM(A8)
    3 DSC(A25)
1 MENU(MAX#)
  2 SEL(N2)
  2 PGM(A8)
  2 TXT(A25)
*
1 #MISC
  2 #MAX(N2)                           /* Number of menu entries
  2 #I(I1)
END-DEFINE
*
*
FOR #I 1 MAX#                          /* Verify table
  IF  TABLE.PGM(#I) = ' '              /* Delimiter
    THEN
      ESCAPE BOTTOM
  END-IF
  ASSIGN MENU.SEL(#I) = #I
  ASSIGN MENU.PGM(#I) = TABLE.PGM(#I)
  ASSIGN MENU.TXT(#I) = TABLE.DSC(#I)
END-FOR                                /* (0990)
COMPUTE #MAX = #I - 1                  /* # menu entries
*
CALLNAT 'ZZUTIL02' #MAX MENU(*)
END



Return to top.

Return to Ralph G. Zbrog's home page.

Last updated April 25, 1998, by Ralph G. Zbrog.