.ENABLE SUBSTITUTION
.ENABLE GLOBAL
;
; PRINT LABELS COMMAND FILE  
;				VER 2.0 26-MAR-80
;
.SETS DEFFIL "SAVELABEL.CMD"
.ASK OLD USE A SAVED DATA FILE
.IFT OLD .ASKS OLDFIL ENTER NAME OF SAVED FILE ['DEFFIL']
.IFT OLD .IF OLDFIL EQ "" .SETS OLDFIL "'DEFFIL'"
.IFT OLD @'OLDFIL'
.IFT OLD .SETS DEFFIL "NEWLABEL.CMD"
.;Change the definition of the following line to adjust lines/inch
.;
.SETN $LPI 0
.SETF SAV
.SETS SAVFIL ""
.ASK SAV SAVE RESPONSES
.IFT SAV .ASKS SAVFIL  SAVE FILE SPEC ['DEFFIL']
.IFT SAV .IF SAVFIL EQ "" .SETS SAVFIL "'DEFFIL'"
;
;1.5''LABELS=DEFAULT,  1.0''LABELS=6, 1.18'' LABELS=7
.ASKN[::9.] $LINE SIZE OF LABEL IN LINES
;
.IFNDF $NAME .ASKS $NAME NAME
.IFNDF $COMP .ASKS $COMP COMPANY
.IFNDF $DEPT .ASKS $DEPT DEPARTMENT
.IFNDF $MS   .ASKS $MS MAIL STOP
.IFNDF $CITY .ASKS $CITY CITY
.IFNDF $STATE .ASKS $STATE STATE
.IFNDF $ZIP  .ASKS $ZIP ZIP COPE
.IFF SAV .GOTO 10$
.OPEN #2 'SAVFIL'
.ENABLE DATA #2
.ENABLE GLOBAL
; FILE:  '<FILSPC>'
; LABEL.CMD SAVED RESPONSES FROM '<UIC>' AT '<TIME>' '<DATE>'
.;
.SETN $LINE  "'$LINE'"
.;
.SETS $NAME  "'$NAME'"
.SETS $COMP  "'$COMP'"
.SETS $DEPT  "'$DEPT'"
.SETS $MS    "'$MS'"
.SETS $CITY  "'$CITY'"
.SETS $STATE "'$STATE'"
.SETS $ZIP   "'$ZIP'"
.DISABLE DATA #2
.CLOSE #2
;
; RESPONSES SAVED IN FILE:  '<FILSPC>'
;
.10$: .ASKN[::5.] MAX ENTER NUMBER OF LABELS WANTED
;
; THIS COMMAND ONLY WORKS FOR LA120'S AS THE OUTPUT DEVICE
; IF THE DEVICE IS NOT A LA120 RESPOND <CTRL> TO THE NEXT QUESTION
.ASKS TTN OUTPUT DEVICE [TI:]
.IF TTN EQ "" .SETS TTN "TI:"
.TEST TTN
.SETS TEST TTN[<STRLEN>:<STRLEN>]
.IF TEST NE ":" .SETS TTN TTN+":"
.SETN COUNT 0
.IF <CLI> EQ "MCR" SET /FORMFEED='TTN'
.IF <CLI> EQ "DCL" SET TERMINAL:'TTN' FORM_FEED
.ASK GO <CR> WHEN TOP OF FORM HAS BEEN SET
.OPEN 'TTN'
.LOOP1:
.DATA ['$LINE't['$LPI'z

.LOOP:
.DATA [8w'$NAME'
.DATA [2w'$COMP'
.DATA [2w'$DEPT'
.DATA [1w'$CITY'	MAIL STOP:  [7w'$MS'
.DATA [1w'$STATE'	    [5w'$ZIP'

.INC COUNT
.IF COUNT LT MAX .GOTO LOOP
.DATA 

.DATA [66t[z[3w
.ASK MORE DO YOU WANT MORE LABELS
.IFT MORE .ASKN MAX HOW MANY
.SETN COUNT 0.
.IFT MORE .ASK GO <CR> WHEN TOP OF FORM HAS BEEN SET
.IFT MORE .GOTO LOOP1
.; reset terminal to default parameters
.EXIT
