I think that since V5R1, you can use RPG Softcoded Filenames with the
EXTFILE and EXTMBR Keywords in the "F" specifications so you can control
which external file gets opened. You can also code constants, which would
be a good choice if you want to be sure to use a file in QTEMP rather than
one that might be in the library list:
Ftempfile o e disk extfile('QTEMP/X4ATEMP')
Note: Notice that the EXTFILE value is in the form LIBRARY / FILE.
I pulled and example from R.Cozzi's website: here's an example where the
file name is constant, but the member name is variable. (This varies
depending on the user profile, obtained from the program status data
structure, PSDS, which is set up at the beginning of initialization.)
Foptions if f32766 disk extfile('OPTLIB/OPTFILE')
F extmbr(userName)
D psds sds
D userName 254 263
These keywords are only used at runtime. If you code a constant as the
parameter to EXTFILE for an externally described file, the compiler will
not use this keyword to find the external descriptions.
Peter Vidal
MAPICS IT Technical Support Team / SR System Analyst
10540 Ridge Rd., Ste 203, New Port Richey, FL 34654-5111
Tel:727-849-9999, x2414 Fax:727-815-3120
http://www.pall.com
"Nothing is a waste of time if you use the experience wisely."
Rodin (1840 - 1917)
--------------------------------------------------------------------------------
Attention:
This communication may contain information that is confidential,
privileged and/or exempt from disclosure under applicable law.
If you are not the intended recipient, please notify the sender
immediately and delete the original, all attachments, and all
copies of this communication.
--------------------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.