ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

rename a Record format in a Logical file

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

  • rename a Record format in a Logical file

    Is it possible to rename a Record format in a Logical file using DDS.
    I am trying to follow someone else's standard but can't find the keyword.

    Example:

    PF = MYFILE
    Record Format = RMYFILE

    LF = MYFILEL1 (based on MYFILE)
    Record Format = RMYFILEL1 (not RMYFILE)

  • #2
    Re: rename a Record format in a Logical file

    There isn't really a "keyword", you just specify a new format name. You then also have to specify every field to be included in the new format (just the name is required)

    If you use the same format name as the physical, you don't need to specify the field names, as the format is already defined.

    Of course, either format can be renamed inside RPG with the "Rename" keyword.

    Comment


    • #3
      Re: rename a Record format in a Logical file

      You can change the record format in the RPG program

      like this


      FMYFILE1 IF E K Disk Rename(MYFILE:MYFILE1)

      Comment


      • #4
        Re: rename a Record format in a Logical file

        I am working with someone else's files. All his logical file record format names match the logical name (with an R prefix), however the field names are the same as the PF.


        File . . . . . . . . . WRDTL1 Name, F4 for list
        Library . . . . . . MYLIB Name, *LIBL, F4 for list
        Member . . . . . . . . *FIRST Name, *FIRST, F4 for list
        Format . . . . . . . . RWRDTL1 Name, *FIRST, F4 for list

        Comment


        • #5
          Re: rename a Record format in a Logical file

          This works. Strange technique.
          Maybe it was generated with a case tool?

          Originally posted by arrow483
          There isn't really a "keyword", you just specify a new format name. You then also have to specify every field to be included in the new format (just the name is required)

          keyword.

          Comment

          Working...
          X