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



< How is the code inside the procedure supposed to know how long the field
< is that you are passing?

This is my problem. I don't know how to change the length of the variable for each different call of the procedure. If I have to pass it from the calling procedure I can do that but then how do I associate the length of the field with the variable that is going to hold the data when the record is read. Again I'm not passing actual data since I haven't read the file yet. If I have to read the file first to get the data to pass to the procedure then I will have to go back to using 25 different procedures doing the same 10 lines of code with the exception of the field names changing. It just seems a lot of code to write when all I want to change is the field that I'm getting the data from. Using a pointer gives me this ability
But I can't seem to get the data into a varible that resizes for the length of the field being used on each different call.

******************************************
Don Wereschuk
ISD - Programmer/Analyst
Simcoe Parts Service Inc.
Phone: 705-435-7814 Ex: 302
Fax: 705-435-6746
mailto:dwereschuk@xxxxxxxxxxxxxxx
******************************************
"Save the Cheerleader - Save the world" - Hiro Nakamura

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Adam Glauser
Sent: Monday, January 21, 2008 3:36 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Passing Parameters

Don Wereschuk wrote:
I am not trying to pass actual data which would work using the VARYING, I'm trying to pass the address of the field to be referenced within the called procedure.

How is the code inside the procedure supposed to know how long the field
is that you are passing? You need to either use VARYING _and_ const, or
if you feel that a pointer is necessary you need to pass the length of
the field from the calling procedure.
--
This is the RPG programming on the AS400 / 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 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.