Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Dynamic field name in RPG/RPGLE

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

  • Dynamic field name in RPG/RPGLE

    Dean,
    This comes up occassionally and if I remember correctly, the answer is you can't do it. Have you considered putting the rule in the screen DDS?
    Bill
    Is there a way that I can check a field name conatined in a field to see if it contains a value. I.e. If I had some mandatory fields in a customer master... CMCUST CMCNAM CMTEL# Instead of saying IF CMCUST = *BLANK (error) ENDIF IF CMCNAM = *BLANK (error) ENDIF IF CMTEL# = *BLANK (error) ENDIF I would like to have the data loaded into a compile time table (or file) and do something like this: DO 3 X 4 0 IF FLDS(X) = *BLANK (Error) ENDIF ENDDO Can something like this be done? Thanks.. Dean


  • #2
    Dynamic field name in RPG/RPGLE

    Thanks Bill, Putting the rule in the DDS is not an option as we have different companies using our package that need to make different fields mandatory and there is simply not enough indicators available for us to do this. I didn't think we were going to be able to do it either, but it was worth a try. Thanks again, Dean

    Comment


    • #3
      Dynamic field name in RPG/RPGLE

      Here's a little thing I do and it may be what you are thinking if I understand it...
       d e ds extName( CUSTMAST ) d cmcust 1 6s 0 d cmcnam 7 27a d cmtel# 28 37s 
      Or to check all at once....
       d e ds extName( CUSTMAST ) d threeFields 1 37a 
      Does that help at all?

      Comment


      • #4
        Dynamic field name in RPG/RPGLE

        Hello RPG Experts! Is there a way that I can check a field name conatined in a field to see if it contains a value. I.e. If I had some mandatory fields in a customer master... CMCUST CMCNAM CMTEL# Instead of saying IF CMCUST = *BLANK (error) ENDIF IF CMCNAM = *BLANK (error) ENDIF IF CMTEL# = *BLANK (error) ENDIF I would like to have the data loaded into a compile time table (or file) and do something like this: DO 3 X 4 0 IF FLDS(X) = *BLANK (Error) ENDIF ENDDO Can something like this be done? Thanks.. Dean

        Comment

        Working...
        X