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



I am not passing the display file fields as parameters. FIELDA and FIELDB are "independent" fields that are set within the program. The two fields are then being loaded into the screen fields SFIELDA and SFIELDB.

--------------------------------------------------
From: "Kurt Anderson" <kurt.anderson@xxxxxxxxxxxxxx>
Sent: Thursday, September 10, 2009 3:35 PM
To: "'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
Subject: RE: Problem Clearing Procedure Parameters

If you're passing (display) file fields as parameters, and they are changing on the display, then every subsequent procedure that those fields were passed to will have their parameters "change." When you define a parm as Const, you are passing the address to the parameter on the procedure call.

Hopefully this is the case for you, because then the fix is relatively easy: either change the parm keyword to Value or move the file field into a variable and pass that instead.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Robert J. Mullis
Sent: Thursday, September 10, 2009 2:09 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Problem Clearing Procedure Parameters

I have a program that has two internally defined procedures.

Procedure #1 has two fields as input parameters, FIELDA and FIELDB, both defined as CONST. In Procedure #1, the two input fields are moved into two fields on a screen called SFIELDA and SFIELDB. If certain conditions are met, Procedure #1 calls Procedure #2. In Procedure #2, the two screen fields, SFIELDA and SFIELDB, are cleared. I noticed that the fields passed into Procedure #1, FIELDA and FIELDB are getting cleared at the same time. I put the program in debug and verified this.

How is this possible? First of all, I thought if a parameter to a procedure was defined as CONST, it couldn't be changed. I have searched through the program to make sure there were no datastructures, etc. that might be overlaying the fields and the DDS for the screen to make sure the procedure parameters are not defined on a screen.

Any advice and/or help would be greatly appreciated.

Thanks,

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