|
Scott, Is there a specific reason that you map your overlays to RPG's indicator storage? I usually use INDARA in the display file, then use IndDS(DataStructureName) on the F-spec to map the display indicators directly to the datastructure. That way, program indicators and display indicators are completely segregated. Here's how I'd code it: Finsdispp CF E Workstn F IndDs($DspInd) D $DspInd ds D $f03 3 3n D $f04 4 4n D $f09 9 9n D $in40 40 40n D $in50 50 50n Just wondering. Eric DeLong Sally Beauty Company MIS-Project Manager (BSG) 940-898-7863 or ext. 1863 -----Original Message----- From: Scott Klement [mailto:klemscot@xxxxxxxxxxxx] Sent: Thursday, February 12, 2004 6:54 PM To: RPG programming on the AS400 / iSeries Subject: Re: Indicator 'overlay' array or data structure Hello, > I have seen an example of this done by using an indicator array or indicator > data structure that 'overlaid' a set of indicators, so that I could do > something like > C Eval MyInds = '000000000000' > What D-spec would I need to create such a structure? Here's some sample code from one of my own programs: D p_IndAra s * inz(%addr(*in)) D IndAra ds based(p_IndAra) D KEY_ALL 26A overlay(IndAra:01) D KEY_HELP 1N overlay(IndAra:01) D KEY_EDIT 1N overlay(IndAra:02) D KEY_EXIT 1N overlay(IndAra:03) D KEY_PROMPT 1N overlay(IndAra:04) D KEY_REFRESH 1N overlay(IndAra:05) D KEY_PRINT 1N overlay(IndAra:06) D KEY_F7 1N overlay(IndAra:07) D KEY_F8 1N overlay(IndAra:08) D KEY_F9 1N overlay(IndAra:09) D KEY_F10 1N overlay(IndAra:10) D KEY_F11 1N overlay(IndAra:11) D KEY_CANCEL 1N overlay(IndAra:12) D KEY_F13 1N overlay(IndAra:13) D KEY_F14 1N overlay(IndAra:14) D KEY_F15 1N overlay(IndAra:15) D KEY_F16 1N overlay(IndAra:16) D KEY_F17 1N overlay(IndAra:17) D KEY_F18 1N overlay(IndAra:18) D KEY_F19 1N overlay(IndAra:19) D KEY_F20 1N overlay(IndAra:20) D KEY_F21 1N overlay(IndAra:21) D KEY_F22 1N overlay(IndAra:22) D KEY_F23 1N overlay(IndAra:23) D KEY_F24 1N overlay(IndAra:24) D KEY_PAGEUP 1N overlay(IndAra:25) D KEY_PAGEDOWN 1N overlay(IndAra:26) D SFL_ALL 6A overlay(IndAra:50) D SFL_CLEAR 1N overlay(IndAra:50) D SFL_IS_EMPTY 1N overlay(IndAra:51) D SFL_DROP 1N overlay(IndAra:52) D SFL_FOLD 1N overlay(IndAra:53) D SFL_FULL 1N overlay(IndAra:54) D SFL_NXTCHG 1N overlay(IndAra:55) Then, for example, to reset all function keys: c eval key_all = *OFF Or to reset all subfile indicators: c eval sfl_all = *OFF To check if the user has pressed F3 to exit: c if KEY_EXIT c eval *INLR = *ON c return c endif The way the code works is by overlaying the entire *IN array... so, you do have to make sure that the DDS is set up appropriately. In this case, indicator 03 must be set for F3 (with the CA03 or CF03 DDS keywords) and the same for the other functions, for example I have the SFLCLR keyword conditioned on indicator 50, and the SFLDSP keyword conditioned on indicator 51... Hope that helps _______________________________________________ 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.