I have a Physical File name 'File1', which is present in
two libraries named 'LIB1' & 'LIB2'. These 2 libraries are
listed in the library list. Would like to access data from
this file from these two libraries using RPG program. How
to do this, any idea?

Answer Posted / manan

actually the first answer will only work in sequential
execution in CL or SQLRPG. But if we wanna to use
simultaneously in the RPG then the CL will be OVRDBF FILE 1
to LIB1 and for the file 2 Use some other file FILEXXX and
OVRDBF it to LIB2/FILE1 and in RPG use the FILEXXX so when
u refer to any operation in FILEXXX that will reflect to
FILE1 in LIB2.

Other options for RPG4 are also correct ie usinf the
EXTFILE.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the use of sflnxtchg?

795


When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

494


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

2187


how can you display specific subfile page on the screen in unequal subfile?

669


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

478






How to write record if no field or the field are different in physical file in rpgle ?

478


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

824


What is file identifier where we can use?

637


is this a rpg channel?

669


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

546


how do I declare a table or array in rpg iv?

728


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

1957


can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.

2270


When it is desirable to describe files Internally?

1182


what is the difference between do while and do until?

695