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

Answer Posted / 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 ?    18 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

is it there an easy way to determine if an html section is available to issue a wrtsection upon?

564


how can u check no of records in a file?

675


Can we debug the MSGW JOBS?

929


What is the difference between iter and do? We know both are used to execute set of statements repeatedly, but what is the main difference?

549


what is the sequence when using cursor?

605






What is a query can be displayed without saving it?

674


what is the use of dspatr(mdt) keyword?

1451


when is a tag statement used in rpg?

1361


What are the types of data structure in as400?

540


give three main purposes of file specification ?

992


How Many Specs Are There In Rpg & Which Are They?

682


What Is Ddm ?

1033


which indicator is used for read?

627


why do we use readc? What is sflnxtchg?

666


What Is Default Data Type (if You Define Decimals '0') In Physical File?

1144