Hi All,
Please guide me for the following problem. I got stuck into it.
I want to operate same file from two different libraries in a RPGLE program.
Remember we are taking the file names at runtime.So we don?t know the structure of files. Like the record format name etc.
Again somehow I retrieve the record format name in the CL, but how will I pass it to the RPG program because RENAME keyword in RPGLE does not work with variable name.
Could you please tell me that if at runtime you want to handle same file from two different Libraries and don't know its Record Format name then how to handle this.
Software/Hardware used:
ASKED:
January 3, 2007 4:15 AM
UPDATED:
December 28, 2009 6:00 AM
You may also want to look into using the override data base file command – OVRDBF to rename one of your file names or even both of the files if you prefer. Your override will always use the same name so you will list those names in your RPG program.
Copy the files into two files whose record format names are known. This way you do not have to retrieve the format name.
You can use the rtvobjd to get the library that file is in and based on that know which program to call