首页> 外文期刊>System iNEWS >The Easy and Efficient Way to Read Text Files from the IFS
【24h】

The Easy and Efficient Way to Read Text Files from the IFS

机译:从IFS读取文本文件的简便有效方法

获取原文
获取原文并翻译 | 示例
           

摘要

Over the last several years, I've written quite a bit of material about processing IFS files from an RPG program. Most of that material demonstrates using the open() and read() APIs to read text from an IFS file. This technique works great for many IFS files, but it can be awkward when you're processing a text file. A text file is a file in which the records aren't always the same length. Instead of fixed-length records being read, each record ends when the carriage return and line-feed (CRLF) characters are found. Unfortunately, this doesn't work so well with the open() and read() APIs, because reading a file one character at a time is not very efficient! Here, I demonstrate a different API that makes reading text file records easy without sacrificing efficiency.
机译:在过去的几年中,我编写了很多有关处理RPG程序中的IFS文件的材料。大部分材料都演示了使用open()和read()API从IFS文件读取文本。该技术对许多IFS文件都有效,但是在处理文本文件时可能会很尴尬。文本文件是其中记录的长度不总是相同的文件。当找到回车和换行(CRLF)字符时,每个记录都将结束,而不是读取固定长度的记录。不幸的是,这对于open()和read()API来说效果不佳,因为一次读取一个字符的文件效率不高!在这里,我演示了一个不同的API,它使读取文本文件记录变得容易而又不牺牲效率。

著录项

  • 来源
    《System iNEWS》 |2008年第349期|1|共1页
  • 作者

  • 作者单位
  • 收录信息
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号