You can also swap out the first two instructions below with... 

LLGF  R2,bin4

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Tony Thigpen
Sent: Wednesday, January 19, 2022 12:50 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Unsigned Binary Formats

Caution! This message was sent from outside your organization.

Off the top of my head:

SGR  R2,R2
ICM  R2,b'1111',bin4
CVDG R2,PWORK16

Tony Thigpen

Dave Clark wrote on 1/19/22 12:32 PM:
>          If I have a 4-byte signed binary number (i.e., up to 
> 2147483647), I can convert it to packed format as follows.
>
> L    R2,BIN4
> CVD  R2,PWORK8
>
>          How would I convert a 4-byte --un--signed binary number (such 
> as an RBA, up to 4294967295) to packed format?  If you need a reason, 
> I'm writing an external REXX function that needs to be able to return 
> an RBA in zoned decimal format to the caller.
>
>          Thus, although I know how I would convert a signed zoned 
> number back to a signed binary format, I also need to know how to 
> convert those unsigned 10 zoned digits back to an unsigned binary 
> format.  Help with both issues?
>
> Sincerely,
>
> Dave Clark
> --
> Winsupply Group Services
> 3110 Kettering Boulevard
> Dayton, Ohio  45439  USA
> (937) 294-5331
>
>
>
> **********************************************************************
> *********************** This email message and any attachments is for 
> use only by the named
> addressee(s) and may contain confidential, privileged and/or 
> proprietary information. If you have received this message in error, 
> please immediately notify the sender and delete and destroy the 
> message and all copies. All unauthorized direct or indirect use or 
> disclosure of this message is strictly prohibited. No right to 
> confidentiality or privilege is waived or lost by any error in transmission.
> **********************************************************************
> ***********************
>

Reply via email to