× 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.



RPG questions should really be posted to RPG400-L...

But, %char() converts data in a numeric field to it's human readable representation in a character field. (I think you are confusing it with the BASIC CHR$() function that converts an ASCII code point to a character.)

Assuming you want to put a byte containing the value decimal 105 (hex 69) together with a byte containing decimal 12 (hex 0c) then the RPG code would be:

bc = x'69' + x'0c'


On 8/2/2011 6:12 PM, John McKee wrote:
I am trying to build a composite code 128 bar code. The composite part is that I am needing to use mode B and mode C.

I have a sample barcode and when I compare my results, the bars don't match.

Today, I had a "bright idea". Run a test program in debug mode and look at the character string that the test program built.

What I have, partially is:

eval bc = %char(105) + %char(12)

The bc field is defined as character.

When I looked at the bc variable in debug, it showed 10512

Is debug "helping" me like Windows usually does? Or, am I using the wrong BIF? Looking at the manual, %char would seem to be the right BIF. I seem to remember something a few months ago where debug does try to "help". I can't remember enough of what I think I remember to search the archives.

Seems like a stupid question, to me.

Thanks for assistance.


John McKee


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.