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

Explain The Keywords Edtcde & Edtwrd?

842


What is diff between EVAL & MOVE?

973


Apart from opening of a file do we have any other use of USROPN?

960


some special characters I key in my html source members show different on my web pages. Why? How can I solve this?

613


what is the purpose of dynslt keyword?

1039






what is the difference between sflclr and sflinz?

1038


In AS/400 projects in Companies whats the meaning of production support team.what production support involves.also what work does development,maintenance involve what are the other teams or processes that are available for as400 project.

8533


in conjunction with what other keyword must ovrdta and ovrata be used?

923


Difference Between Source Physical File & Physical File?

642


Why we have multiple data types in As400 and why we use numeric, packed, decimal, zoned the basic difference between this?

613


what is *iso date format?

625


what is message subfile?

1053


What are the types of data structure in as400?

543


what is the use of jdftval in join logical file?

1119


i am using non join multiple format my 3 database file is like that pf97 R REC ENAME ETENNO ESTATUS K ENAME pf98 R REC1 ENAME ESAL K ENAME PF99 R REC3 ENAME CRDCARD EID K EID & MY NON JOIN LOGICAL FILE IS ALSO SAME EXCEPT RECORD NAMES BEFORE I TRIED WITH 2 FILES SO ITS SAYS ERROR I.E.(Key field attributes must be same as for previous formats. ) SO I CHANGED KEYFIELD ACCORDING TO PF SO ITS WORKING BUT AFTER ADDING 3 FILES ITS SAYING SAME ERROR . I DONT KNOW I NEW IN AS400 PLLZ HELP ME I HAVE ONE MORE QUE. CANT BE USE DIFFERENT KEYFIELD (NOT ACCORDING TO PF) IN NON JOIN LOGICAL FILE.

1041