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


we have 2 PF files with same name, how to copy data's from
one file to another through RPG program logic?

Answers were Sorted based on User's Feedback



we have 2 PF files with same name, how to copy data's from one file to another through RPG pr..

Answer / venkat b

You can give 2 different names to the different Physical
Files like the following code and then use the
keyword "EXTFILE" to give a fully qualified PF -

Fname1 if f 10 disk extfile(LIBRARY1/filename)
Fname2 if f 10 disk extfile(LIBRARY2/filename)
RENAME(rcdname1:rcdname2)

Then, use DOW, Read and write.

Is This Answer Correct ?    19 Yes 1 No

we have 2 PF files with same name, how to copy data's from one file to another through RPG pr..

Answer / syam

You can't declare 2 pf in the RPG program with same name.
If you declare, system will give error on compilation
(*RNF2026 30).
You can rename same record name in RPG program.
You can rename fiel name in RPG program.
You can't keep 2 pf in one library with same.
2 pf with same name in 2 differned library, you can copy
to 1 pf thru CPYF cl command.

Is This Answer Correct ?    17 Yes 5 No

we have 2 PF files with same name, how to copy data's from one file to another through RPG pr..

Answer / perumal

Declare the 2 PF files in the RPG program. Rename either
one of the file record format in F Spec
If the fields also same use PREFIX Keyword uisng D spec if
you are using ILE

Or RPG/400 use I spec and rename the fields

Then read from the file and write into the another file

Is This Answer Correct ?    9 Yes 9 No

Post New Answer

More IBM AS400 AllOther Interview Questions

What is the purpose of Level Check parameter in a Physical file?

1 Answers  


how many specifications are there in rpg/400? What are they?

1 Answers   IBM,


WHAT IS THE DISPLAY CMD FOR DATAQ, HOW IT CAN BE USED?

2 Answers  


Can anybody know difference between SNDUSRMSG AND SNDPGMMSG IN CL PROGRAMMING? IF DON'T KNOW MAIL ME @ gkarthik.as400@gmail.com

3 Answers  


What is the use of Data Queues?

1 Answers  


what is join logical file?

1 Answers   IBM,


An rpg program is processing an openquery file.The file is declared in update mode in F spec.Can we update this file? Please explain?

3 Answers  


Define what the operation will do, the purpose of the result field and the purpose of *IN66? HI LO EQ C CALL 'CVTDAT' DTPRM 66

1 Answers  


in which specification the report layout can be defined?

1 Answers   IBM,


what is a program described file in rpg?

1 Answers   IBM,


how will you add a field to physical file already containing data?

1 Answers   IBM,


i want to display the 10000 record in a subfile by using loadall , can we do it?

10 Answers   CybAge,


Categories