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



Ah well this won't do what you want. You want the ASCII numeric value of the two digits so that EBCDIC X'F5F6' ends up as an ASCII decimal 56 byte instead of EBCDIC X'56' as this procedure creates.

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Morgan, Paul
Sent: Thursday, August 04, 2011 11:54 AM
To: Midrange Systems Technical Discussion
Subject: RE: Character conversion

John,

This procedure works for two characters:

D Pack PR 1A
D 2A

P Pack B
D Pack PI 1A
D Char2 2A

D Redefined DS
D Packed1 1P 0
D Char1 1A Overlay( Packed1 )

/Free
Packed1 = %Dec( %SubSt( Char2 : 1 : 1 ) : 1 : 0 ); // get the first character into a high nibble for %BitAnd
Return %BitOr( %BitAnd( Char1 : // Get High Nibble
X'F0' ) :
%BitAnd( %SubSt( Char2 : 2 : 1 ) : // Get Low Nibble
X'0F' ) );
/End-Free

P Pack E

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John McKee
Sent: Thursday, August 04, 2011 10:52 AM
To: Midrange Systems Technical Discussion
Subject: Re: Character conversion

Thanks Dennis.

But, those digit pairs are essentially packed unsigned decimal. All values are decimal. Issue was how to get those values converted from character string to single byte values. So, instead of two bytes containing F5F6 (zoned), a single byte with 56 (no zones).

John McKee

-----Original message-----
From: Dennis iseries@xxxxxxxxxxxx
Date: Thu, 04 Aug 2011 06:38:34 -0500
To: Midrange Systems Technical Discussion midrange-l@xxxxxxxxxxxx
Subject: Re: Character conversion

You probably know this, but for the record: If I read the below correctly, the values 56,78,90 are probably hex values, not decimal... And the 104,...,105 bit is probably decimal. It gets very confusing when one tries to mix bases (or character sets or languages or. ..). Pick one (probably hex in this case, and stick with it. You'll find yourself MUCH less confused!


++
Dennis
++
Drag me, Drop me, Treat me like an object !



Sent from my Galaxy tablet phone. Please excuse my brevity.
For any grammatic/spelling errors, there is no excuse.
++


"John McKee" <jmmckee@xxxxxxxxxxxxxx> wrote:

Code 128 has three variants. Set c uses numeric only, packed two
digits per byte. Set B uses one character per byte.

Given a seven digit account number, such as 5678901, the output needs
to be - decimal values here:

105, 56, 78, 90, 104, 31, xx

I can't recall the specific value for 31, or the check character for
xx.

Only constants are 105 and 104. All values are one comma separated
number (decimal above) per byte.

I thought this would be easier. I went from a bar code with an
incorrect value to no bar code at all.

I need to think about this more. I would have responded earlier,
except TWICE, my composed response got trashed, TWICE, by a timed out
connection and a mysteriously down (multiple times) webmail server.

Sorry to take up time with this stupid issue.

John McKee
-----Original message-----
From: Scott Klement midrange-l@xxxxxxxxxxxxxxxx
Date: Wed, 03 Aug 2011 16:03:25 -0500
To: Midrange Systems Technical Discussion midrange-l@xxxxxxxxxxxx
Subject: Re: Character conversion

Sorry, I don't follow you. What do you mean by "get 105 in a single
character"? (Unless you mean exactly what I said already, that you
want to set the value of a byte to x'69', which is the same as
decimal 105?)

Likewise, when you say F1F2 compressed into 12, that's what I already

said... instead of charvar = '12' you'd do charvar = x'12'.

Isn't that what I said? What am I missing?


On 8/3/2011 3:52 PM, John McKee wrote:
Scott,

That was example data only. Not good, either, unfortunately. I
need
to get 105 in a single character. Then, pairs of digits - such as
1
and 2 - which would be in a character string as F1F2 (two
characters)
compressed into one character (12). Different digit pairs are
needed
(variable data). The 105 and another value, 104, are constants
used
to identify the change of coding within a barcode sequence. Just
latched onto %char, unfortunately.

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.

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

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

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.