; BasicSystem>Install.jcl
; Install the Basic System Utilities subpackage

; Except for yesno strings, these two messages are the only nationalizable
; strings in this file.
ErrorMsg     = 'Cannot access message file'
FirstDisk    = 'System Utilities Diskette 1 of 4 (B25STP1)'

FromFloppy   = 0
FromServer   = 2
TotalSilence = 2

SysVolume    = '[Sys]'
BangSys      = '[Sys]'
SysCmds      = '[Sys]<sys>sys.cmds'
ScrSpec      = '[Scr]<$>'
FloppySpec   = ConcatStrings(DeviceFrom, '<zCTOS>')
BinSpec      = ConcatStrings(DeviceFrom, '<Sys>')
ToSpec       = ConcatStrings(VolumeTo,   DirectoryTo)
FromSpec     = ConcatStrings(FloppySpec, '*')
NoSpec       = ConcatStrings(DeviceFrom, '<zNo>*')
ArchSpec     = ConcatStrings(BinSpec, 'StatusCodesMsg')
ArchFromSpec = '\'<Exec>*\''
ArchToSpec   = ConcatStrings('\'', ToSpec, '*')
ArchToSpec   = ConcatStrings(ArchToSpec, '*\'')
RqSpec       = ConcatStrings(ToSpec,  'Request.sys')
RqListSpec   = ConcatStrings(ScrSpec, 'LRS')
RqTextSpec   = ConcatStrings(ToSpec,  'Request.vm.txt')
RqTempSpec   = ConcatStrings(ScrSpec, 'Request.sys')

; The name of the log file must be Request.log  some customers depend on it.
RqLog        = ConcatStrings(ToSpec,  'Request.log')

ToSpec12.3.X     = ConcatStrings(ToSpec, 'pre12.3.100>')

If InstallType = FromFloppy
    NextFloppy(FirstDisk)
    EndIf

InitErc = InitMsgFile(MsgFile)
If InitErc > 0
    DisplayLine(ErrorMsg)
    Cancel
    Endif

SaveVidLevel = VideoLevel

If Public
    Command Merge Command Files   ,
              CmdFileFrom         ,
              CmdFileTo           ,
              Yes                 ,
              VolumeTo

    Command Merge Command Files   ,
              CmdFileFrom         ,
              SysCmds             ,
              Yes                 ,
              BangSys
Else
    Command Merge Command Files   ,
              CmdFileFrom         ,
              CmdFileTo           ,
              Yes                 ,
              SysVolume
EndIf

Command LCopy                   ,
          'SystemMgrConfig.sys' ,
          ToSpec                ,
          ToSpec12.3.X          ,
                                ,
          No                    ,
          No                    ,
          Yes

Command LCopy                    ,
          'FormatDiskConfig.sys' ,
          ToSpec                 ,
          ToSpec12.3.X           ,
                                 ,
          No                     ,
          No                     ,
          Yes

Command LCopy                   ,
          'Nls.sys'             ,
          ToSpec                ,
          ToSpec12.3.X          ,
                                ,
          No                    ,
          No                    ,
          Yes

Command LCopy                    ,
          'EditorNls.sys'        ,
          ToSpec                 ,
          ToSpec12.3.X           ,
                                 ,
          No                     ,
          No                     ,
          Yes

Command LCopy                    ,
          'EditorMsg.sys'        ,
          ToSpec                 ,
          ToSpec12.3.X           ,
                                 ,
          No                     ,
          No                     ,
          Yes

If InstallType = FromServer
    Command LCopy                                      ,
                                                       ,
              @[Scr]<$>InstallOverwriteOkFrom.fls      ,
              @[Scr]<$>InstallOverwriteOkTo.fls        ,
                                                       ,
              Yes                                      ,
              No                                       ,
              No
    Command LCopy                                      ,
                                                       ,
              @[Scr]<$>InstallOverwriteNoFrom.fls      ,
              @[Scr]<$>InstallOverwriteNoTo.fls        ,
                                                       ,
              No                                       ,
              No                                       ,
              No    GoTo DoRqs
    Endif

Command Decompress Files           ,
          FromSpec                 ,
                                   ,
          ToSpec                   ,
          Yes                      ,
          No                       

Command Decompress Files           ,
          NoSpec                   ,
                                   ,
          ToSpec                   ,
          No                       ,
          No

RestartLabel

Msg = GetMsg(1)
$NextFloppy(Msg)

Command Decompress Files           ,
          FromSpec                 ,
                                   ,
          ToSpec                   ,
          Yes                      ,
          No

RestartLabel

Msg = GetMsg(2)
$NextFloppy(Msg)

Command Decompress Files           ,
          FromSpec                 ,
                                   ,
          ToSpec                   ,
          Yes                      ,
          No

RestartLabel

DoRqs:

RestartLabel

Command List Request Set           ,
          RqSpec                   ,
          RqListSpec

Command Make Request Set           ,
          (RqListSpec, RqTextSpec) ,
          RqTempSpec               ,
                                   ,
          12.3.100

Command Update Request Set         ,
          RqSpec                   ,
          RqTempSpec               ,
          Yes                      ,
          RqLog

If SaveVidLevel = TotalSilence
    EchoOff
EndIf

If InstallType = FromServer
    GoTo EndIt
    EndIf

pkg = GetMsg(22)
If substring(pkg,pkgs) <> 65535
    GoTo EndIt
    EndIf

pkg = GetMsg(7)
If substring(pkg,pkgs) <> 65535
    GoTo EndIt
    EndIf

pkg = GetMsg(8)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(9)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(10)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(11)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(12)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(13)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(14)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(15)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(16)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(3)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(17)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(19)
    NextFloppy(Msg)
    GoTo EndIt
    EndIf

pkg = GetMsg(18)
If substring(pkg,pkgs) <> 65535
    Msg = GetMsg(19)
    NextFloppy(Msg)
    EndIf

EndIt:

End
       ,
          'System