Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

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

976


are there any useful c runtime apis that I can call from rpg iv?

1174


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.

1237


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...

1898


what are the key words you must use when using a subfile?

1190


do you use message subfiles? What are the necessary keywords required coding a message subfile?

1143


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.

2811


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

3007


How can we override a file during runtime in rpg?

1211


what is file information data structure?

2214


can you debug ile rpg program using isdb?

1278


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

1159


When it is desirable to describe files Internally?

1723


How would display prime numbers using CL program?

6332


How to call one program from another program in RPG? please help me with the code

1742