190 pts.
 OVRDBF & OPNQRY – AS/400 question
AS/400 question: There is a scenario where: OVRDBF share (*yes) OPNQRY – To select only Active records CALL RPG1 But in my RPG all records are being processed. Just not active. What could be the reason behind it? And also, OVRDBF share (*no) OPNQRY – To select only Active records CALL RPG1 But in my RPG only active records are being processed but not all. What could be the reason behind it? Thanks.

Software/Hardware used:
ASKED: February 6, 2013  7:51 AM
UPDATED: February 7, 2013  3:00 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. juslikdat1   190 pts. , Michael Tidmarsh   11,410 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

The answers would seem the same in both cases (assuming that all three refer to the same file name). In both cases, the RPG program is reading through a different ODP than the OPNQRYF creates.
 
The point of the question, though, would be why or how can that happen? In the second case, the ODP isn’t shared; so it’s obvious. But the first case… the answer would be found in where the share is found.
 
Please note that we can’t actually give answers to interview questions. If you post a question and your answer, the answer is already exposed.
 
Tom

 108,280 pts.