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



Import and Export is supported only with GLOBAL variables.
That is fields or data structures that are NOT defined within a
subprocedure.
You declare a variable (field or data structure) that you would like to
share between separately compiled *MODULEs, and then add the EXPORT keyword
to it. Then in the *MOUDLE objects in which you would like to use that
EXPORTed variable, you declare an identical variable; in both name and
attributes; and add the IMPORT keyword to it.



Bob Cozzi
Cozzi Consulting
www.rpgiv.com


-----Original Message-----
From: rpg400-l-bounces+cozzi=rpgiv.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+cozzi=rpgiv.com@xxxxxxxxxxxx] On Behalf Of Fisher,
Don
Sent: Thursday, November 13, 2003 9:15 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Sharing variables between procedures

Okay, so it appears from the manual that I need to define the data
structures with different names in my four "main" procedures (File1DS,
File2DS, File3DS, and File4DS).  I then use IMPORT in the "child" procedures
.  That would make the File1DS values available only to the File1DS "main"
procedure and its "children".

Do I understand this correctly? 

Thanks again. 

Donald R. Fisher, III
Project Manager
Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@xxxxxxxxxxxxx

<clip> 
Only procedures the IMPORT the data structure will have access to it.
<clip>
_______________________________________________
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.