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

What are the types of identifiers?

1087


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?

1164


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

3047


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.

2678


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

1942


explain sflclr, sflend, sfldlt, and sflcsrrrn?

1398


How would display prime numbers using CL program?

6413


Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

2140


how do I declare a minor?

1207


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?

1002


what do you mean by an input subfile, what are the keywords required?

1305


what is the difference between do while and do until?

1308


what is the necessary keyword needed to scroll subfile records?

1220


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

1059


How many program bind in one module....

2740