|
You need to export or pass the returned record back to your calling program in some manor. You shouldn't have the file listed in the calling program, just the service program. The file open is scoped to the compilation unit which is your module that opens and reads the file. Mark Walter Senior Programmer/Analyst Hainey Business Systems (717) 718-9601 x7148 mwalter@xxxxxxxxxxx http://www.hbs-inc.com -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Wall, Isa (ED) Sent: Wednesday, August 31, 2005 8:23 AM To: rpg400-l@xxxxxxxxxxxx Subject: Using Subprocedures to Open and Read a file. I am trying to understand how to use subprocedures to open and read a file. I have created my module with two subprocedures one to open the file and the other to read the file. In my module I specified the file name as USROPN. Now I want to create a program that calls those subprocedures and I am having problems with share file. First I tried setting my file in my program as USROPN but I am getting the following error 'There is no OPEN for a file... '. Then I remove the USROPN from my program but when I put the program thru debug it ignores the open and read statements in the subprocedures. What am I doing wrong? I guess I don't understand how my main program can share the file in the subprocedures. By the way I created a binding directory for my module an included that directory in my program. Thanks. Isa Wall Programming Manager Everglades <http://www.gneil.com/> Direct, Inc. 720 International Parkway Sunrise, FL 33325 * 954-514-2259 * 954-851-1201 Fax * iwall@xxxxxxxxxxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.
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.