× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



 It looks like the error message: 
*RNF7031 C6AENB            P(2,0)                1000002D
is pointing to the 1000002D statement not 000002D


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Eric A. Wolf
Sent: Friday, April 29, 2005 5:57 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Field compiles as Packed but is zoned in file

To the list,
I checked out the archives and found some mentions but not exactly.  I
have a file that shows in all utilities and commands that the first
field is 2.0 Signed except on the compile of the program - it shows as
packed.  The program only has 100+ lines of code:

Error message: Factor 1 field is not the same type as first key field in
file. Factor 1 is Company

Here are the definitions of C6AENB
000002=I                             S    1    2 0C6AENB  

000001=D C6AENB              2S 0 EXTFLD (C6AENB)       
        *---------------------------------------------------------------
        * Data structure . . . . . . :  KLORDERHDR                     
        * External format  . . . . . :  FAVRECL : AMFLIBB/MBC6RES1     
        * Format text  . . . . . . . :  Quote/Order Header             
        *--------------------------------------------------------------
000001=D COMPANY                      2S 0 EXTFLD (C6AENB)


   1  MBC6RES1

        FAVRECL

                     C6AENB                  ZONE      2,0 SIGNED

                     C6DCCD                  CHAR        1

                     C6CVNB                  CHAR        7


*RNF7031 C6AENB            P(2,0)                1000002D


h NoMain option(*srcstmt : *nodebugio)       
FMBC6RES1  IF   E           K DISK                                   
 * Order Header                   Retrieval Index                    
                                                                     
 * Prototypes                                                        
d RtvOrdHdr       pr           424                                   
d  prInput                         424

                                                                     
 *  module interface                                                 
p RtvOrdHdr       b                   export                         
d  RTVOrdHdr      pi           424                                   
d  prInput                          424

 *                                                                   
 * External definition of file                                       
d DsInput       e ds                  extname(mbc6rep)   
 *                                                                   
d klOrderHdr    e ds                extname(mbc6res1:favrecl:*KEY) 
d Company     e                     extfld(c6aenb)                 
d OrderType    e                     extfld(c6dccd)                 
d OrderNum    e                     extfld(c6cvnb)                 

/free                                                       
                                                            
 //* Move the input information to the datastructure...     
 dsInput = prInput;                                         
                                                             
 Company   = c6aenb;                                  
 OrderType = c6dccd;                                      
 OrderNum  = c6cvnb;                                      
                                                            
 CHAIN klOrderHdr mbc6res1;                                 
 IF NOT %FOUND(mbc6res1);                                   
      CLEAR DsInput;                                        
 ENDIF;                                                     
                                                            
 RETURN dsInput;        

 /end-free                        
p RtvOrdHdr       e                              

V5R2 OS

thanks in advance...
Eric

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.