cleancut-fluent

(Answer) (Category) iSeries / AS400 FAQ : (Category) Programming : (Category) RPG :
RNF7701 data structure not allowed
I'm using a data structure for me READ/WRITE/READP operations but I 
keep getting RNF7701 - Data structure not allowed.  Here's the code:

     FWMERLGP   if a e           k disk

     d Q             e DS                  EXTNAME(WMERLGP:WMERLG:*INPUT)
     d                                     QUALIFIED

     d next_eid        pr            11s 0
     d $err            s               n

      /free
         setgt *hival wmerlgp;
         // read into a ds so as not to disturb the
         // global file fields
         readp wmerlg Q;
     // RNF7701 here!


The answer is that the compiler wants you to use LIKEREC instead of EXTNAME.
Try
      d Q               Ds                   LikeRec(WMERLG : *Input )
ans-ins-part
Append to This Answer
buck.calabro
Previous: (Answer) Sample imbedded SQLRPGLE program
Next: (Answer) New Item
This document is: http://faq.midrange.com/index.pl?file=584
[Search] [Appearance]
This is a Faq-O-Matic 2.721.