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 / divakar reddy
F FILE1 IF A E K DISK ExtFile('LIB1/FILE1')
RENAME(file1:Afile1)
F FILE1 IF A E K DISK ExtFile('LIB2/FILE1')
RENAME(file1:Bfile1)
This should work...
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
what do you mean by an input subfile, what are the keywords required?
How Chain operation copies the record's data to the input buffer for the program?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
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?
When it is desirable to describe files Internally?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
How many program bind in one module....
what is the rpg system?
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?
is this a rpg channel?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?
how do I preserve and clean the array?
What is the purpose of record level identifier?