Re: Hide unreferenced variables?
Marco Facchinetti <marco.facchinetti-kthxv0ud/[email protected]> Sat, 28 Feb 2026 13:07:47 +0100
| Newsgroups | gmane.editors.websphere.iseries |
|---|---|
| Message-ID | <CAMsgu4ruLFW_aiWrOzfZJ7NZg6tQnWZOiKBZVNExHwnW2H0Hhw@mail.gmail.com> |
Hi David, I guess in the Variables View and not in the Outline, correct? not in RDi, but you can control it using the keyword Option: If *UNREF is specified, all variables are generated into the module. If *NOUNREF is specified, unreferenced variables are not generated unless they are needed by some other module. The following rules apply to OPTION(*NOUNREF): Variables defined with EXPORT are always generated into the module whether or not they are referenced. Unreferenced variables defined with IMPORT are generated into the module if they appear on Input specifications. The *IN indicator array and the *INxx indicators are not generated into the module if no *IN indicator is used in the program, either explicitly by a *INxx reference, or implicitly by conditioning or result indicator entries. For variables not defined with EXPORT or IMPORT: Variables associated with Files, or used in Calculations or on Output specifications are always generated. Variables that appear only on Definition specifications are not generated into the module if they are not referenced. Variables that are referenced only by Input specifications are generated into the module only if DEBUG, DEBUG(*YES) or DEBUG(*INPUT) is specified on the Control specification. HTH -- Marco Facchinetti Mr S.r.l. Tel. 035 962885 Cel. 393 9620498 Skype: facchinettimarco Il giorno ven 27 feb 2026 alle ore 16:54 David Gibbs via WDSCI-L < [email protected]> ha scritto: > OK, I know this is a (big) stretch. > > Does anyone think it would be feasible for RDi to hide variables that are > unreferenced in the program? > > I've only skimmed the debug api docs and haven't found any way to identify > if a variable is referenced or not in a debugged program. > > Sure wouid be handy to have an option to to only show referenced variables. > > david > -- > This is the Rational Developer for IBM i (WDSCI-L) mailing list > To post a message email: [email protected] > To subscribe, unsubscribe, or change list options, > visit: https://lists.midrange.com/mailman/listinfo/wdsci-l > or email: WDSCI-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org > Before posting, please take a moment to review the archives > at https://archive.midrange.com/wdsci-l. > > > -- This is the Rational Developer for IBM i (WDSCI-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/wdsci-l or email: WDSCI-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org Before posting, please take a moment to review the archives at https://archive.midrange.com/wdsci-l.