.PROC,SETVE*I,
PN  "- NVE Procedure Name suffix"      = (*N=,
                           *S4(ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890)),
UN  "- User Name for NVE subsystem"    = (*F),
P   "- Password for NVE user name"     = (*N=,*F,*R),
C   "- Command deck number for DCF<c>" = (*N=,*S2(01234567)),
W   "- Wait for operator intervention" = (*N=,FALSE=F,TRUE=T,F,T),
T   "- Deadstart type                " = (*N=,CR,DISK,TAPE,D=DISK,T=TAPE),
S   "- SCD PORT"                       = (*N=,0,1),
N   "- NVE subsystem CPU priority"     = (*N=,*S2(01234567)),
.
.HELP
 The SETVE procedure creates a NVEffff procedure file on SYSTEMX
 with the necessary parameters to deadstart a NOS/VE system.
 The procedures MSSIRHF and MSSPASS are also created on SYSTEMX
 for restarting IRHF and PASSON.
 On NOS/BE, the NVEffff procedure file is made permanent with an ID
 equal to the UN parameter.

 Parameter   Default   Description
   Name       Value

  [pn]                 four character alphanumeric procedure suffix
   un                  user name from which to deadstart NOS/VE
  [p]         un_X     password for user name
  [c]          01      octal command deck number
  [w]         true     boolean wait for operator intervention value
  [s]           0      port used to run SCD
  [n]                  NVE subsystem CPU priority

.HELP,PN
 The PN parameter specifies a four character alphanumeric suffix
 appended to the procedure name NVE. The default is a null string.
.HELP,UN
 The UN parameter specifies the user name from which NOS/VE is
 deadstarted. The NOS/VE deadstart files are retained here, and
 any run time subsystem changes are contained on user library DSTLIB.
 On NOS/BE, this is the permanent file ID of the deadstart files.
.HELP,P
 The P parameter specifies the password for the UN user name.
 The default is the UN parameter with a concatenated X suffix.
.HELP,C
 The C parameter selects the octal command deck number to use from the
 deadstart file, of the form DCF<c>. The default is assigned in the
 DSTCMDS procedure.  This parameter will be ignored at L739.
.HELP,W
 The W parameter specifies a boolean value which selects whether to
 wait for operator intervention at the NOS/VE core commands display.
 The default value is TRUE.
.HELP,T
 The T parameter selects the deadstart type.  CR selects a deadstart
 useing the installed defaults.  TAPE or T selects a deadstart from
 TAPE and DISK or D selects a deadstart from an alternate disk device.
 This parameter will be ignored at L739.
.HELP,S
 The S parameter selects the port of the two port mux which the system
 console will use to communicate with the operator.
.HELP,N
 The N parameter selects a CPU priority for the NVE subsystem on NOS.
 If specified, the NVE subsystem will issue a SETPR command to set the
 CPU priority to the value.  However, if the specified value is less
 than the lower bound for the subsystem service class, then the NOS
 system will automatically raise the priority to the lower bound.
 This parameter is ignored on NOS/BE.
.ENDHELP
.IFE,SYS=NOS,NOSSYS.
  $USER,SYSTEMX,SYSTEMX.
  $REPLACE,NVE_PN.
  $REPLACE,MSSIRHF.
  $REPLACE,MSSPASS.
.ELSE,NOSSYS.
  LIBRARY,NVELIB.
  REQUEST,YYYYNVE,PF.
  COPYBF,NVE_PN,YYYYNVE.
  REPFILE,YYYYNVE,NVE_PN,,,,UN.
  RETURN,YYYYNVE,MSSPASS,MSSIRHF.
.ENDIF,NOSSYS.
REVERT. END SETVE
.DATA,NVE_PN.
.PROC,NVE_PN.
.IFE,SYS=NOS,NOSSYS2.
.IFE,$P$.EQ.$$,CHANGEPW.
  $USER,UN,UN_X.
.ELSE,CHANGEPW.
  $USER,UN,P.
.ENDIF,CHANGEPW.
$COMMON,SYSTEM.
$GTR,SYSTEM,NVELIB,U.ULIB/NVELIB
$UNLOAD,SYSTEM.
$ATTACH,DSTLIB/#UN=UN,NA.
IFE,FILE(DSTLIB,AS),USERDSTLIB.
  $LIBRARY,DSTLIB.
ENDIF,USERDSTLIB.
$LIBRARY,NVELIB/A.
.ELSE,NOSSYS2.
  LIBRARY,NVELIB.
  GETFILE,DSTLIB,,UN,READ.
  IFE,FILE(DSTLIB,AS),FNDDST.
    LIBRARY,DSTLIB.
  ENDIF,FNDDST.
.ENDIF,NOSSYS2.
RUNDSC,C,W,T,S,N.
REVERT. END NVE_PN
.DATA,MSSIRHF
.PROC,MSSIRHF.
$COMMON,SYSTEM.
$GTR,SYSTEM,NVELIB,U.ULIB/NVELIB
$UNLOAD,SYSTEM.
$ATTACH,DSTLIB/#UN=UN,NA.
IFE,FILE(DSTLIB,AS),USERDSTLIB.
  $LIBRARY,DSTLIB.
ENDIF,USERDSTLIB.
$LIBRARY,NVELIB/A.
RUNJOBS,IRHF.
$REVERT. END MSSIRHF
.DATA,MSSPASS
.PROC,MSSPASS.
$COMMON,SYSTEM.
$GTR,SYSTEM,NVELIB,U.ULIB/NVELIB
$UNLOAD,SYSTEM.
$ATTACH,DSTLIB/#UN=UN,NA.
IFE,FILE(DSTLIB,AS),USERDSTLIB.
  $LIBRARY,DSTLIB.
ENDIF,USERDSTLIB.
$LIBRARY,NVELIB/A.
RUNJOBS,PASSON.
$REVERT. END MSSPASS
/EOR
