That's what I thought, I just wanted to verify that files declared in a sub were local only to that procedure.

Thanks Barbara and everyone else!

On Oct 3, 2012, at 5:54 PM, Barbara Morris wrote:

On 2012/10/3 5:54 PM, Rpglist wrote:
If I have the same file declared as a global are they both using
different file paths? What I mean is can I position the global file
at say record 10 which has an I'd of say 100 and use the procedure
to Loop through the same file without changing the record position at
the global level?

What Gary said is correct.

From RPG's point of view, the files are completely independent. The
only way they would be using the same file path is if you had a
share(*yes) override.

Coding a file local to a procedure behaves exactly the same as coding it
in another module or another program, at least regarding the file paths.

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page