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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how would you design the process for a nightly, high volume check producing process that needs to select only records that are flagged to be processed?

1298


How we will get issues on AS/400 technology ? I mean which issue/Defect Tracking tool is using in all companies when any issue comes? Can anybody explain about the work flow of AS/400 project ? plzzz

1413


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

1190


. How to know why the OPM job is in MSGWAIT state?..WHAT COULD BE THE REASON FOR it?

7548


what is the necessary keyword for non-join logical file?

1538


Hi,Can any body give the code for the below mentioned quetion.?Im trying to get coding in with easily inderstanding.Plese give me the coding for this? 1.How would you achieve this requirement with out using RPG/RPGLE pgm,but by using only CL?Read a database file and display file contents on the screen when enter key pressed the next record should be displayed on screen.When the last record is reached or when F3 key is pressed the program should exit if the file is empty,a message should be displayed indicate that there are no records to display. Database file Name=EMPDBF Fields in EMPDBF to be displayed on screen Employee Number- EMPNUM(5,0) Employee Name- EMPNAM(30,A) Employee Address-EMP ADDR(50 A)

1987


what does defn do?

846


what is message file?

848


what are members?

855


how can u check no of records in a file?

917


what does dfu program you to do on a record?

1002


any one have give AS400 study material? pls pass it to gopalsai789@gmail.com

1484


Difference Between Skip Before & Space Before?

956


The content of Physical file is as below: hfcftp wruquief SENDPASV 0 CDUP ASCII GET 01100901.CSV ramndk/ECP505.EC0110090 (REPLACE QUIT Thw above commands will get executed when we call STRTCPFTP from CL program.... Now if I want to use SFTP what can be the solution? plz reply in detail....Thank you for ny help... I m using RPG/ILERPG to download...

2143


Hello, I have created a CMD type object. In one of the fields in Display file , I would like to see All the Source files present by pass the name of Library. Tried using CHoice(Keyword) and Choicepgm on PARM , but doesn't seems to be working. Any help please..

2047