Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
X'012354621598123546C'
should be
X'12354621598123546C'
and
X'215687741669841125C'
should be
X'15687741669841125C'
if you want all except the last four significant digits overlayed then
X'12354621598123546C' would become
X'00000000000003546C'
and
X'15687741669841125C' would become
X'00000000000001125C'
is that what you want?
then you will have to expand the pd to zd, zero the zd
and then repack
because what you are trying to do is zero a half byte.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Earlier this week we saw TRAN=BIT and TRAN=UNBIT used. With these it would be possible to clobber the high-oder four bits of byte 7 of the field.
Another possibility: PD0 (see Appendix C in the manual) is a 2-8 byte field definition which ignores the "sign" in a packed-decimal (it appears as '0') and ignores the left-most digit. The result is always an even number of digits with no sign. You need four digits, and TO=PD,LENGTH=9 (in your case) should get it back to a positive 9-byte packed field, but with only four non-zero digits. If your field can be -ve, you'd need an extra bit of code for that.