ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Qualified DS

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

  • Qualified DS

    OK.. someone 'splain to me why this won't work...

    PHP Code:
          Data Structures
          
    *========================================================================*
         
    D CustNo          DS                  Qualified
         D   Prefix                       4A   Overlay
    CustNo )
         
    D   AccountNo                   16A   OverlayCustNo )

    Later in code...

                     
    CustNo PSAcctNo;
                     If 
    Cust.Prefix '7600';
                        
    ExSR #AddRec;
                     
    EndIF;
    ...
                 
    AcctNo    Cust.AccountNo
    I get the following under the compile...

    *RNF7030 CUST **UNDEF**
    *RNF7030 ACCOUNTNO **UNDEF**
    *RNF7030 PREFIX **UNDEF**

    ...Anyone...Anyone...Buhler...Buhler...

  • #2
    Re: Qualified DS

    You need to use the keyword Prefix - see below

    D CustNo DS Qualified Prefix(CUST.)
    D Prefix 4A Overlay( CustNo : 1 )
    D AccountNo 16A Overlay( CustNo : 1 )

    Comment


    • #3
      Re: Qualified DS

      Added the "Prefix(Cust.)" and this is what I get

      RNF3529E Keyword is not allowed for a program-described data structure; keyword is ignored.
      RNF0622E A qualified name is not allowed in this context.
      RNF0623E The qualified name is not specified correctly.




      It should not matter that I'm using SLQRPGLE... correct?
      Last edited by FaStOnE; May 11, 2006, 08:19 AM.

      Comment


      • #4
        Re: Qualified DS

        As your data structure is CustNo should it be CustNo.Prefix not Cust.Prefix?
        Life is a constant struggle against maturity

        Comment


        • #5
          Re: Qualified DS

          Amazing how the small things can bite you on the @#%@#%@#%...

          Thanks Tony! That did it.

          Comment

          Working...
          X