| Clark F Morris 2007-05-25, 3:55 am |
| On 22 May 2007 11:59:07 -0700, Alistair
<alistair@ld50macca.demon.co.uk> wrote:
>On 22 May, 03:41, Clark F Morris <cfmpub...@ns.sympatico.ca> wrote:
>
>No PACK involved. The move was a simple move. If EBCDIC then
>X'F3404040' would result in an S0C7 (I presume) unless only the low-
>order nibbles are moved for each character and the X'F' nibble put in
>to all high order positions ie X'F3404040' becomes X'F3F0F0F0'. My
>money says that as there was no reported abend then it isn't IBM
>hardware.
The Language Reference Manual for Enterprise COBOL on the IBM z series
say that if the receiving field is numeric edited which WS-FORMAT-4 is
and the sending field is PIC X(4), the sending field is treated as PIC
9(4) (unsigned integer). Thus I would expect the following sequence.
PACK TEMPNUMERIC,WS-INPUT-FIELD I forgot the name
MVC EDITTEMP,EDITMASK Editmask probably would be x'402020202021'
ED EDITTEMP,TEMPNUMERIC
MVC WS-FORMAT-4,EDITTEMP+2 Ignore the fill character and the
* first byte because the pack would have added a high
* order zero.
Since the sign byte will never be examined, the invalid sign won't be
detected (principles of operations for the z series).
|