	.IF P1 EQ "" PAGE
	.IF P1 NE "" .GOTO 10
	;		C M D B L D . C M D
	; THIS FILE WILL CREATE A BATCH ASSEMBLY AND TASKBUILD FILES
	; USING ALL DEFAULT VALUES FOR F4P PROGRAMS.
	;
	;
	; WHEN THIS FILE EXITS YOU WILL HAVE A COMMAND PROCEDURE FILE(.PRC).
	;
	;	TSKNAM= TASK NAME OF FILE TO BUILD
	;
	;	THE FILE 'TSKNAM'.PRC;1   WILL EXIST WHEN @BATCH EXITS
	;	AFTER THIS FILE EXITS
	;
	;     ALL TASKS,OBJECT MODULES AND SOURCE FILES WILL BE PURGED
	;
	;	P1 = TASKNAME -- IF DEFINED, DO NOT ERASE SCREEN OR PROMPT
	;			 FOR TASKNAME.
	;	P2 = (NO)LIST -- IF DEFINED, DO NOT PROMPT FOR LISTING ANSWER.
	;			 IF NOT DEFINED ASK.
	;	P3 = (NO)BUILD - IF DEFINED, DO NOT ASK IF TASKBUILD DESIRED.
	;			 IF DEFINED, DO NOT BUILD WITH ANY OF THE 
	;			 OPTIONAL LIBRARIES.
	;	P4 = (NO)MAP  -- IF DEFINED TO NOT ASK WHETHER MAP DESIRED
	;	P5 = (NO,YES) -- IF = YES, BUILD WITH UIC=[200,200]
	;
	.SETF NAME
.10:	.SETF LST
	.SETF MAP
	.SETF NOSRC
	.SETF NOOBJ
	.SETT SCI
	.SETF MLTUSR
	.SETS $MP ""
	.SETS $LST ""
	.SETS SCIANS "N"
	.SETS TCSANS "N"
	.SETS AGANS "N"
	.SETS F4PANS "Y"
	.SETS YES "Y"
	.SETS NO "N"
	.SETS CR ""
	.SETS BLD ""
	.ONERR 20
.20:	.IF P1 EQ "" .ASKS P1 WHAT IS THE FORTRAN PROGRAM NAME
.22:	.IF P1 EQ CR .GOTO EEXIT
	.TEST P1
	.DISABLE QUIET
	.IFF <ALPHAN> ;FILE NAME ONLY -- OMIT FILE NAME EXTENSION
	.IF <STRLEN> >9. ;NAMES LONGER THAN 9 CHARACTERS ARE NOT ALLOWED
	.ENABLE QUIET
	.IFF <ALPHAN> .OR .IF <STRLEN> >9. .SETS P1 ""
	.IFF <ALPHAN> .OR .IF <STRLEN> >9. .GOTO 20
	.SETS REPORT P1+".FTN"
	.TESTFILE 'REPORT'
	.IF <FILERR> NE 1 .SETT NOSRC
	.IFF NOSRC .GOTO 22A
	.SETF NOSRC
	.DISABLE QUIET
	; NO SOURCE FILE WITH GIVEN NAME
	.ENABLE QUIET
	TCF 7
	.SETS P1 ""
	.GOTO 20
.22A:	.SETS UIC <UIC>
	.SETS GRP UIC[2:4]
	.SETS MEM UIC[6.:8.]
	.IF P2 EQ "LIST" .SETT LST
	.IF P2 EQ "NOLIST" .SETF LST
.24:	.IF P2 EQ "" .ASK LST 	DO YOU WANT A LISTING
	.IFT LST .SETS $LST ",TI:/LI:1"
 
.26:	.OPEN 'P1'.PRC;1
	.DATA F4P 'P1'.OBJ;1'$LST'='P1'.FTN/TR:ALL/CO:25.
	.SETS BLD P3
	.IF BLD EQ "BUILD" .OR .IF BLD EQ "NOBUILD" .SETF SCI
.30:	.IF P3 EQ "" .ASKS BLD TASKBUILD [Y,N,TCS,ADGRF]
.32:	.IF BLD EQ CR .GOTO EEXIT
	.IF BLD EQ "BUILD" .SETS BLD YES
	.IF BLD EQ "NOBUILD" .SETS BLD "N"
	.IF BLD EQ NO .GOTO EEXIT
	.IFT SCI .ASK SCI BUILD WITH THE SCIENTIFIC SUBROUTINE PACKAGE
	.IF BLD NE "TCS" .AND .IF BLD NE YES .AND .IF BLD NE "ADGRF" .GOTO 30
	.IF P4 EQ "MAP" .SETT MAP
.33:	.IF P4 EQ "" .ASK MAP DO YOU WANT A MAP FROM THE TASKBUILDER
	.IF P5 EQ "YES" .SETT MLTUSR
.35:	.IF P5 EQ "" .ASK MLTUSR BUILD A MULTIUSER TASK
.38:	.IFT MAP .SETS $MP ",TI:"
	.IFT SCI .SETS SCIANS "Y"
	.IF BLD EQ "ADGRF" .SETS AGANS "Y"
	.IF BLD EQ "TCS" .OR .IF BLD EQ "ADGRF" .SETS TCSANS "Y"
 
 
.DATA @LB1:[1,5]BLD 'P1' 'P1'.TSK;1/CP/FP'$MP'='P1' 'SCIANS' 'AGANS' 'TCSANS' 'F4PANS'
	.SETS OPTNS "LIBR=F4PRES:RO "
	.IFT MLTUSR .SETS OPTNS OPTNS+"UIC=[200,200]"
	.DATA @LB1:[1,5]OPT 'P1' 'OPTNS'
	.DATA TKB @'P1'.BLD
	.DATA PIP 'P1'.OBJ;*/DE/NM,'P1'.BLD;*,'P1'.OPT;*
	.DATA PIP 'P1'.FTN/PU
	.DATE PIP 'P1'.FTN/TR
	.CLOSE
 
	PIP 'P1'.PRC;1/TR
	;
	;
	.ASKS PASWRD ENTER LOGON PASSWORD
	.XQT SUB 'GRP'/'MEM'/'PASWRD' 'P1'
	TCF 33,14
.EEXIT:	;
