/* GETHELP  Get Help on Cmnd/Prog (View Descr)    10/29/1998-12/18/1998
/* --------------------------------------------------------------------

   PROC 1 P,     /* Partition with text of command/program or:       */+
                 /* GH   - Get help on GETHELP command               */+
                 /*        (Equivalents: '?', '/')                   */+
                 /* SC   - Display list of commands and abbrev       */+
                 /* DL   - Display list of preset DSN prefix abbrev  */+
                 /* LIB  - Display list of preset lib prefix abbrev  */+
          I(X),  /* Symbolic library identification                  */+
          G(X),  /* Symbolic library group                           */+
          L(*)   /* Symbolic library name
                 /* Note:  Use BR to view entire command/program text

   CONTROL NOCAPS
/* CONTROL SYMLIST,CONLIST,LIST,MSG

/* Display Help on Selected Commands ----------------------------------

   SELECT (&STR(&P))
     WHEN (GH|&STR(?)|&STR(/)) +
          DO
             %GETHELP GETHELP  /* Get help on GETHELP command
             EXIT
          END
     WHEN (SC)  +
          DO
             %SC ?             /* Display list of commands and abbrev
             EXIT
          END
     WHEN (DL)  +
          DO
             %DL ?             /* Dspl list of preset DSN prefix abbrev
             EXIT
          END
     WHEN (LIB) +
          DO
             %FORMLIB ?        /* Dspl list of preset lib prefix abbrev
             EXIT
          END
   END

/* Form Symbolic Library Partition Selection Parameters ---------------

   GLOBAL   IDENT,GROUP,LIB,PART
   %FORMLIB &P,I(&I),G(&G),L(&L),S(GH)

/* View Description of Specified Command/Program ----------------------

   IF (&SYSINDEX(&SUBSTR(1:3,&LIB)_,CLI_REX_PRO_)>0) +
      THEN IF ((&STR(&PART)=8)|       +
               (&STR(&PART)=&STR(*))) +
              THEN ISPEXEC VIEW DATASET('&IDENT..&GROUP..&LIB') +
                                MACRO  (HELP&SUBSTR(1:3,&LIB))
              ELSE ISPEXEC VIEW DATASET('&IDENT..&GROUP..&LIB.(&PART)')-
                                MACRO  (HELP&SUBSTR(1:3,&LIB))
      ELSE IF ((&STR(&PART)=8)|       +
               (&STR(&PART)=&STR(*))) +
              THEN ISPEXEC VIEW DATASET('&IDENT..&GROUP..&LIB') +
                                MACRO  (EDITPRO)
              ELSE ISPEXEC VIEW +
                           DATASET('&IDENT..&GROUP..&LIB.(&PART)') +
                           MACRO  (EDITPRO)
