× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The manual says:
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 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.

Charles


On Wed, Aug 10, 2016 at 4:58 PM, <MichaelQuigley@xxxxxxxxxx> wrote:

"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 08/10/2016 04:26:15
PM:
----- Message from Barbara Morris <bmorris@xxxxxxxxxx> on Wed, 10
Aug 2016 15:28:18 -0400 -----

To:

rpg400-l@xxxxxxxxxxxx

Subject:

Re: Successful read not showing any data in debug

On 8/8/2016 12:14 PM, Richard Reeve wrote:

The issue is that while I'm not getting an eof condition on the
header, when I look at any of the header fields on the first read they
are
blank.


I see that you solved your problem, but I just thought I'd mention
another possible cause of this.

If you don't use those header fields in your code, then by default, the
RPG compiler won't load the fields from the input buffer.

Add the DEBUG(*INPUT) keyword to your H spec to cause all input fields
to be loaded even if they aren't used. (You could also code DEBUG(*YES),

and I think even just DEBUG by itself with no parameters.)


http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasc/dbgunexp.htm

--
Barbara


Barbara,

I hope you don't mind if I clear up a little of my ignorance. I thought
the processing you're pointing out was due to the OPTION(*UNREF) or
OPTION(*NOUNREF) when compiling. (That's even part of the subject of your
link to the knowledge center.)

Let's see if I understand what you've pointed out here correctly:
-The debugger will claim the fields don't even exist if you specify
OPTION(*NOUNREF).
-If you specify OPTION(*UNREF) (the default for RPG, but not for COBOL),
the debugger will acknowledge the fields exist. However, the fields won't
have any values loaded unless you also specify one of the DEBUG options
you point out.

Am I anywhere in the ballpark or am I over the left-field fence?

Thanks,
Michael Quigley
Computer Services
The Way International
www.TheWay.org
--
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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.