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 | 19 No |
Post New Answer View All Answers
what is file information data structure?
are there any useful c runtime apis that I can call from rpg iv?
what is data area and how it is used in rpg program ?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
what is the procedure and explain about real time scenario.
what is program status data structure?
what is a rpg?
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?
How can we override a file during runtime in rpg?
What is difference between bind by copy and bind by reference?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
How to declare the pull button in AS/400..
How can we know running job is batch or interactive?
explain sflclr, sflend, sfldlt, and sflcsrrrn?
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?