What started this was passing a parm between 2 programs. Both using the same file and field as the base of the LIKE. Both programs used I619 Like(OHINV) - one program would pass I619 as zoned and the other would read it in as packed, so the call would crash because of it.

I thought about the conversion to packed on compile, but if that were the case, it wouldn't matter if I specified zoned or packed, it would not be a mismatch due to the default compiler conversion.

As I do more testing. I tried several old and new programs that use the same master file, and get a mix of results. One time the hover note says zoned and other times it says Packed. Same stmt, both fixed and free-form.

I can't find why RDI will show zoned one time and packed on another. I guess I will have to stop using LIKE of passed parms if it is going to be unpredictable. Although it is consistent within each program.

Plus the one occasion where the entire Outline listed all zoned as packed. It has never done that and may never again.

Very weird.
Thanks for the reply

Jon Paris <jon.paris@xxxxxxxxxxxxxx> 2/14/2018 2:47 PM >>>
Even if it is zoned on the file, unless you took steps to force it to be zoned in the program (and that basically means placing it in a DS) numeric fields are always redefined by RPG as packed.

Since you have only shown a small piece of code I can't tell.

But I would suspect that rather than RDi making a mistake.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Feb 14, 2018, at 1:29 PM, Buddy McClean <Buddy.McClean@xxxxxxxxxxxx> wrote:

I have this code in RDI 9.5 in an RPGLE program.


DCL-PR INV619;
I619 Like(OHInv);
Code1619 Char(5);
Code2619 Char(5);
ACD619 Char(1);
RCD619 Char(1);
End-PR;
OHInv in the 2nd line is ( and has been forever ) Zoned Dec. , and it says zoned decimal in the outline display ( most of the time, see below ), and the disk file, and all other programs that use it. The program that calls this program uses the same definition, and it says zoned decimal for the same field.

But the hover note and the compile say OHInv ( and I619 ) is Packed Dec. . Is there something I'm missing?

The prog is short, only has one file, nothing copied from other members.

In various attempts to fix this, ( changing workspace, restarting, etc ) at one time the Outline also said packed decimal for OHInv and EVERY field in that file whether it was zoned or packed.

Only this one program. Weird. Would it be a general RDI patch time?


Has it been this way a while and I didn't notice?
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/wdsci-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.