
;****************************************************************************
;**************************** H E A D E R  **********************************
;****************************************************************************
;**                                                                        **
;**  TITLE:        Install.jcl for CTOS Packet Ethernet Data Link x3.7.0   **
;**                                                                        **
;**  FILE ID:      [PktEDL1]<Sys>Install.jcl                              **
;**                                                                        **
;**  FUNCTION:     This Job Control Language (jcl) script file will        **
;**                install the Packet EDL x3.7.0 to hard disk from floppy  **
;**                using Installation Manager.                             **
;**                                                                        **
;**  INPUT:        None.                                                   **
;**                                                                        **
;**  OUTPUT:       None.                                                   **
;**                                                                        **
;**  CALLED BY:    Installation Manager, Floppy Install                    **
;**                                                                        **
;**  CALLSUSES:   [PktEDL1]<Sys>Install.ctrl                             **
;**                                                                        **
;**  ASSUMPTIONS:  Installation Manager is present on the system that      **
;**                pEDL x3.7.0 is going to be installed on.                **
;**                                                                        **
;****************************************************************************
;*********************  NATIONALIZATION INSTRUCTIONS    *********************
;****************************************************************************
;**                                                                        **
;**  1) Search for ;NATIONALIZABLE STRINGS                                 **
;**     Nationalize stings listed below the ;NATIONALIZABLE STRINGS marker **
;**                                                                        **
;**  2) Search for ;NATIONALIZE                                            **
;**     Nationalize the text below the ;NATIONALIZE marker                 **
;**                                                                        **
;****************************************************************************

$Job InstPEDL
$RestartLabel
$PauseOff

;NATIONALIZABLE STRINGS
;RelMsg      = 'Are you interested in the Release Notes?'
;RifPrintMsg = 'Do you wish to print the Release Notes at this time?'
;RifViewMsg  = 'Do you wish to view the Release Notes at this time?'
;PtrNameMsg  = 'Enter printer name and press GO.'
CpyMsgEDL    = ' Copying pEDL files to hard disk                          ... '
RenCfgMsg    = ' Renaming Old PktDrvrConfig.Sys to PktDrvrConfig.SysSave ... '
CpyCfgMsg    = ' Copying New PktDrvrConfig.Sys                            ... '
Commandmsg   = ' Adding pEDL commands                                     ... '
RequestMsg   = ' Updating the request file                                ... '
DoneMsg      = 'done.'
GoMsg        = '                 AF     Press AEGOAF to continue.     AA'
InstDoneMsg  = '   When installation is complete, please reboot your system.   '
CfgCopyMsg1  = 'If this is first installation of Packet EDL or if you wish to'
CfgCopyMsg2  = 'overwrite existing PktDrvrConfig.Sys file, select AEYESAA,'
CfgCopyMsg3  = 'else select AENOAA.'
CfgOvrWrMsg  = 'Overwrite PktDrvrConfig.Sys?'

Question1    = 'Select the ethernet board installed in your machine'
BdType1      = 'ETH150 (SMC 8416T)'
BdType2      = 'SG1600  (ACCTON)'

; Uncomment for adding choice for 3COM driver.
;BdType3      = '3C509   (3COM)'


;Initialize variables
localSpec = '[Sys]<Sys>'
serverSpec = '[Sys]<Sys>'

;Scroll four lines on the screen so messages look better
i = 0
$While (i < 4)
    i = i + 1
    $DisplayLine
$EndWhile

$RestartLabel
   
$IF InstallType = 2 ; Install from Server
      FromSys = ConcatStrings(DeviceFrom,'<Sys>')
      FromUNISYS = ConcatStrings(DeviceFrom,'<Sys>')
 $EndIf

$IF InstallType = 0 ; Install from Floppy
     FromSys = ConcatStrings(DeviceFrom,'<Sys>')
     FromUNISYS = ConcatStrings(DeviceFrom,'<CTOS>')
$EndIf

;Determine whether to install files to the server or to the local disk
$If Public 
    DestPath = ServerSpec
    DefVol = '[Sys]'
$Else ;If not a server or srp, the default is the local [Sys] directory
    DestPath = LocalSpec
    DefVol = '[Sys]'
