what is field reference file

310 pts.
Field Reference File
hi, all i m working on RPGILE ,please tell me what is field reference file , what is use of it, please give any example.. thanks Ambrish

Answer Wiki

Thanks. We'll let you know when a new response is added.

FRF is the reference of physical file,means it in that company we want particular fields name, there gives criteria then you can access particular fields through FRF.

use file level keyword to retrive the fields. “REF(PF NAME)”. RECORD NAME MUST BE SAME


Discuss This Question: 5  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Mohan K
    Hi Gilly, i have one question which regards to your above explination. For example i have created 1 physical file FILEA with 10 fields in that PF by referencing each field from field reference file(FLDREFFILE). if i have populated the 10000 records of data to the file FILEA from production. after moving the file to production later on if i receive a request from client saying that FIELDA length needs to be changed from 10 character to 30 character in FILEA. in this case i can not change the field FIELDA length in FILEA, since i am referencing this field from REFFILE. if i want to change the field length from 10 character to 30 character in FILEA with out compiling the FILEA and with out losing the data in FILEA what should i have to do. Please suggest me. Thanks Mohan K.
    695 pointsBadges:
  • Teandy
    I don't think you can change a field length in a file without recompiling it and the programs that use it. Even if you can, I think it would be extremely foolish, not to mention dangerous, to do so. Here is what I would do: First make a back up of the original file. CPYF FROMFILE(MYLIB/FILEA) TOFILE(MYLIB/FILEABAK) MBROPT(*REPLACE) CRTFILE(*YES) Second, change the dds for FEILDA from 10 to 30 and recompile the file. Third, copy the data from the back up back to the original file. CPYF FROMFILE(MYLIB/FILEABAK) TOFILE(MYLIB/FILEA) MBROPT(*REPLACE) FMTOPT( *NOCHK) Fourth, recompile the programs that use the file.
    5,860 pointsBadges:
  • graybeard52
    To change the length of a field that has DDS defined, just fix the DDS and run CHGPF. You will then need to recompile any RPG programs that use the file, since you have now changed the file level. If you use CRTPF you will lose all you data, so use CHGPF instead.
    3,115 pointsBadges:
  • RamvishakRamesh
    I have a query, I have a field reference file with say 10 fields and I have some files which refer to this field reference file, Is it possible to delete the field reference file now?
    2,505 pointsBadges:
  • Brijesh
    Check this http://as400onlinecourse.blogspot.in/2012/12/field-reference-file-in-as400.html which may assist you with some idea.
    14,450 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: