.;
.; THIS ROUTINE SENDS PRINTING PARAMETERS AND
.; A FILE TO THE IBM PRINTER
.;
.ENABLE QUIET
.ENABLE SUBSTITUTION
.;
.; CHECK FILESPEC
.;
.IBMAGN:
.IF P1 NE "" .GOTO A4
.A7:
.ASKS P1 FILESPEC NOT EXISTING, ENTER FILESPEC
.A4:
.TESTFILE 'P1'
.IF <FILERR> EQ 1 .GOTO FILEOK
.GOTO A7
.;
.; CHECK FONT AND PAGE ORIENTATION
.;
.FILEOK:
.IF P2 EQ "106" .GOTO A1
.IF P2 EQ "100" .GOTO A1
.IF P2 EQ "101" .GOTO A1
.IF P2 EQ "102" .GOTO A1
.IF P2 EQ "103" .GOTO A1
.IF P2 EQ "104" .GOTO A1
.DISABLE QUIET
;
; FONTS AVAILABLE FOR IBM PRINTER
;
; CODE	FONT				PAGE ORIENTATION
;
; 100	COURIER, 10 PITCH		VERTICAL
; 101	PRESTIGE PICA, 10 PITCH		VERTICAL
; 102	PRESTIGE ELITE, 12 PITCH	VERTICAL
; 103	LETTER GOTHIC, 12 PITCH		VERTICAL
; 104	SPECIAL SYMBOLS, 10 PITCH	VERTICAL
; 106 	DATA 1, 10 PITCH		HORIZONTAL
;
;
.ENABLE QUIET
.ASKS [::"106"] P2 ENTER CODE<CR> OR <CR> FOR DATA 1, 10 PITCH, HORIZONTAL PAGE
.GOTO FILEOK
.;
.; CHECK PRINTING
.;
.A1:
.IF P3 EQ "S" .GOTO A2
.IF P3 EQ "D" .GOTO A2
.ASKS [::"D"] P3 ENTER S<CR> FOR SINGLE SIDE PRINTING OR <CR> FOR DUPLEX 
.GOTO A1
.;
.; CHECK NUMBER OF COPIES
.;
.A2:
.TEST P4
.IFF <NUMBER> .SETS P5 ""
.IF P4 GE "1" .AND .IF P4 LE "3" .GOTO A3
.ASKS [::"1"]  P4 ENTER THE NUMBER OF COPIES (2-3) OR <CR> FOR 1 COPY
.GOTO A2
.;
.; CHECK DELIVERY MESSAGE
.;
.A3:
.IF P5 NE "" .GOTO A6
.ASKS P5  ENTER RECIPIENT NAME<CR> OR <CR> TO ENTER YOUR UIC
.IF <STRLEN> LT 1 .SETS P5 <LOGUIC>
.GOTO A3
.;
.; BUILD PRINT PARAMETERS
.;
.A6:
.DISABLE QUIET
; WORKING.....
.ENABLE QUIET
.SETS CLI <CLI>
.IF CLI NE "MCR" MCR SET /MCR=TI:
SET /SLAVE=TI:
.OPEN IBMTMP.TMP
.1:
.IF P3 = "S" .GOTO C
.IF P3 = "D" .GOTO D
.2:
.DATA QUA 'P4'
.DATA ,END
.DATA DELIVER TO 'P5' 'P6' 'P7' 'P8' 'P9' 
.IF P3 EQ "S" .DATA ,FEED 1
.IF P3 EQ "D" .DATA ,FEED 0
.DATA ,END
.CLOSE
.GOTO X
.C:
.DATA ,PRINT 'P2'
.DATA DUP 0
.GOTO 2
.D:
.DATA ,PRINT 'P2'
.DATA DUP 1
.GOTO 2
.;
.; APPEND FILE TO PRINT PARAMETERS, TRANSFER TO 50,51, CLEANUP
.;
.X:
PIP IBMTMP.TMP='P1'/AP
PIP SX:[50,51]IBM.PR/NV/FO/CD=IBMTMP.TMP
PIP IBMTMP.TMP;*/DE
.DISABLE QUIET
; PROCESSING COMPLETED
.ENABLE QUIET
SET /NOSLAVE=TI:
SET /CLI=TI:'CLI'
.EXIT
