Having problems trying to move the Endevor quorum size field to an email. What do I need to do move it correctly?

Document ID : KB000045764
Last Modified Date : 14/02/2018
Show Technical Document Details

QUESTION:

I am trying to move PAPPQUOR from the package approver definition to a email that will end up as displayable data.  This field is defined as a 1/2 word binary field.

ANSWER:

In order to convert a binary halfword to a displayable format you can use these four instructions:

LH    R0,PAPPQUOR
CVD   R0,WDOUBLE
OI    WDOUBLE=7,X'0F'
UNPK  WQORUM,WDOUBLE

Where

R0              -  can be replaced by any general purpose register that you don't mind being destroyed.
                     Usually R0 is suitable
WDOUBLE   -  An intermidiate field that needs to be defined as D (double work, 8 bytes)
WQORUM    -  The resulting field needs to be defined a CL2 and in the end it will contain 
                     between '00 and '16' (because 16 is maximum quorum size).