Ron,
I assume you mean that you have a field which looks like this: X'1234'
And you want to move it to a field so that it looks like this" X'F1F2F3F4'
Assume:
X DS XL2
Y DS XL4
TEMP DS XL5
UNPK TEMP(5),X(3)
MVC Y,TEMP
This will unpack the 2 bytes of unsigned packed decimal, plus the single "we
don't care" byte that follows it, into the field TEMP. The UNPK will unpack the
2 bytes of packed decimal into the unpacked or zoned format, and will "flip"
the zone and decimal nibbles of the 3rd byte, which we don't care about.
Once unpacked, you simply move what you want from the unpacked field.
Hope this helps,
Chuck
Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
CCG Information Technology
Thermo Fisher Scientific
300 Industry Drive
Pittsburgh, PA 15275
Direct: 724-517-2633
FAX: 412-490-9230
[email protected]
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Ron Thomas
Sent: Wednesday, July 24, 2013 5:20 AM
To: [email protected]
Subject: Unsigned packed decimal
Hello.
I have a input file where the data is stored in unsigned packed decimal format,
now i need the data to be moved to 9(4) field. Could someone let me know how
the data is retrived?
Thanks,
Ron T
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN