|
Jonathan, Correct, with RPG III there were 99 indicators shared by the RPG code, and the display and printer files. Older versions of RPG IV were the same. However, as of v4r2 you can specify the INDDS(myDSName) on the f-spec for the display and printer files. This provides a separate set of indicators used for specific display or printer file. These named indicators that will be accessed through the data structure named with the keyword. Note that this INDARA keyword in the DDS source. Example: A* DDS Source A DSPSIZ(24 80 *DS3) A INDARA A CA03(03 'Exit') A CA12(12 'Cancel') A CA05(05 'Print') // RPG Source fmyDispf cf e workstn prefix(DSPF) f sfile(DtlSubfile:gDtlSubfRrn) f sfile(MsgSubf:gMsgSubfRrn) f indds(gDisplayFileControl) fmyPrtf o e printer oflind(gPrinterOverflowed) f usropn prefix(PRTF) f indds(gPrinterFileControl) d gDisplayFileControl... d ds qualified d exit 3 3n d printList 5 5n d cancel 12 12n d gPrinterFileControl... d ds qualified d bold 3 3n d underline 12 12n /free dou gDisplayFileControl.exit or gDisplayFileControl.cancel; //do something gPrinterFileControl.bold = *on; //do something else gPrinterFileControl.underline = *on; // this loop will not exit until F03 or F12 is pressed enddo; /end-free In the above example, RPG's *IN03, *IN05, and *IN12 are _NOT_ used. Instead, the display file's 03,05, and 12 indicators are accessed through the corresponding names in the gDisplayFileControl data structure. Additionally, the printer files own 03 and 12 indicators are accessed through the gPrinterFileControl data structure. HTH, Charles Wilt iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121 > -----Original Message----- > From: Jonathan Mason [mailto:jonathan.mason@xxxxxxxxxxxxxxxx] > Sent: Wednesday, December 01, 2004 8:07 AM > To: RPG programming on the AS400 / iSeries > Subject: RE: Indicators -- not needed anymore??? > > > Hi Charles > > >> Actually, > >> You've got 99 for RPG itself, and 99 for each display or > printer file.... > >> So if you had 1 display and two printer files, you could > be using up to > 396 > >> indicators!!! > > Are you sure? I've been programming in RPG for 20 years now, > and that's the > first time I've heard that the indicators used in display and > printer files > are different to those used in "RPG". I've always been under > the impression > that the 99 response indicators were shared and unique only > to the program > (OPM) or module (ILE) itself. After all, when setting > indicator values > there's no way to differentiate between the indicator being > for a display > file or a printer file. > > All the best > > Jonathan > > > > > -- > 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.