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
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 |
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 |
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 |
What is the purpose of the following FORDHDR1 CF E WORKSTN $2SFN SFILE FMT2
I have 1 rd in my flat file. say reord from 1 to 10 position : 'AS400NDB2400' I need to change the value from N to Y using SQL stmt ...How can I update this....?
how to get the particular field's records in CL without using OVRDBF,OPNQRY? tell me the concept?
how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.
What is an authorization list?
how to see all source files in a particular library? ex:xyz is a library name a,b,and c..... are source files how to see?
What is a Join Logical File, Can it be used for Update ?
load all subfile logic in sqlrpgle and when updating particular record it must be lock form other jobs (not a file)?
What is Job description?
What is SDA used for?
can anybody give the interview questions list of RLU. plz mail me: dinesh_sati07@yahoo.com
How to trap errors in CL?