.ENABLE SUBSTITUTION .DISABLE LOWERCASE .DISABLE QUIET .ENABLE ESCAPE .; .; Set the next variable to the program name. .; .; PNAME = the program name used for the name of the library .; and the output file names at task build time. .; .; TNAME = the name used for the task build command file. .; .SETS PNAME "VTM" .SETS TNAME "'PNAME'" .TEST PNAME .IF > 6 .SETS TNAME PNAME[1:6] .SETS TNAME "'TNAME'BLD.CMD" .SETN EXSTAT 1. .; .; Inputs: .; P1 = either TKB to go directly to taskbuilding. .; or /DA to taskbuild with DDT when MAC finished. .; P2 = if TKB specified in P1, /DA can be specified .; in P2 to taskbuild with DDT. .; .IF P1 = "TKB" .GOTO TKB1 ; ; Command file to assemble and/or taskbuild the 'PNAME' program. ; .TESTFILE 'PNAME'.OLB .IF = 1 .GOTO GLIST ; Creating library file "'PNAME'.OLB" ... ; .ENABLE QUIET LBR 'PNAME'.OLB/CR .; .; See if the user wants macro listings. .; .GLIST: .ASKS MLIST Do you want macro listings (Yes) .SETT LFLAG ! Presume true. .IF MLIST = "" .GOTO GETMOD .SETS MLIST MLIST[1:1] .IF MLIST <> "Y" .SETF LFLAG .; .; Get the module name to assemble. .; .GETMOD: .DISABLE QUIET .ENABLE ESCAPE .ASKS MODULE Enter module name to assemble .IFT .GOTO HELP .DISABLE ESCAPE .PARSE MODULE "." MODULE EXT .IF MODULE = "" .GOTO TKB .; .; See if the module specified exists. .; .TESTFILE 'MODULE'.MAC .IF = 1 .GOTO ASM ; ; Unable to access module "'MODULE'.MAC", please try again. ; The FCS error code is ''. ; .GOTO GETMOD .HELP: ; ; Type the RETURN key to start taskbuilding, or CTRL/Z to exit. ; .GOTO GETMOD .ASM: .SETS LDEV "" .IFT LFLAG .SETS LDEV ",'MODULE'/-SP" .; .; Assemble the specified module, exit on any error. .; MAC 'MODULE''LDEV'='MODULE' .SETN EXSTAT .IF EXSTAT <> 1 PIP 'MODULE'.OBJ;0/DE .IF EXSTAT <> 1 .EXIT .; .; Replace object module in the library. .; LBR 'PNAME'/RP='MODULE' .ENABLE QUIET PIP 'MODULE'.OBJ;0/DE .IFT LFLAG PIP 'MODULE'.LST/PU .IFT LFLAG PIP 'MODULE'.LST/TR .GOTO GETMOD .TKB: .DISABLE ESCAPE .; .; See if taskbuilding is desired. .; .IF P1 = "/DA" .GOTO TKB1 .ASKS WTKB Do you want to taskbuild 'PNAME' (Yes) .IF WTKB = "" .GOTO T2 .SETS WTKB WTKB[1:1] .IF WTKB <> "Y" .EXIT .T2: .; .; See if taskbuilding with DDT is desired. .; .ASK Z Do you want to taskbuild with DDT .IFT Z .SETS P1 "/DA" .TKB1: .DISABLE QUIET .; .; Set up the strings for taskbuilding with DDT. .; .IF P1 = "TKB" .SETS P1 "'P2'" .IF P1 <> "/DA" .SETS P1 "" .TESTFILE LB:[1,1]SYSRES.STB .IF = 1 .GOTO T5 ; ; File "LB:[1,1]SYSRES.STB" was not found, exiting ... ; .EXIT .T5: .TESTFILE 'PNAME'.OLB .IF = 1 .GOTO T10 ; ; The library file "'PNAME'.OLB" was not found, exiting ... ; .EXIT .T10: .SETF DEBFLG .SETS DEBUG "" .SETS STB "" .IF P1 <> "/DA" .GOTO T20 .SETT DEBFLG .SETS DEBUG ",LB:[1,1]DDT/DA" .SETS STB ",'PNAME'" .T20: .SETS NAM PNAME[1:3] .; .; Put your taskbuild command file here (usually specific). .; .OPEN #1 'TNAME' .ENABLE DATA #1 ; ; Command file to taskbuild the 'PNAME' program. ; 'PNAME'/CP/PR:0,'PNAME'/CR/-SP'STB'= 'PNAME'/LB:VTM:ACTION:OPENRW:RSXMSG 'PNAME'/LB:VTMERR:VTMUTL:VTPARS'DEBUG' / TASK=...'NAM' ASG=SY:1:2:3 ASG=TI:5:6 LIBR=SYSRES:RO:7 // .DISABLE DATA #1 .CLOSE #1 TKB @'TNAME' .ENABLE QUIET .WAIT CRF... PIP 'TNAME';*/DE PIP 'PNAME'.TSK/PU,'PNAME'.MAP PIP 'PNAME'.MAP/TR .IFT DEBFLG PIP 'PNAME'.STB/PU .SETF DOINS .IFINS ...'NAM' .SETT DOINS .IFT DOINS REM ...'NAM' .IFT DOINS INS 'PNAME' .DISABLE QUIET ; Wake up, taskbuild is finished ...