Okay, I was getting some wires crossed over this in that I 
conflated the special case of converting binary data to a hexadecimal character 
string and the general case where binary data in (putatively) packed decima 
format is converted to a decimal character string.I’ve written code to perform  
both tasks many times and am actually a pretty competent (accomplished, even) 
Mainframe assembler programmer but I’m also at the end of a long sabbatical 
leave and some rust build-up is inevitable I guess.I’m excited to put my 
talents back into income-generating use once more.
Sorry for any confusion y’all Keven
                
        





On Fri, Apr 13, 2018 at 9:17 AM -0500, "Seymour J Metz" <sme...@gmu.edu> wrote:










Of course; the standard way to convert binary to hex is the UNPK/TR with a one 
byte pad.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List  on behalf of Martin Ward 
Sent: Friday, April 13, 2018 10:13 AM
To: ASSEMBLER-LIST@listserv.uga.edu
Subject: Re: SDWA - SDWACMPC conversion

On 13/04/18 15:02, Seymour J Metz wrote:
> Unpacking x'0123' gives you x'F0F132'; the OI then gives you
> x'F0F1F2'; what you want is x'F0F1F2F3'. Or with an UNNPK length of 4
> you get x'F0F0F1F2'; still not what you want.

Suppose the byte after the X'0123' is X'xy' (where x and y are
any hex digits).

Unpacking X'0123xy' (with a source length of 3 and a destination
length of 5) gives you X'F0F1F2F3yx' which, when you drop
the last byte, gives you what you want.

This assumes that there is an addressable byte immediately after X'0123'
For a general solution, copy the source field to a sufficiently
large work area before unpacking.

--
                        Martin

Dr Martin Ward | Email: mar...@gkc.org.uk | 
http://secure-web.cisco.com/1lagfs9GjyiyLT82Ko-qpifb67fwapePMSu4hk-KLL9Cuw1Dv2lxf8XLjorCTFzvoSytC7yetXWud7Orhlxk8PYk2LT-BzzCB8QwgqWQ_GCl4XFLonmHV3QiPFFyWl9r3O-RxMr7EeW3bVXA3qdr2uLLpSBdLHSC60Mn8oc-3gZ41bV8MvqSvV2Ig1wvac7TCVYI1Cokf6ZY9CjAYVJw4WlnxYGp1tVFbM0xqtfdCpHjy7cukGyH_q0RN0d3mUEOjjk0SKUZAf2MormdyraoJO6BTIHydBjmiIVddu2xpMi9Hx2PNm4Cl0_qTJ87Rh6fafPhM7N-Oa8b9SJW_MFdcQBqUtFxnIoGqg1ctU1RIK9dYB5M4DuJjmw8ruEWV0a5qVyPVSkBz4xFAePDKA2WdVA/http%3A%2F%2Fwww.gkc.org.uk
G.K.Chesterton site: 
http://secure-web.cisco.com/1EFv6ITm-cNPZyc6WUhu5xV68B2nBl3Uk0xaQxJ76I90PTqR9iuF72rwOH7ANwbiSgc7DNIU5g0WWZMJGbQmDPStTPrE83paP9H2Q-VQADfxQ-5CzA0xoQG_9UpkKcdu_0ijk4iCGKzcCg3Nrs958Hus8IdtODBeclqOWt4vZoC7ZGGpNDS0G0VHoJBw2-ZRuhkgYVwFLTMu940d6JODhT89XdKnccfHj_anNDgRZBpiQ7Ank09WBMK6Df1MpajbefsCgKWLKJw7mlS64zezTcmi1GTD9gY1o6LfdujKrGRx4l8yXds6KJtvJ9CllXxJcl4J4ue6vs7uhskTYVuueIAFCXm3fWu8HCr0YGoUnhY67xGoXYVzm3OZAF2KCjQTAMxumXfFxJRqHVsuMk6yTtQ/http%3A%2F%2Fwww.gkc.org.uk%2Fgkc
 | Erdos number: 4

Reply via email to