× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Cash box
  • From: Buck Calabro/commsoft<mcalabro@xxxxxxxxxxxx>
  • Date: Fri, 26 Mar 1999 09:02:22 -0500

On 03/24/99 09:22:47 PM "Eric Panissard"  wrote:

>We would like to drive a till (cash box) from an AS400 :
>    - The till is connected to a printer, the printer to a Win95/PC and 
the
>PC to the AS400 (V3R2) with CA/twinax.
>    - The till need some Escape sequences for open and close the drawer.
>
>How we can drive it from the AS400 ?

Here is a snippet of code that we used to validate that we could talk to a 
cash drawer:

FQSysPrt   O    F  132        Printer OflInd(*InOF)
D PrtString       S              3    Inz(x'030107') 
C                   Except    DoPrint 
C                   Eval      *InLR=*On 
OQSysPrt   E            DoPrint        1 
O                       PrtString            3 

This is probably a poor way to do it, but we just create a PC printer 
session with Client Access, do an OVRPRTF to point the spooled file to the 
PC printer and run this little program.  The printer device is a 3812 m1. 
Giving credit where credit is due, Paul Tykodi explained how to use ASCII 
transparency:

"Another way to accomplish the same task is to use the OS/400 feature 
called ASCII Transparency (ATRN). This operating system feature is the tool 
that allows the Client Access Virtual Printing and the Host Print Transform 
functions to operate correctly. The SCS hex code 03 followed by a count 
byte is the ATRN command. It tells the OS/400 operating system how many 
bytes of ASCII data are following its occurrence. 

If for example you wanted to send the HP PCL command for portrait from an 
RPG field, you could code the following values (in hex) into the field 03 
05 1B 26 6C 30 4F. The AS/400 operating system would move the information 
to the target printer for you, without interrogating it for data integrity, 
because it would already know that it was ASCII formatted data.

If you want to get creative and pass large amounts of ASCII data in this 
fashion, you need to insert the values 03 FF into your ASCII file at 255 
byte intervals."

Buck Calabro
Billing Concepts Inc (formerly CommSoft), Albany, NY
mailto:mcalabro@commsoft.net
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.