$EndIf

;******************************************************************
;      Scroll lines on screen and print copyright information
;******************************************************************
i = 0
$While (i < 10)
	i = i + 1
	$DisplayLine
$EndWhile

;NATIONALIZE THE NEXT 15 LINES
$Displayline ('               CTOS Packet Ethernet Data Link x3.7.0         ')
$Displayline ('                                                             ')
$Displayline ('                    PROPRIETARY PROGRAM MATERIAL             ')
$Displayline ('                                                             ')
$Displayline ('        This material is Proprietary to Unisys Corporation   ')
$Displayline ('        and is not to be reproduced, used or disclosed except')
$Displayline ('        in accordance with program license or upon written   ')
$Displayline ('        authorization of Unisys Corporation.                 ')
$Displayline ('                                                             ')
$Displayline ('        COPYRIGHT (C) 1993 UNISYS CORPORATION.               ')
$Displayline ('        All Rights Reserved                                  ')
$Displayline ('        UNISYS PROPRIETARY                                   ')
$Displayline ('                                                             ')
$Displayline ('                        Press AEGOAA to continue.          ')

$DisplayandWait 

i = 0
$While i < 20
	i = i + 1
	$DisplayLine
$EndWhile

;$If Public
;	;Copy files for Server Installation
;	$RUN [Sys]<Sys>Lcopy.run,EDLSRA.doc,FromSys,DestPath,,yes,,no
;$EndIf       ;If Public

;Ask about the release notes  Commented for timebeing... Abhay
;
;Release = UserSelectYesNo (RelMsg,'No')
;
;$If Release
;
;    RIFView = UserSelectYesNo(RIFViewMsg,'No')
;
;    $If RIFView
;    i = 0
;    $While (i < 15)
;        i = i + 1
;        $DisplayLine
;    $EndWhile
;
;        $PauseOn
;
;          Notes = ConcatStrings(FromSys,'EDLSRA.doc')
;        $Command Copy,Notes,[vid],yes
;        $PauseOff
;
;    $EndIf     ;If RIFView
;
;    RIFPrint = UserSelectYesNo(RIFPrintMsg,'No')
;
;    $If RIFPrint
;    i = 0
;    $While (i < 4)
;        i = i + 1
;        $DisplayLine
;    $EndWhile
;
;        PrintName = $UserEnterValue(PtrNameMsg)
;        P = $ConcatStrings('[',PrintName)
;        P1 = $ConCatStrings(P,']')
;            $Command copy,Notes,P1
;    $EndIf        ;$If RIFPrint
;
;
;    $RestartLabel
;
;$ENDIF   ;If Release

$DisplayLine
$DisplayLine
$DisplayLine
$DisplayLine
$DisplayLine

FilesSrcSpec = ConcatStrings(FromUnisys,'SMC8416T')

;Quest1 = $UserSelectSingle(Question1, BdType1, BdType2, BdType3)
;Quest1 = $UserSelectSingle(Question1, BdType1, BdType2)

;set variable(s) to equal choice
;Ch1 = SUBSTRING(BdType1, Quest1)
;Ch2 = SUBSTRING(BdType2, Quest1)

; Uncomment for adding choice for 3COM driver.
;Ch3 = SUBSTRING(BdType3, Quest1)

;$If Ch1 <> 65535 and InstallType <> 2 and InstallType <> 4
;	FilesSrcSpec = ConcatStrings(FromUnisys,'SMC8416T')
;$EndIf

;$If Ch2 <> 65535 and InstallType <> 2 and InstallType <> 4
;	FilesSrcSpec = ConcatStrings(FromUnisys,'ACCTON')
;$EndIf

; Uncomment for adding choice for 3COM driver.
;$If Ch3 <> 65535 and InstallType <> 2 and InstallType <> 4
;	FilesSrcSpec = ConcatStrings(FromUnisys,'3C509')
;$EndIf

;clear the screen
i = 0
$While i < 20
	i = i + 1
	$DisplayLine
$EndWhile

