|
Right. Numeric variables are implicitly defined as packed unless you explicitly specify zoned. All numeric fields in a data structure are defined as zoned. Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com Krish Thirumalai <krishnithya@gmai l.com> To Sent by: RPG programming on the AS400 / rpg400-l-bounces@ iSeries <rpg400-l@xxxxxxxxxxxx> midrange.com cc Subject 05/02/2005 11:27 Re: Field compiles as Packed but is AM zoned in file Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> We had this error when we converted our code from RPGIII to RPG IV a few years ago and raised a PMR with IBM. They were able to replicate this problem but i have no idea what happened, since we decided to change all the progams since we did not want to wait for a resolution The problem is with the RPG program especially numeric variables in a data-structures. For example, we define SZPO as zoned-decimal field (2S0) in all tables where ever SKU is stored like A1Szpo, A2Szpo, etc. However, when you use these same fields to define temporary variables using LIKE(StSZpo) - the temporary-variable is treated as packed-decimal (2P0) and not as zoned-decimal (2S0) field. For example, the following two lines in a data-structure do not have identical attributes as per RPG compiler! 0073.00 D I00_Szpo LIKE(A1Szpo) 0074.00 D I00_Szpo 2S 0 IMHO this is a compiler issue, but we never recieved a good explanation from IBM and since we defined all the work fields as 2S0, instead of using the LIKE defintion, we did not follow up on the PMR with IBM. Krish -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.