|
Good find, Charles!
Still completely baffled as to the value of OPTION(*UNREF), and I guess
Barbara suggests that no one (still there) knows why the ILE compiler
generates these in the first place, but at least I have my answer.
Thanks!
- Dan
On Wed, Jun 17, 2015 at 1:01 PM, Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:
WAD...to
"With the default OPTION(*UNREF), after a READ to a file, you might want
look at a few fields to see what record you got. If you didn't use afield
in the module, the compiler wouldn't load it, so it would have blanks orhttps://www.ibm.com/developerworks/community/blogs/b542d3ac-0785-4b6f-8e53-f72051460822/entry/are_you_using_option_nounref_if_so_good_if_not_read_on?lang=en
zeros. This can be extremely confusing."
name
Charles
On Wed, Jun 17, 2015 at 11:33 AM, Dan <dan27649@xxxxxxxxx> wrote:
With an RPGLE program compiled with OPTION(*UNREF), I would expect that
input fields defined but not used in the program (i.e. *RNF7031: The
andor indicator is not referenced) would still be available to view thevalues
in debug. FWIW, this is a very simple, 20 line program, no subprocs,
correctly.we are on v7r1.IF
When I use the EVAL command on the unreferenced fields in debug, it
displays a blank result. For example:
FIELDA = ' '
... even though I know the value in the file is 'ABC123'.
My workaround was to CLEAR each of the unreferenced fields inside of an
group that would never test true. Now, debug shows the values
unreferenced
I thought I remembered there was an option to include these
itfields so their values could be viewed in debug and/or a dump. (Maybe
butwas just the latter?) And the *UNREF option seemed to fit the bill,
(RPG400-L)apparently not.subject
From the RPG reference: "If *UNREF is specified, all variables are
generated into the module." I guess "generated into the module" is
to interpretation.
What am I missing?
- Dan
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
--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.
This is the RPG programming on the IBM i (AS/400 and 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.
This is the RPG programming on the IBM i (AS/400 and 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-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.