> From: "Chase, John" <[EMAIL PROTECTED]> > > OP wants it translated to "the real hex number." Without any > > further > > technical specifications, I would assume, e.g., that EBCDIC > > "A3" should be > > translated into X'A3'. In this case two input bytes result > > in one output byte. > > There are other possibilities where the output is not exactly > > one-half the length > > of the input. This string is really X'C1F3'. If you PACK > > it you will end > > up with X'013F' which is not the same as X'A3'. First > > translate every byte > > into its hex equivalent, then pack with one extra byte on > > the right that you > > plan to throw away. > > TR STRING,TABLE > > * STRING now contains X'0A03'. > > Why is this necessary? > > > PACK OUTPUT(2),STRING(3) > > * OUTPUT now contains X'A3yx', where yx is the inverse of > > whatever was in > > the first byte of OUTPUT before the PACK executes. > > The result would be identical without the preliminary TR.
As stated above, without the TR to change c'A3' from x'C1F3' to x'0A03', then result of the pack would be x'13yx', not x'A3yx' as desired. ---------------------------------------------------------------------- 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

