Hi all:
This program converts our standard label output to Zebra's ZPL printer output.
Our labels are 5 lines but this should work on almost any output that does not use skip to line XX (other than top of page).
Our labels are 40 char wide but this should work up to 80 chars wide.
We developed this because we are too cheap to by TLAshford/Mark Magic etc..
Hope it helps someone else.
It is based on using a copied spool file with control characters.
Notes:
The ^poi command prints the label INVERTED. You may want to remove that command.
The CTLCHAR(*FCFC) places a "line number" in position 1 of the copied file.
'1' = top of page
' ' = space before 1 line
'0' = space before 2 lines
'-' = space before 3 lines
'+' = space before 4 lines
Just direct the output to your zebra printer and it should work
If not you can always get your money back
Best of Luck
GLS
This program converts our standard label output to Zebra's ZPL printer output.
Our labels are 5 lines but this should work on almost any output that does not use skip to line XX (other than top of page).
Our labels are 40 char wide but this should work up to 80 chars wide.
We developed this because we are too cheap to by TLAshford/Mark Magic etc..
Hope it helps someone else.
Code:
H DFTACTGRP(*NO) FPRTIN IF F 133 DISK FZEBOUT O F 132 PRINTER DZEBPRT PR EXTPGM('ZEBPRT') DZEBPRT PI DZEBB4 S 3S 0 INZ DFIRST S N INZ(*ON) IPRTIN NS I 1 1 CTLCHAR I 2 81 PRTLIN /FREE DOU %EOF(PRTIN) ; READ PRTIN ; IF %EOF(PRTIN) ; ITER ; ENDIF ; SELECT ; WHEN CTLCHAR = '1' ; ZEBB4 = 50 ; IF NOT FIRST ; EXCEPT END ; ENDIF ; EXCEPT START ; WHEN CTLCHAR = ' ' ; ZEBB4 += 50 ; WHEN CTLCHAR = '0' ; ZEBB4 += 100 ; WHEN CTLCHAR = '-' ; ZEBB4 += 150 ; WHEN CTLCHAR = '+' ; ZEBB4 = ZEBB4 ; OTHER ; ZEBB4 = 50 ; ENDSL ; FIRST = *OFF ; EXCEPT DTLOUT ; ENDDO ; EXCEPT END ; *INLR = *ON ; /END-FREE OZEBOUT E START 1 O 8 '^XA ^POI' OZEBOUT E DTLOUT 01 O 10 ' ^FO01,' O ZEBB4 13 O 26 '^ADN,36,20^FD' O PRTLIN 106 O 109 '^FS' OZEBOUT E END 01 O 3 '^XZ'
Code:
CPYSPLF FILE(&PRTNAME) TOFILE(QTEMP/PRTIN) + JOB(&JOBNO/&USERNAME/&JOBNAME) + SPLNBR(&SPLNO) MBROPT(*REPLACE) + [COLOR=#ff0000][U][I]CTLCHAR(*FCFC) [/I][/U][/COLOR] OR CPYSPLF FILE(QSYSPRT) TOFILE(QTEMP/PRTIN) + JOB(WSID/GLS400/123456) + SPLNBR(7) MBROPT(*REPLACE) + [COLOR=#ff0000][U][I]CTLCHAR(*FCFC) [/I][/U][/COLOR]
The ^poi command prints the label INVERTED. You may want to remove that command.
The CTLCHAR(*FCFC) places a "line number" in position 1 of the copied file.
'1' = top of page
' ' = space before 1 line
'0' = space before 2 lines
'-' = space before 3 lines
'+' = space before 4 lines
Just direct the output to your zebra printer and it should work
If not you can always get your money back
Best of Luck
GLS
Comment