Oops.
RTFM.
nullcap=Y.
sorry.
shouldn't work last night before vacation......

        -----Original Message----- 
        From: Jevgeni Astanovski 
        Sent: N 18.12.2003 0:12 
        To: C programming iSeries / AS400 
        Cc: 
        Subject: [C400-L] Reading file with NULL fields
        
        

        There should be some trick about reading files with NULL-capable fields!
        But I deal with it for the first time....
        
        Have a file Y6CPF:
        
        A          R Y6CPFR                                             
        A            CPNC           6A         TEXT('Account number')   
        A            DLP            3A         TEXT('Deal type') ALWNULL
        
        Try to read it :
        
        fp = _Ropen("*LIBL/Y6CPF", "rr") ;
        
        fb = _Rreadf(fp, &Collateral, sizeof(y6cpf), __NO_LOCK) ;
        while (fb->num_bytes == sizeof(y6cpf))                  
        {
          ...
          fb = _Rreadn(fp, &Collateral, sizeof(y6cpf), __NO_LOCK) ;
        }
        
        Nothing strange, I always do it like this.
        Program gets out of the loop on first record, having field DLP=NULL.
        Shit! And my goal was to find just these records...
        What's wrong? It SHOULD be as simple as usual!
        Any help will be really appreciated.
        
        Jevgeni Astanovski.
        
        
        


This thread ...


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

This mailing list archive is Copyright 1997-2019 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].