1 / 8

UNPK

UNPK. UNPK. Instruction type: SS2 Explicit Coding: D1(L1,B1),D2(L2,B2) Example UNPK 3(4,5),8(9,7) Example UNPK X(3),Y(4) Use: Converts packed fields to zoned decimal. What does it do?. UNPK X,Y. 00 12 3C. Y. X. F0 F0 F1 F2 C3. What does it do?. UNPK X,Y.

kirima
Download Presentation

UNPK

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UNPK

  2. UNPK • Instruction type: SS2 • Explicit Coding: D1(L1,B1),D2(L2,B2) • Example UNPK 3(4,5),8(9,7) • Example UNPK X(3),Y(4) • Use: Converts packed fields to zoned decimal

  3. What does it do? UNPK X,Y 00 12 3C Y X F0 F0 F1 F2 C3

  4. What does it do? UNPK X,Y 00 00 12 34 45 6C Y F5 C6 X

  5. UNPK • Example use: Assume: X DC PL3’-123.45’ Y DS ZL7 You execute: UNPK Y,X X Before: 12345D Y After: F0F0F1F2F3F4D5

  6. UNPK • Example use: Assume: X DC PL3’-123.45’ Y DS ZL3 (Too short) You execute: UNPK Y,X X Before: 12345D Y After: F3F4D5

  7. Programming Tips • Make sure the receiving field will hold the result • UNPK works no matter the state of the data. In other words, if you UNPK garbage, you get more garbage • UNPK doesn’t generate a data exception (SOC7) • ED or EDMK will also convert from packed decimal, but leaves the data in a printable format

  8. Try it in VisibleZ • Try the following programs: • unpk.obj • unpk1.obj • unpk2.obj

More Related