.PROC,COMTEXT*I,
LFN " - local file name (name of text)"      = (*F),
PFN " - permanent file name"                 = (*F,*N=),
UN  " - user name for permanent file"        = (*F,*N=),
.
.HELP
The COMTEXT procedure gets system texts for NOS assemblies and
compilations. If a local file of the text name exists, that is
used.  If no local file is found, a permanent file is accessed
of the specified user name. If the text is still not found, it
is extracted from the running system.

PARAMETER   DEFAULT   DESCRIPTION
  NAME       VALUE

  LFN        none     The name of the system text or local file.
  PFN        lfn      The name of the permanent file.
  UN         null     The user name for the permanent file.

This procedure is effectively null for NOS/BE because compila-
tions and assemblies for NOS/BE use the system texts only.

.HELP,LFN
The lfn parameter selects the system text (or local file) name.
.HELP,PFN
The pfn parameter specifies the permanent file name to get the
system text from. If not supplied it defaults to lfn.
.HELP,UN
The un parameter specifies the NOS user name to look on for
the file given in pfn.
.ENDHELP
.IF,SYS.EQ.NOSB.REVERT.
GETFILE(LFN,PFN,UN,READ,NO)
$IFE(FILE(LFN,.NOT.AS),GETSYSTEM)
  $COMMON(SYSTEM)
  $GTR(SYSTEM,LFN)OVL/LFN
  $UNLOAD(SYSTEM)
$ENDIF(GETSYSTEM)
$SETFS(LFN/FS=NAD)
$REVERT. TEXT LFN --> LFN
$EXIT.
$REVERT(ABORT) TEXT LFN NOT FOUND
/EOR
