ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

reg PF record format name change

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • reg PF record format name change

    hi folks!

    i have created a PF in tht by mistake i have given the same name for the record format n i have referred tht file in my RPG program. now i am getting the error as file name n the format name as same. now i have changed the record format name n i have issued CHGPF but the record frmat name is not getting changed. wt to do now without lossing my data in the PF.

    cheers
    Shankar.

  • #2
    Re: reg PF record format name change

    Well you had the right idea....

    You could leave as is and in program(s) do a rename on the format.
    Code:
    FSOURCE    O    E             DISK    Rename(SOURCE:FMT1) Prefix(X)
    --or--

    you could recreate the dds for the file with the same fields in the same order
    with the new format name. Then just do a cpyf.

    Code:
    CPYF FROMFILE(MYLIB/FILE1) TOFILE(MYLIB/FILE2)  
       MBROPT(*REPLACE) FMTOPT(*NOCHK)
    let us know how it turns out

    Happy New Year
    Jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: reg PF record format name change

      Hi Jamie

      Thanks for yr vaulable answers, it is sorry to say tht i know these methods. for suppose if the PF is frequently used in many RPG programs then we can't rename in each n every program right.

      s we have to copy the file and then recreate the DDS n use the PF tht is k.

      i thought is there any other way to change the record format name.

      any how thanks for yr reply Jamie.

      i wish u a Happy and Prospersous New Year

      regards
      Shankar.

      Comment

      Working...
      X