; RTLBLD ; ====== ; ; .; Command file to build the compiler. It may either be called .; from DLV1 with parameters or questions will be asked :- .; 1) What partition is being used ? .; 2) Is memory resident workfile available ? .; 3) Is memory resident FCS available ? .; 4) Are you building tasks to run in I- & D- Space ? .; 5) Do you have FCSRES or FCSFSL ? .; .enable substitution .disable lowercase .gosub setcli .; .if P1 ne "" .goto gotpar .asks [::"GEN"] P1 In which partition is the compiler to run .gotpar: ; .if P2 ne "" .goto gotwrk .sets P2 "DISK" .ask WRK Should the compiler workfile be memory-resident (default is disk) .ift WRK .sets P2 "MEM" .gotwrk: ; .if P3 ne "" .goto gotfcs .sets P3 "LIB" .ask FCS Should the compiler use memory-resident FCS (default is library) .ift FCS .sets P3 "MEM" .gotfcs: ; .if P4 ne "" .goto gotrsx .sets P4 "M" .ask MPLUS Will the compiler run in separate I- & D- spaces .ift MPLUS .sets P4 "MPLUS" .gotrsx: .; .if P3 ne "MEM" .goto nomlib .if P5 ne "" .goto gottyp .settyp: .sets P5 "FCSRES" .if P4 ne "MPLUS" .goto gottyp ; .asks TYP Build the compiler using FCSRES or FCSFSL (enter RES or FSL) .sets P5 "FCS"+TYP .gottyp: .if P5 ne "FCSRES" .and .if P5 ne "FCSFSL" .goto settyp .if P5 eq "FCSFSL" .sets MEMLIB "SUPLIB=FCSFSL:SV" .if P5 eq "FCSRES" .sets MEMLIB "LIBR=FCSRES:RO" .nomlib: ; .sets RG31 "LGRG31" .if P5 eq "FCSRES" .goto gtrg31 .if P4 eq "M" .and .if P3 eq "MEM" .and .if P2 eq "MEM" .sets RG31 "MDRG31" .if P4 eq "MPLUS" .and .if P3 eq "MEM" .sets RG31 "IDRG31" .if P4 eq "MPLUS" .and .if P3 eq "LIB" .sets RG31 "LGIDRG" .gtrg31: lbr rg31.obj=cmprsx/ex:'RG31' ; .sets CIP "CIP9" .if P2 eq "MEM" .sets CIP "CIP8" lbr cipw.obj=ciplibrsx/ex:'CIP' .; .; .sets SWITCH "" .if P4 eq "MPLUS" .sets SWITCH "/ID" ; ; Create the taskbuild command-file. ; .open #1 rtlbld.lnk .enable data #1 RTL2.TSK/CP'SWITCH',RTL2/-SP=RTL2/MP PAR='P1' TASK=...RTL STACK=300 UNITS=7 ASG=TI:1:7 ASG=SY:2:3:4:5:6 WNDWS=1 GBLDEF=STKCTL:0 GBLPAT=RSXBA1:PAGING:74 .disable data #1 .if P3 ne "MEM" .goto nmemlb .if P2 eq "MEM" .and .if P5 eq "FCSRES" .data #1 GBLPAT=RSXBA1:WINDOW:6 .data #1 'MEMLIB' .nmemlb: .data #1 // .close #1 ; ; Build the compiler. ; tkb @rtlbld.lnk .setn exst .if exst ne 1 .goto done ; ; Delete unwanted files. ; pip rtlbld.lnk;0/de pip cipw.obj;0/de pip rg31.obj;0/de .; .done: 'rstcli' .exit 'exst' .; .; Subroutine to determine current CLI; set it to DCL if possible .; .setcli: .sett isdcl .sets rstcli ";" .sets oldcli "''" .if oldcli eq "DCL" .return .if oldcli ne "MCR" .goto lsc1 .ifnins dcl .setf isdcl .iff isdcl .return .sets rstcli "mcr set /mcr=ti:" .lsc1: dcl set /dcl .if rstcli eq ";" .sets rstcli "set term/cli:"+oldcli .return