ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Chain / ReadE

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

  • Chain / ReadE

    I'm having a brain-fart kinda day. Help!

    PHP Code:
    PFMGC_GLH

    A          K GLHTXDT
    A          K GLHCDTY 
    PHP Code:
    PFMGC_GLD

    A          K GLDTXDT
    A          K GLDCDTY
    A          K GLDSTAT
    A          K GLDTXTY
    A          K GLDSCAN 
    PHP Code:
    RPGLE:

    D GLD_Key       E DS                  EXTNAMEMGC_GLD : *Key )
    D GLH_Key       E DS                  EXTNAMEMGC_GLH : *Key )
    ...

    SetLL GLH_Key MGC_GLD;       
    DoU %EOF(MGC_GLD);           
        
    ReadE(NGLH_Key MGC_GLD;
    .
    .

    Errors:
    RNF3804: Name GLHTXDT in external description MGC_GLH is not renamed; external name is ignored.
    RNF3804: Name GLDTXDT in external description MGC_GLD is not renamed; external name is ignored.

  • #2
    Re: Chain / ReadE

    D GLD_Key DS EXTNAME( MGC_GLD : *Key )
    D GLH_Key DS EXTNAME( MGC_GLH : *Key )
    I'm guessing cause I was recently playing with the *key stuff and am new to it ... no "E"?

    <shrug>
    Bill
    "A good friend will bail you out of jail,
    A true friend would be sitting beside you saying,
    'Wow, that was fun.'"

    Comment


    • #3
      Re: Chain / ReadE

      You have to use &#37;KDS in the Chain or ReadE statement to use the external data structure.

      PHP Code:
      SetLL %KDS(GLH_KeyMGC_GLD;        
      DoU %EOF(MGC_GLD);            
          
      ReadE(N) %KDS(GLH_KeyMGC_GLD

      Comment

      Working...
      X