Explain diiferent data types in AS400

695 pts.
Tags:
AS/400
Packed-Decimal Format
RPG ILE
Zoned-Decimal Format
Hi, Can anyone please explain me different data types in AS400 What is the difference between Packed decimal and zoned decimal. Since in our project we have both .Net and AS400 technolgy. Some times .Net guys usually retrieve data from AS400 system into their tables that time they used to ask me how can we define our variable related to packed decimal and zoned decimal in their tables either it is int or float value. Thanks, mohan K

Answer Wiki

Thanks. We'll let you know when a new response is added.

The Zoned decimal takes a full byte to store each digit of numeric value except that the zone of the right most dgit is used to store the sign of the data.
1111 means (+)
1101 meens (-)

example +136 – 11110001 11110011 <b>1111</b>0110
-136 – 11110001 11110011 <b>1101</b>0110

the sign bits described in bold.

The packed decimal just takes half of the storage for the same number in Zoned decimal. The sign bits always occupy the righmost four bit posistions of a packed decimal value.

example +136 – 000010011 0110<b>1111</b>
-136 – 000010011 0110<b>1101</b>

the sign bits described in bold.

Sabarish S

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Yorkshireman
    The manuals at IBM.com have all the answers and more..
    5,580 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following