ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

RNF7260 The Factor 2 operand is not valid for the specified operation.

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

  • RNF7260 The Factor 2 operand is not valid for the specified operation.

    Good morning,

    I have a simple maintenance program on a SQL created table called WHITELISTF. I am not sure why it is receiving the 7260 error...can someone point out my mistake?


    2 Dcl-f whitelistf usage(*Update:*Output:*Delete) KEYED; 000000 000200
    *--------------------------------------------------------------------------------------------*
    * RPG name External name *
    * File name. . . . . . . . . : WHITELISTF LIBNAME/WHITELISTF *
    * Record format(s) . . . . . : LIST LIST *
    *--------------------------------------------------------------------------------------------*
    3 DCL-f listmntd Workstn Indds(Indicators); 000000 000300
    *--------------------------------------------------------------------------------------------*
    * RPG name External name *
    * File name. . . . . . . . . : LISTMNTD LIBNAME/LISTMNTD *
    * Record format(s) . . . . . : LISTSEL LISTSEL *
    * LISTMNT LISTMNT *
    *--------------------------------------------------------------------------------------------*
    Begsr Addrecord;
    If Not Fkey; B02 000000 005100
    58 Write LITEM whitelistf; 02 000000 005200


    Begsr Chgrecord;
    If Not Fkey; B02 000000 007000
    77 Update LITEM whitelistf; 02 000000 007100


    RNF7260 30 58 005200 The Factor 2 operand is not valid for the specified
    operation.
    *RNF7260 30 77 007100 The Factor 2 operand is not valid for the specified
    operation.​

  • #2
    Factor 2 is the filename/record format. For write and update operations, you need to specify the record format.

    Comment


    • #3
      Assuming LITEM is a data structure, you need to code like this:

      Code:
      Write LIST LITEM;  // WRITE recordformat datastructure
      
      Update LIST LITEM;  // UPDATE recordformat datastructure

      Comment

      Working...
      X