ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

The name or indicator is not defined error when field does exist

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

  • The name or indicator is not defined error when field does exist

    Running into a compiling error:
    *RNF7030 30 1 The name or indicator is not defined.
    *RNF7030 30 284 000042 The name or indicator ITPID is not defined.

    dcl-f ediasndgi usage(*OUTPUT);
    *--------------------------------------------------------------------------------------------*
    * RPG name External name *
    * File name. . . . . . . . . : EDIASNDGI CADTA/EDIASNDGI *
    * Record format(s) . . . . . : DOLGENI DOLGENI *
    *--------------------------------------------------------------------------------------------*

    Code:
    dcl-f ediasnd74 keyed;
    dcl-f o1oput76 keyed;
    dcl-f ediwhsm keyed;
    dcl-f ediasndgs usage(*OUTPUT);
    dcl-f ediasndgo usage(*OUTPUT);
    dcl-f ediasndgp usage(*OUTPUT);
    dcl-f ediasndgi usage(*OUTPUT);

    The field DOES exist. Not sure why this error is occuring

  • #2
    Doesn't this prove the name is defined?

    Click image for larger version

Name:	Capture.PNG
Views:	376
Size:	34.8 KB
ID:	156474

    Comment


    • #3
      Local F-Specs perhaps?

      Comment


      • #4
        This does not work
        dcl-f ediasndgi usage(*OUTPUT);

        This does work
        Fediasndgi UF A E K DISK

        Would have like it in all FREE but at least the issue is resolved.

        Comment


        • #5
          You also need to specify *UPDATE: USAGE(*UPDATE: *OUTPUT)
          *OUTPUT is only for writing new rows.

          Comment


          • #6
            Thank you. That's all i'm doing is writing new rows.

            Comment


            • #7
              The field names associated with an output-only file are encountered by the compiler when it creates the O specs for the external records. The compiler only writes out the O specs for records that are actually used for an output operation, or if the compiler encounters a subprocedure.

              To get around this, add a WRITE operation for each record format. Or, if your source member is not a **FREE source member, you can just add an empty P spec at the end of the source.

              Comment

              Working...
              X