Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 UNPK

2 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? 00 12 3C F0 F0 F1 F2 C3 UNPK X,Y Y X

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

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

6 UNPK Example use: Assume: Y DC PL3’-123.45’ X DS ZL3 (Too short) You execute: UNPK X,Y Y Before: 12345D X 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


Download ppt "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."

Similar presentations


Ads by Google