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
How to write record if no field or the field are different in physical file in rpgle ?
are there any useful c runtime apis that I can call from rpg iv?
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 create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
what are the key words you must use when using a subfile?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
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.
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
How can we override a file during runtime in rpg?
what is file information data structure?
can you debug ile rpg program using isdb?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
When it is desirable to describe files Internally?
How would display prime numbers using CL program?
How to call one program from another program in RPG? please help me with the code