× 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.



You example's not the same.

Besides that, %error is not the same as %eof.

%error might be set on if the record is locked, %eof is only set on if at the 
end of the file.

Consider the following:
/free
  setgt *HIVAL MYFILE;
  // note that %eof(MYFILE) would be *on at this point
  // now, read the last record
  readp(e) MYFILE;
  // if the last record is locked, %eof = *ON and %error = *ON
/end-free

HTH,

Charles Wilt
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
 

> -----Original Message-----
> From: wdsci-l-bounces@xxxxxxxxxxxx
> [mailto:wdsci-l-bounces@xxxxxxxxxxxx]On Behalf Of Reeve
> Sent: Wednesday, March 23, 2005 1:50 PM
> To: Websphere Development Studio Client for iSeries
> Subject: [WDSCI-L] Error in WDSC conversion to /FREE?
> 
> 
> When I'm doing a READC with 35 as the "low" indicator and "35" as the
> equal indicator, WDSC generates this code:
> 
> readc(E) {format_name};     
> *IN35 = %ERROR;       
> *IN35 = %EOF;
> 
> If there's an error, *IN35 is set on.  If it's not EOF, *IN35 is set
> off.  Shouldn't we get something a little more elegant, like this?:
> 
> if (%error or %eof);
> *in35 = *on;
> else;
> *in35 = *off;
> endif;          
> 
> Thanks,
> Reeve
> -- 
> This is the Websphere Development Studio Client for iSeries  
> (WDSCI-L) mailing list
> To post a message email: WDSCI-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
> or email: WDSCI-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/wdsci-l.
> 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.