sumit arora wrote:
> 
> but will not UNPK dump while unpacking '0000017B' as it will look for 'c' , 
> 'd' , 'f' e' as sign bit not 'B'

UNPK just moves bits around, he doesn't validate the source field. Note
that in Tony's example, both field lengths are one byte longer than the
real input and output fields. This is so that the last byte reversal
that UNPK does is thrown away. You have to be sure that your input has
that last byte in readable storage even though you won't be using the
output. i.e. x'17b' becomes x'F1F7FB' and whatever the byte after it is
gets revesed. One nit:

           MVC   OUTAREA(8),UNPACK10+1

should be:

           MVC   OUTAREA(8),UNPACK10

It's the last byte that gets discarded, not the first.



> 
> --- On Mon, 2/2/09, Tony Thigpen <[email protected]> wrote:
> 
> > From: Tony Thigpen <[email protected]>
> > Subject: Re: Display true hex as EBCDIC characters?
> > To: [email protected]
> > Date: Monday, 2 February, 2009, 6:34 AM
> > Sorry, forgot the MVC:
> >
> > R1 points to 4 byte hex field.
> >
> >           UNPK  UNPACK10,0(5,R1)        UNPACK HEX CODES
> >           TR    UNPACK10(9),TRTAB       CONVERT TO
> > PRINTABLE HEX-VALUE
> >           MVC   OUTAREA(8),UNPACK10+1
> >
> > UNPACK10 DS    CL10
> >
> > TRTAB    EQU   *-240                   ENTRY POINT FOR
> > TRANSLATE TABLE
> >           DC    X'F0F1F2F3F4F5F6F7F8F9C1C2C3C4C5C6'
> > TRANSLATE TABLE
> >
> >
> > Tony Thigpen
> >
> >
> > -----Original Message -----
> >   From: Tony Thigpen
> >   Sent: 02/01/2009 07:42 PM
> > > R1 points to 4 byte hex field.
> > >
> > >          UNPK  UNPACK10,0(5,R1)        UNPACK HEX
> > CODES
> > >          TR    UNPACK10(9),TRTAB       CONVERT TO
> > PRINTABLE HEX-VALUE
> > >
> > > UNPACK10 DS    CL10
> > >
> > > TRTAB    EQU   *-240                   ENTRY POINT FOR
> > TRANSLATE TABLE
> > >          DC
> > X'F0F1F2F3F4F5F6F7F8F9C1C2C3C4C5C6' TRANSLATE TABLE
> > >
> > >
> > >
> > >
> > > Tony Thigpen
-- 
Don Poitras - zSeries R & D  -  SAS Institute Inc. -  SAS Campus Drive 
mailto:[email protected]   (919)531-5637  Fax:677-4444     Cary, NC 27513

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to