+ Reply to Thread
Results 1 to 4 of 4

Thread: Dynamic field name in RPG/RPGLE

  1. #1
    Guest.Visitor Guest

    Default 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. #2
    Guest.Visitor Guest

    Default 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

  3. #3
    Guest.Visitor Guest

    Default 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?

  4. #4
    Guest.Visitor Guest

    Default 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

+ Reply to Thread

Similar Threads

  1. Best of Cozzi: Dynamic Memory and Dynamic Arrays
    By Guest.Visitor in forum RPG
    Replies: 2
    Last Post: 08-11-2004, 08:22 AM
  2. dynamic field level auditing
    By Guest.Visitor in forum RPG
    Replies: 4
    Last Post: 08-29-2002, 08:19 AM
  3. Replies: 5
    Last Post: 06-27-2002, 04:55 AM
  4. dynamic Field Replacement
    By Guest.Visitor in forum Programming
    Replies: 0
    Last Post: 01-01-1995, 02:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts