Escape character for printing

I need to use the escape character to print barcodes to a tally printer.
How would i define and write the escape sequence, any suggestions please? Escape character : 1B (hex)

define data local
1 #esc (A4)
end-define
assign #esc = ‘H"1B32’
write (1) #esc
end

You’re close! Put the H’ qualifier outside the quotes…

#esc need only be 2 characters.
assign #esc = H’1b32’

If Natural’s print management gets in the way (sometimes happens with sending special characters to the print device), try using WRITE WORK FILE 1 #ESC stuff… instead. Downside is that you have to do all the line spacing, page ejects, headings, titles yourself, but for special device output like this that’s not always a bad thing.