TARGET: PROC(NUP,NDOWN,NACROSS,NBETWEEN,NLINES,NSKIP); /* PRINT TARGET LABELS FOR ANY RECTANGULAR LABEL STOCK */ /* */ /* author: Chuck Eastlack */ /* date: 7 April l982 */ /* */ /* WESTAT PL/I PROCEDURE LIBRARY . . . . . . . . . . */ dcl labels file external; DCL (NUP,NDOWN,NACROSS,NBETWEEN,NLINES,NSKIP) FIXED BIN(31); DCL (NDASHES,REM,i,j) FIXED BINARY(31); DCL (LINE1,LINE2,TEMP) CHAR(132) VAR; DCL (copy,divide) BUILTIN; DCL TARG CHAR(12) INIT('TARGET LABEL'); NDASHES = divide((NACROSS - 14),2,31); REM = (NACROSS - 14) - 2 * NDASHES; TEMP = '*' || COPY('-',NDASHES) || COPY(' ',REM) || TARG || COPY('-',NDASHES) || '*'; LINE1 = TEMP; DO I = 1 TO NUP - 1; LINE1 = LINE1 || COPY(' ',NBETWEEN) || TEMP; END; TEMP = '*' || COPY(' ',(NACROSS - 2)) || '*'; LINE2 = TEMP; DO I = 1 TO NUP - 1; LINE2 = LINE2 || COPY(' ',NBETWEEN) || TEMP; END; DO j = 1 TO NDOWN; PUT FILE(labels) EDIT(LINE1) (SKIP,A); DO I = 1 TO NLINES - 2; PUT FILE(labels) EDIT(LINE2) (SKIP,A); END; put file(labels) edit(line1) (skip,a); do i = 1 to nskip; put file(labels) skip; end; END; RETURN; END TARGET;