we use workstation customization objects ( *WSCST-objects ) to solve those problems. This WSCST-table can be integrated in the client access printer session.
To use this you have to write a special character to the printerfile which will be translated by the WSCST-Table. That means X’A8′ for example will be replaced by the appropriate ESC-sequences. Here part of the WSCST-Table which I created for use with EPSON TMT88-printer with customer display :
/* start customer display ( ASCII X’A8′ = EBCDIC X’AB’ */
/* end customer display ( ASCII X’A7′ = EBCDIC X’9B’ */