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 / syam
In RPG use this
F FILE1 IF A E K DISK RENAME(file1:Afile1)
F FILE1 IF A E K DISK RENAME(file1:Bfile1)
In read, open and close use Afile1 and Bfile1
Is This Answer Correct ? | 2 Yes | 18 No |
Post New Answer View All Answers
how do I declare a table or array in rpg iv?
What is the purpose of record level identifier?
How many program bind in one module....
What is ment by record level identifier?
How to select highest score of each subject or how to select highest income of every month?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
what was the robotech rpg?
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?
how do I declare a minor?
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
how can I tell when to replace the array?
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?
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.
do you use message subfiles? What are the necessary keywords required coding a message subfile?