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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to reverse a string using RPG?

696


how you will know whether you are in sfldrop or sflfold mode?

631


what is the maximum number of subfiles that can specified in a display file ?

1052


Difference Between Ca & Cf?

704


in which specification the report layout can be defined?

982






which are control break logic indicators?

639


what is the syntax for plist?

651


what is the maximum number of files allowed in rpg?

942


what the purpose of ovrdta, ovrata keywords?

1182


describe the difference between the dowxx and douxx operations?

1180


when do you explicitly open files and close files in an rpg program?

1189


What is the use of jdftval in as400?

914


what are the limitations of cl (compare to rpg) ?

1552


what is the difference between sflclr and sflinz?

1038


How to Define a Procedure in RPG?

1224