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



Without seeing the code, is it coded in a single program like this? This
is a rough estimate of what was described.

D SFIELD1 S 10a
D SFIELD2 S 10a

D PROC1 PR
D FIELD1 10a CONST
D FIELD2 10a CONST

D PROC2 PR

/Free

PROC1(SFIELD1 :SFIELD2);
*INLR = *On;
/End-Free

P PROC1 B
D PI
D SFIELD1 10a CONST
D SFIELD2 10a CONST

/Free

PROC2();
RETURN;
/End-Free
P PROC1 E

P PROC2 B
D PI
/Free
SFIELD1 = *Blanks;
SFIELD2 = *Blanks;
/End-Free
P PROC2 E

If the code looks like this it could be due to a global variable issue vs
local. But since the code isn't posted it is hard to see what is going
on. This is just a guess at how the code was constructed.



Jeff Davis
Programmer
Dental Network of America
2 Transam Plaza Drive, Suite 500
Oakbrook Terrace, IL. 60181
630.691.0336




"Robert J. Mullis" <robertmullis99@xxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
09/10/2009 03:51 PM
Please respond to
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Problem Clearing Procedure Parameters






That was it Darren.

I have the screen fields defined on a couple of screens. The main
procedure
that was calling Procedure #1 was passing in the SFIELDA and SFIELDB from
screen 1 for processing. Procedure #1 was receiving those fields as CONST

into separate "independent" fields. Then Procedure #1 was calling
Procedure
#2 which was clearing the screen fields, thus clearing my "independent"
fields from Procedure #1.

I remember this problem, because I encountered it once before many moons
ago.

--------------------------------------------------
From: <darren@xxxxxxxxx>
Sent: Thursday, September 10, 2009 4:21 PM
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Subject: Re: Problem Clearing Procedure Parameters

Okay, one more possibility. What are you passing as parms to procedure
#1?
The field that you place in the call, is it some stand-alone field that
you've defined in the program, or could it be another display file
field?
As someone else stated, CONST passes by reference sometimes, if it can,
so
your procedure #2 could be playing with the value, without Procedure
#1's,
or the main procedure's knowledge.






darren@xxxxxxxxx
Sent by:
rpg400-l-bounces@ To
midrange.com RPG programming on the IBM i /
System i <rpg400-l@xxxxxxxxxxxx>
cc
09/10/2009 04:14
PM Fax
to

Subject
Please respond to Re: Problem Clearing Procedure
RPG programming Parameters
on the IBM i /
System i
<rpg400-l@midrang
e.com>






There are no parameters for Procedure #2. Procedure #2 gets called
when
certain conditions are met. It only initializes some screen fields and
indicators.

It sounds like memory corruption to me. You're not using a level check
*no
on the display file right? You're not placing the names of the actual
screen fields in a datastructure in your program? I'm not talking about
overlaying, just listing the field names in a datastructure.




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

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.