|
Hi Tony, [SNIP] > D IndicatorPtr S * Inz(%Addr(*In)) > D DS Based(IndicatorPtr) > D PrtOverflow 99 99 [SNIP] > If PrtOverflow; > Write Header; > PrtOverflow=*Off; > EndIf; [SNIP] > *RNF7423 30 000133 A relational expression or indicator is expected for > logical operations This error is due to the fact that you've got PrtOverflow defined as a 1A (1-character alphanumeric) instead of a 1N field (1-character indicator) The fix would be to change it to an N field, like this: D IndicatorPtr S * Inz(%Addr(*In)) D DS Based(IndicatorPtr) D PrtOverflow 99 99N Or, since you're only overlaying *IN99 in the first place, there's no need for a data structure at all: D In99Ptr S * Inz(%Addr(*In99)) D PrtOverflow 1N based(In99Ptr) Also, if the indicators are being read from a file (though I'm not sure that they are in this case) you can have the file map the data directly into your data structure rather than having to share memory with the *IN indicators using the INDDS keyword on your F-spec: FMyDSPF CF E WORKSTN INDDS(MyIndDS) D MyIndDS ds D F3 03 03N D F12 12 12N D PAGEUP 51 51N D PAGEDOWN 52 52N In this case, I have CA03(03) CA12(12) defined in my DDS so that F3 and F12 get mapped to indicators 03 and 12. Then, RPG loads the DDS indicators 03 and 12 into the F3 and F12 fields *INSTEAD OF* the *IN03 and *IN12 fields. That means you can still use *IN03 and *IN12 in your prgoram for other purposes, reading the display file will have no effect on them. Likewise, I have PAGEUP(51) and PAGEDOWN(52) defined in DDS, and RPG maps them into PAGEUP and PAGEDOWN instead of *IN51 and *IN52. The INDDS F-spec keyword does require INDARA to be defined in your display file. I know, I know... way more information than you asked for :)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.