×
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.
message: 1
date: Thu, 25 May 2017 22:10:29 +0000
from: Roger Harman <roger.harman@xxxxxxxxxxx>
subject: fputs() in RPGLE
I am having a brain freeze on using fputs() in an RPGLE program. It needs to be in old-style /free format for another user.
I have this and it is showing 18 bytes written (retBytes) but the IFS file (in /tmp) is zero bytes - checked with Windows Explorer and wrklnk.
I must be missing something very obvious. Thanks.
// call proc to call _C_IFS_fopen mode 'w'
TextData = 'One Line Of Data' ;
TextBytes = IFS_Write(TextData : TextFileHandle);
// invoke proc to call _C_IFS_fclose
**======================================================================
**
**
**
**======================================================================
p IFS_Write b
d IFS_Write pi 10i 0
d pText 32767a const
d pFileHandle *
**----------
d Sys_IFS_Write PR 10i 0 extproc('_C_IFS_fputs')
d pString * value options(*string)
d pHandle * value
**----------
d retBytes s 10i 0 inz
d wkText s 32767a inz
d CRLF s 2a inz(x'0D25')
**----------
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.