.PROC,DISLIB*I,
R "- Record name (or ALL or *)"        = (*N=*,ALL=*,*,*F),
T "- Type of record"                   = (*N=,ABS,CAP,OPL,OPLC,OPLD,OVL,
                                               PP,PPU,PROC,REL,TEXT,ULIB),
L "- Library file name"                = (*N=#FILE,*F),
UN "- User Name containing library"    = (*N=,*F),
O "- Output file name"                 = (*N=OUTPUT,*F),
DO "- Display Option"                  = (*N=S,BRIEF=S,B=S,FULL=F,F,D),
.
.HELP
 The DISLIB procedure DISplays the record content of a LIBrary file.
 Requires CATALOG binaries with GENCAT entry point.

 Parameter   Default   Description
   Name       Value

  [r]                  record name to display (or ALL or *)
  [t]                  type of records being displayed
  [l]                  library file to display
  [un]                 user name in which library resides
  [o]        OUTPUT    file to which library content is displayed
  [do]         b       display option for library display

.HELP,R
 The R parameter names the record to display from a library file.
 By default all records are displayed.
.HELP,T
 The T parameter specifies the record type displayed from a library.
 The default is to display all record types.
.HELP,L
 The L parameter names the file from which record names are displayed.
 The default value is the file containing this procedure.
.HELP,UN
 The UN parameter specifies the User Name location of the file.
 The default value is the User Name in which this procedure executes.
.HELP,O
 The O parameter names a file to which library content is displayed.
 The default value is OUTPUT.
.HELP,DO
 The DO parameter specifies the display option to use.
 Options are:  B | BRIEF  - for brief display (default value)
          or   F | FULL   - full display
          or   D  - for directive display (LIBEDIT directives)
.ENDHELP
.IFE,FILE(L,.NOT.AS),NOTLOCAL.
  GETFILE,L,L,UN,READ,A=YES.
.ENDIF,NOTLOCAL.
.IFE,($R$.EQ.$*$).AND.($T$.EQ.$$),LISTALL.
  .IFE,$DO$.EQ.$F$,FULLOPT.
    $ITEMIZE,L,#L=O,PW=136,N,E,U.
  .ELSE,FULLOPT.
    /GENCAT,L,#R,N,U,LO=DO,#L=O.
  .ENDIF,FULLOPT.
.ELSE,LISTALL.
  .IFE,$T$.NE.$$,LISTTYPE.
    GETLIB,R,L,UN,YYY_T,T.
  .ELSE,LISTTYPE.
    GETLIB,R,L,UN,YYY_T.
  .ENDIF,LISTTYPE.
  $IFE,FILE(YYY_T,.NOT.AS),NO_T.
    .IFE,$T$.NE.$$,TYPENAMED.
      $REVERT. NO T RECORDS ON L
    .ELSE,TYPENAMED.
      $REVERT. RECORD R NOT ON L
    .ENDIF,TYPENAMED.
  $ENDIF,NO_T.
  .IFE,$DO$.EQ.$F$,FULLOPT.
    $ITEMIZE,YYY_T,#L=O,PW=136,N,E,U.
  .ELSE,FULLOPT.
    /GENCAT,YYY_T,#R,N,U,LO=DO,#L=O.
  .ENDIF,FULLOPT.
  $UNLOAD,YYY_T.
.ENDIF,LISTALL.
$SKIP,NOERROR.
  $EXIT.
  $UNLOAD,YYY_T.
  $IFE,(EF.EQ.TIE).OR.(EF.EQ.TAE),TERMINATED.
    $EXIT. DISLIB *TERMINATED*
  $ENDIF,TERMINATED.
  $REVERT,ABORT. DISPLAY OF L FAILED
$ENDIF,NOERROR.
.IFE,FILE(L,.NOT.AS),FILEPRM.
  $UNLOAD,L.
.ENDIF,FILEPRM.
$REVERT. DISPLAY OF L --> O
/EOR
