ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Renaming one field in RPGLE

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

  • Renaming one field in RPGLE

    Hi,

    Is there any way to prefix only one field of a physical file in RPGLE program? The requirement is to change the name of only one field in the program. The RPGLE program is called from the CL program.

    Thanks
    Mansi !!!

  • #2
    Re: Renaming one field in RPGLE

    Who or what it is called by is irrelevant since field names are effectively internal to the program.

    What you need to do is to use an I-spec to rename the individual field. It is about the only use their is for I-specs these days.

    Comment


    • #3
      Re: Renaming one field in RPGLE

      Yeah what john said:
      Code:
      imyformat                                          
      i              x.myfield                     myfield
      Best of Luck
      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: Renaming one field in RPGLE

        You could also define an external data structure and rename the field within this data structure.
        Example:
        Code:
        D DSMYFILE      E DS                  ExtName(MyFile)      
        D   MYNewName   E                     ExtFld(MyFileFld)
        In this way you do not need I-Specs

        Birgitta

        Comment

        Working...
        X