|
If the field is declared on a D spec, you can use the PACKEVEN keyword to cause it to be 6 positions (in this situation) rather than 7. -Bob Cozzi www.RPGxTools.com RPG xTools - Enjoy programming again. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta Sent: Thursday, October 20, 2005 2:01 PM To: 'RPG programming on the AS400 / iSeries' Subject: RE: How are Packed Fields in an RPGIII DS Represented Packed fields are stored in nibbles, with the last nibble representing the sign, so the number of digits is the number of characters times two, minus one for the sign. A 6-byte packed field is 11 digits, a 3-byte packed field is 5 digits. Physically they always hold an odd number of digits, so if you specify by position, the closest you can get is a 7-digit field with 6 positions: P 1 4 6 Joe > From: Ala, Michael A > > I have a Packed field that is in a data structure the Field is 6 positions > all 6 being decimal represented in RPG IV as 6P 6 > > But in RPG III is it P 1 6 6 > Or would this be considered a 9 position with 6 decimal > > If I try to key in P 1 3 6 > I get a syntax error in SEU That the Decimal Portion is greater than the > Field Length
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.