; Install.jcl  VAM Installation

ErrorMsg     = 'Cannot access message file'
FromFloppy   = 0
FromServer   = 2
FromSpec     = ConcatStrings(DeviceFrom, '<VAM4.4.0>')
SysSpec      = ConcatStrings(DeviceFrom, '<Sys>')
ToSpec       = ConcatStrings(VolumeTo,   DirectoryTo)
InstallFls   = ConcatStrings(SysSpec, 'Install.fls')

SysVolume    = '[Sys]'
BangSys      = '[Sys]'
SysCmds      = '[Sys]<sys>sys.cmds'
ScrSpec      = '[Scr]<$>'
RqSpec       = ConcatStrings(ToSpec,  'Request.sys')
RqListSpec   = ConcatStrings(ScrSpec, 'LRS')
RqTextSpec   = ConcatStrings(ToSpec,  'Request.VAM.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')

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

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

If InstallType = FromServer

	CopyMsg = GetMsg(2)
	DisplayLine
	Display(CopyMsg)

    Command LCopy                                      ,
                                                       ,
              @[Scr]<$>InstallOverwriteOkFrom.fls      ,
              @[Scr]<$>InstallOverwriteOkTo.fls        ,
                                                       ,
              Yes                                      ,
              No                                       ,
              No                                       ,
              Yes

	DoneMsg = GetMsg(3)
	DisplayLine(DoneMsg)

    GoTo DoRqs
    Endif

CopyMsg = GetMsg(2)
DisplayLine
Display(CopyMsg)

Command LCopy                      ,
          @InstallFls              ,
          FromSpec                 ,
          ToSpec                   ,
                                   ,
          Yes                      ,
          No                       ,
          No                       ,
          Yes

DoneMsg = GetMsg(3)
DisplayLine(DoneMsg)

DoRqs:

Command List Request Set           ,
          RqSpec                   ,
          RqListSpec

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

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

EndIt:

End
F.F Fj6HF	t6 sGFF.=wfhRPj60Fx.PS66Fx.PH6sNshRPj60Fx.PS66