|
I'm using Scott's utility for reading a text IFS file. The file has a heading, The top of the file looks like this... -----BEGIN My code looks like this... H DFTACTGRP(*NO) /copy QSRC,ifsio_h D fd s 10I 0 D data s 50A D wait s 1A /free fd = open('/testfile.asc': O_RDONLY ); if (fd < 0); dsply ('Something went wrong, open() failed.') '' wait; return; endif; if read(fd: %addr(data): 10) < 10; dsply ('The file does not have 10 bytes to read!') '' wait; return; endif; // data should now contain "-----BEGIN" If Data = '-----BEGIN'; DSPLY 'BEGIN File...' '' wait; else; DSPLY 'NON-BEGIN File...' '' wait; Endif; However, when I look at the field Data in DEBUG - it looks like this? DATA = 'âáåñ+&å&(áëë åá ' Code page on the file is 437. I've tried "O_TEXTDATA", but when I try that - it returns fd of "-1". Any suggestions? Thanks! Jeff Stevens Mize, Houser & Co. P.A. 913 451 1882 JStevens@xxxxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.
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.