180 pts.
 Same file in different libraries and file is defined once in an RPGLE program
I have a coding project that requires the following.

Software/Hardware used:
Iseries V6R1M0 & RPGLE
ASKED: November 10, 2011  11:45 PM
UPDATED: March 17, 2012  6:56 AM

Answer Wiki:
Thank you for attempting to help with my coding project. I have resolved the coding problem by embedding SQL in my RPGLE program. Everything works great. Many thanks to all.
Last Wiki Answer Submitted:  November 14, 2011  4:23 pm  by  aderene   180 pts.
All Answer Wiki Contributors:  aderene   180 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

You can use OVRDBF for one or both files as long as the override is executed before the file is opened. Or you can use the EXTFILE(filename) keyword, perhaps with a variable that holds a value in the ‘libname/filename’ format.

The program file names will need to be different from each other.

You can use copies of the file descriptions and rename them to match the program file names in order to compile. (The copies only need the description; members aren’t needed nor is any data needed.) If you can’t create temporary file descriptions to compile over, you can issue OVRDBF commands in the job that does the compile.

Beyond those, use embedded SQL. You can use any file names and library names you need.

Tom

 108,085 pts.

 

file is defined once

I didn’t catch that part when I first read the question. After reading again, I’m not clear on the point of the question.

Why is there a requirement for a single program definition when it’s known that there are two files?

Tom

 108,085 pts.

 

As Tom said, we need more specs.
Do you need to process data from these files as if they were one file
Or
All data from lib1/file then all the data from lib2/file

Phil

 44,180 pts.