.PROC,CRECOM*I,
R "- Record name receiving comment"    = (*F),
T "- Type of record receiving comment" = (ABS,CAP,OVL,PP,PPU,REL),
C "- dollar delimited Comment string"  = (*A,
                              *N=$COPYRIGHT CONTROL DATA SYSTEMS INC. 1984$),
L "- Library file name"                = (*N=#FILE,*F),
.
.HELP
 The CRECOM procedure CREates COMments on library file records.

 Parameter   Default   Description
   Name       Value

   r                   record to which comment is added
   t                   type of record receiving comment
  [c]       See HELP   dollar sign delimited comment string
  [l]                  library file containing the record

.HELP,R
 The R parameter names the records to which comments are added.
.HELP,T
 The T parameter selects the type of record being modified.
.HELP,C
 The C parameter value specifies a 1-40 character comment string.
 The default value is COPYRIGHT CONTROL DATA SYSTEMS INC. 1984.
.HELP,L
 The L parameter names the library to which the record is written.
 The default value is the file containing this procedure.
.ENDHELP
GETFILE,L,L,A=YES.
$LIBEDIT,P=L,N=L,B=0,#L=YYYYERR,LO=EM,I=YYYYCOM,U=L.
$SKIP,NOERROR.
  $EXIT.
  $REWIND,YYYYERR.
  $COPYEI,YYYYERR,OUTPUT.
  $UNLOAD,YYYYCOM,YYYYERR,ZZZZZG2.
  $IFE,(EF.EQ.TIE).OR.(EF.EQ.TAE),TERMINATED.
    $EXIT. CRECOM *TERMINATED*
  $ENDIF,TERMINATED.
  $REVERT,ABORT. CREATE COMMENT R --> L FAILED
$ENDIF,NOERROR.
$UNLOAD,YYYYERR,YYYYCOM,ZZZZZG2.
$IFE,.NOT.((FILE(L,PM)).AND.(FILE(L,WR))),REWRITE.
  REPFILE,L,L,DEFINE=YES.
$ENDIF,REWRITE.
.IFE,FILE(L,.NOT.AS),FILEPRM.
  $UNLOAD,L.
.ELSE,FILEPRM.
  $LIBRARY,L/D.
  $LIBRARY,L/A.
.ENDIF,FILEPRM.
$REVERT. COMMENT ADDED TO T/R --> L
.DATA,YYYYCOM
*COMMENT T/R C
/EOR
