  $Job TMS

  ; *** Don't pause when screen is full
  ;
  $PauseOff

  ASSIGN ClearScreen, '\\0Ch'
  $DISPLAY(ClearScreen)

  $Assign DoneMsg,		' done.'
  $Assign Complete,		'Installation complete.'
  $Assign FComplete,	'Installation complete.  Remove and store diskette.'
  $Assign Files,		'Copying files ... '
  $Assign Commands,		'Creating commands ... '
  $Assign Requests,		'Merging request codes ... '
  $Assign Status,		'Merging status code ... '
  $Assign ErrorMsg,		'Error while copying ... '
  $Assign PressAny,		'Press any key to continue.'
  
  ; *** Default file specs for local and server installations
  ;
  LocalSpec = '[sys]<sys>'
  ServerSpec = '[sys]<sys>'

  ; Initialize variables  do not nationalize
  Floppy		 	= 0
  Tape  		 	= 1
  FromServer	 	= 2
  FromCDROM			= 5
  
$DISPLAY(ClearScreen)

$If (NOT Unattended)

	$DISPLAYLINE('             AETask Management Service InstallationAA')
	$DISPLAYLINE
	$DISPLAYLINE('If this is the server station of a cluster system, then power')
	$DISPLAYLINE('down all cluster workstations.')
	$DISPLAYLINE
	$DISPLAYLINE('If this is a cluster workstation, then power down all other')
	$DISPLAYLINE('workstations except this station and the server station.')
	$DISPLAYLINE
	$DISPLAYLINE('                   Press AE<GO>AA when ready.')
	$DISPLAYLINE
	$DISPLAYLINE
	$DISPLAYLINE
	$DISPLAYLINE
	$DISPLAYLINE('COPYRIGHT 1993 UNISYS CORPORATION')
	$DISPLAYLINE('ALL RIGHTS RESERVED.')
	$DISPLAYLINE('UNISYS PROPRIETARY')
	$DisplayAndWait

$Endif


   $IF Public 
  
    ; *** public installation writes the commands to the file on the 
    ; *** server [Sys]<Sys>Cluster.cmds rather than [Sys]<Sys>Sys.cmds 
    ; *** which is the default
    ;
    DestPath = ServerSpec
    DefVol = '[Sys]'
    CmdFileTo = '[Sys]<sys>Cluster.cmds'

  $ELSE
    ; *** if not a server or srp, the default is the local [Sys] directory
    ; 
    DestPath = LocalSpec
    DefVol = '[Sys]'
  $ENDIF

  $If InstallType EQ Floppy
		SourceSpec = ConcatStrings(DeviceFrom, '<Unisys>')
  $Endif

  $If InstallType EQ FromCDROM
  		SourceSpec = ConcatStrings(DeviceFrom, '<TMS1.1.4>')
  $EndIf

  $If InstallType EQ FromServer
		SourceSpec = ServerSpec
  $Endif

  ; *** Create a variable for [Sys]<sys> or [Sys]<Sys> depending on
  ; *** type of installation
  ;
  DestSpec = ConcatStrings(DefVol,'<Sys>')

  $RestartLabel

  DisplayLine
	; Copy files from the first floppy
  Display(Files)

  Run [Sys]<Sys>LCopy.run, (TMS.Run, TMSNull.Run, TMSApi.Lib, 
				TMSApi.h, Request.TMS.Sys), SourceSpec, DestSpec,,y,n,n,y
  If erc <> 0
		DisplayLine
		DisplayLine
		DisplayLine(ErrorMsg)
		DisplayandWait
		Cancel
  Endif
  Displayline(DoneMsg)

	; Add Task Management Service commands
	DisplayLine
	Display(Commands)
	Run ([Sys]<Sys>CmdFileEditor.run, 'Merge Command Files', 'MC'), 
				CmdFileFrom,	
				CmdFileTo,		
				Yes,			
				DefVol	
	DisplayLine(DoneMsg)

	SourceRqFile = ConcatStrings(SourceSpec, 'Request.TMS.Sys')
	DestRqFile = ConcatStrings(DestSpec, 'Request.Sys')
	ScrRqFile = '[scr]<$>Request.Txt'

	DisplayLine
	Display(Requests)
	$Run ([Sys]<Sys>ListRqSet.run, 'List Request Set', '01'),  
			(SourceRqFile, DestRqFile), ScrRqFile 
	$Run ([Sys]<Sys>MakeRqSet.run, 'Make Request Set', '00'), 
			ScrRqFile, DestRqFile
	DisplayLine(DoneMsg)


	DisplayLine
	DisplayLine
	If InstallType = FromServer
		DisplayLine(Complete)
	Else
		DisplayLine(FComplete)
	Endif


 
    DisplayLine
    Displayline('              AE                                         AA')
    Displayline('              AE   Make sure to reboot the system where  AA')
    Displayline('              AE   the software has been installed after AA')
    Displayline('              AE   you have completely finished with     AA')
    Displayline('              AE   installing software on that system.   AA')
    Displayline('              AE                                         AA')
    DisplayLine
    $DisplayLine
    $IF (unattended = 0)
      $DisplayAndWait(PressAny,'')
      $DisplayLine
    $ENDIF

  ; *** reinstate video pause
  ;
  $PauseOn  
  
 
  $END
pletely finished with     AA')
    Displayline('              AE   installing software on that system.   AA')
    Displayline('              AE                                         AA')
    DisplayLine
    $DisplayLine
    $IF (unattended = 0 AND InstallType <> SWD)
      $DisplayAndWait(PressAny,'')
      $DisplayLine
    $ENDIF

  ; *** reinstate video pause
  ;
  $PauseOn  
  
 
  $END
ddQgCj4$z$$$$$	$$W$$$$