How is sign stored in Packed Decimal fields and Zoned
Decimal fields?

Answer Posted / escapa

In both sign is stored at last byte but

In PACKED Decimal is at last nibble where as in ZONED decimal sign is stored at higher nibble of last byte

Eg.
+1234 in zoned decimal it will be stored as F1 F2 F3 C4
-1234 in zoned decimal it will be stored as F1 F2 F3 D4

+1234 in PACKED decimal it will be stored as 01 23 4C
-1234 in PACKED decimal it will be stored as 01 23 4D

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2337


What is redefines clause in COBOL?

851


What is the difference between external and global variables in COBOL?

815


how to convert the recors form vsam file to db2 table tru file aid

2763


What is a SSRANGE and NOSSRANGE?

824






Are you comfortable in cobol or jcl?

643


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1232


What are the different types of condition in cobol and write their forms.

660


State the various causes of s0c1, s0c5 and s0c7.

665


Write a cobol program making use of the redefine clause.

739


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748


What are different data types in cobol?

694


Explain how to differentiate call by context by comparing it to other calls?

689


Have you used comp and comp-3 in your project? And how?

2010


How do get the result of your program directly on your pc?

1885