;Ask user if he wants to overwrite existing config file.
$Displayline
$Displayline
$DisplayLine (CfgCopyMsg1)
$DisplayLine (CfgCopyMsg2)
$DisplayLine (CfgCopyMsg3)
i = 0
$While i < 15
	i = i + 1
	$DisplayLine
$EndWhile
OvrWriteCfg = UserSelectYesNo (CfgOvrWrMsg,'Yes')

;clear the screen
i = 0
$While i < 20
	i = i + 1
	$DisplayLine
$EndWhile

;Copy the run files from the diskette to the destination volume
$Displayline
$Displayline
$Display (CpyMsgEDL)
$Command LCopy,@[f0]<sys>Install.fls,FromUNISYS,DestPath,,y
$Command LCopy,PktDrvr.DLL, FilesSrcSpec, DestPath,,y
$Deassign (CpyMsgEDL)
$DisplayLine(DoneMsg)

$If OvrWriteCfg
	$Displayline
	$Display(RenCfgMsg)
	DestCfgFile = ConcatStrings(DestPath, 'PktDrvrConfig.Sys')
	SaveCfgFile = ConcatStrings(DestPath, 'PktDrvrConfig.SysSave')
	$Command Rename,DestCfgFile,SaveCfgFile,Yes
	$DisplayLine(DoneMsg)
	$DisplayLine
	$Display(CpyCfgMsg)
	$Command LCopy,PktDrvrConfig.Sys, FilesSrcSpec, DestPath,,y
	$DisplayLine(DoneMsg)
$EndIf

;Add the EDL requests to Request.sys
$Displayline
$Display (RequestMsg)
$IF Public 
	$Run [Sys]<Sys>LCopy.run,Request.EDL.sys,FromSys,[scr]<$>,,yes,,no
	$Run [Sys]<Sys>ListRqSet.run,([Sys]<Sys>request.sys,  
		 [scr]<$>Request.EDL.sys), [scr]<$>x
	$Run [Sys]<Sys>MakeRqset.run, [scr]<$>x, [Sys]<Sys>request.sys

	;NATIONALIZE the Delete command
	$Command Delete,[scr]<$>Request.EDL.sys
	$Command Delete,[scr]<$>x
$Else
	$Run [Sys]<Sys>LCopy.run,Request.EDL.sys,FromSys,[scr]<$>,,yes,,no
	$Run [Sys]<Sys>ListRqSet.run,([Sys]<Sys>request.sys,  
		 [scr]<$>Request.EDL.sys), [scr]<$>x
	$Run [Sys]<Sys>MakeRqset.run, [scr]<$>x, [Sys]<Sys>request.sys

	;NATIONALIZE the Delete command
	$Command Delete,[scr]<$>Request.EDL.sys
	$Command Delete,[scr]<$>x
$EndIf
$Deassign (RequestMsg)

;Merge the edl.cmds file from the diskette to the customer command file
$DisplayLine(DoneMsg)
$Displayline
$Display (Commandmsg)
$If Public
	CmdFileTo = '[Sys]<Sys>Cluster.cmds'
$EndIf
CMDS = ConcatStrings(FromSys,'Install.cmds')
$Run ([Sys]<Sys>CmdFileEditor.run, 'Merge Command Files', 'MC'), 
	  CMDS, CmdFileTo, yes, DefVol
$Display (DoneMsg)
$Displayline
$Displayline
$Deassign (Commandmsg)

;Remind the customer to reboot to activate the updates to request.sys
i = 0
$While (i < 20)
	i = i + 1
	$DisplayLine
$EndWhile
$DisplayLine('')
$DisplayLine (InstDoneMsg)
$DisplayLine('')

$Deassign (DoneMsg)
$Deassign (InstDoneMsg)
$Displayline (GoMsg)
$Deassign (GoMsg)
$Displayline
$Displayline
$Displayline
$Displayline
$DisplayAndWait

$END
            ')
$Displayline ('                                                             ')
$Displayline ('        COPYRIGHT (C) 1993 UNISYS CORPORATION.               ')
$Displayline ('        All Rights Reserved                                  ')
$Displayline ('        UNISYS PROPRIETARY                                   ')
$Displayline ('                                                             ')
$Displayline ('                        P