× 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.



You're, of course, absolutely right as regards the copy books. In my haste
I overlooked them.

As for the 'simple but complete' part, I did not want to inadvertently
remove code that, while it seemed innocuous to me, might have contributed to
the problem.

But I must have been having a "bad hair day" Tuesday as the program is
working as intended today - with nothing but a re-compile. Was I debugging
the correct code on Tuesday? I was awfully sure that I was ending and
re-starting STRDBG between around the re-compiles the other day, but perhaps
I wasn't as careful in this or some other regard as I intended. Whatever
the reason, I erred on Tuesday.

I do appreciate your offer to troubleshoot my problem when I'm sure you have
plenty of your own work to do. Tell Alex 'Hi,' and I promise to buy more
sausage as a small way to make amends.

Jerry C. Adams
IBM i Programmer/Analyst
No passion so effectually robs the mind of all its powers of acting and
reason as fear. -Edmund Burke
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Scott Klement
Sent: Thursday, March 01, 2012 1:36 PM
To: RPG programming on the IBM i / System i
Subject: Re: Can't See the Difference

hi Jerry,

I guess when I said "Simple but complete program", I was expecting you to
strip the program down to just the parts absolutely needed to make a
runnable program that demonstrates the problem. I wasn't especting you to
post the /entire/ program...

Plus, and I thought I made this clear, it needs to be something I can load
and run on my system. Without that, I really can't troubleshoot it. The
code you posted requires multiple copy books that I don't have on my system,
so it can't be compiled.




On 3/1/2012 7:29 AM, Jerry C. Adams wrote:
Okay, I've uploaded the code for the program, display file and its
only physical file at http://code.midrange.com/0abb285380.html .

Sorry for the delay, but Wednesday is my day off.

Jerry C. Adams
IBM i Programmer/Analyst
The secret of managing is to keep the guys who hate you away from the
guys who are undecided. -Casey Stengel
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Scott Klement
Sent: Tuesday, February 28, 2012 2:27 PM
To: RPG programming on the IBM i / System i
Subject: Re: Can't See the Difference

Hi Jerry,

I suspect that the problem isn't in the code you posted, but rather is
somewhere else in the program (that you haven't thought of.)

Could you post a simple (but complete) program that we could load and
run that demonstrates the problem? I realize that this is a bit more
work than just copy/pasting snippets from your code -- but if you can
make a simple program that only has the needed code, and doesn't rely
on any external files (since we won't have those) that reproduces the
same problem, then we'll be sure to have everything we need.

If I'm able to load/run the program on my computer, I'll be able to
really troubleshoot it. (Rather than just giving it a quick glance.)

That's about all I can offer.



On 2/28/2012 1:13 PM, Jerry C. Adams wrote:

I have code in two places in my program that loop through a subfile.
The code is essentially the same. The first set is in a subroutine
and the second set is in a subprocedure. The subprocedure set works;
the subroutine set doesn't. It's the latter that's got me puzzled
(obviously).

I have stared at this all morning and can't see any difference
between the two sets of code, but I've only got one eye and it's aged
and often blurry after staring at a terminal most of the day. Maybe
someone else can point out what is probably an obvious flaw that I
can't
see.

Subroutine code (not working):

IF #limit> *Zeros;
FOR x = 1 to #limit;
CHAIN x DTU020A;
IF %found();
(some code)


Subprocedure code (working):



IF #Limit> *Zeros;
FOR x = 1 to #Limit;
CHAIN x DTU020A;
IF %found();
(different code)

In the interest of full disclosure: the definitions of the variables are:

D #Limit S Like(rrna)
D X S Like(rrna)

And rrna is the relative record number of the subfile record
(DTU020A). The debug of the subroutine code on the CHAIN 'x' has a
value of '1'. After the IF %found(), the subroutine bypasses all of
the "some code" stuff. The FOR loop runs for as many records as
there are in the subfile; it's the CHAIN in the subroutine that
doesn't find the
subfile record.

--
This is the RPG programming on the IBM i / System i (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 / System i (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 thread ...

Follow-Ups:
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.