Thanks Scott. The phrase "making it to hard" comes to mind.

Definitely got confused with BASIC.

I apologize for posting to the wrong list.

John McKee


-----Original message-----
From: Scott Klement midrange-l@xxxxxxxxxxxxxxxx
Date: Tue, 02 Aug 2011 18:56:09 -0500
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Character conversion

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

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.