RNGINSTMF (RPGLE)

Stream File Input Provider
Details ....

Copybooks  

'streamfile_input_provider_h.rpgle'
'ifsio_h.rpgle'
'errno_h.rpgle'
'libc_h.rpgle'
'message_h.rpgle'
QSYSINC/QRPGLESRC,QUSEC
COMMON STRUCTURE FOR ERROR CODE PARAMETER
'input_provider_t.rpgle'

Procedures  

rng_input_stmf_closeexported
Close file
rng_input_stmf_createexported
Create input provider
rng_input_stmf_finalizeexported
Dispose input provider
rng_input_stmf_openexported
Open file
rng_input_stmf_readexported
Read line from file

Detailed Description  

This input provider returns the data from a stream file line by line.
The user data contains the absolute path to the IFS file.
Author:
Mihael Schmidt
Date:
24.03.2010

Procedure Documentation  

rng_input_stmf_close  

voidrng_input_stmf_close(Pointer)
Closes any open files opened by this input provider.
Parameter:
Pointer   constPointer to input provider
Exported.

rng_input_stmf_create  

Pointerrng_input_stmf_create(Pointer)
Creates the input provider.
The path to the stream file read must be passed as a parameter.
Parameter:
Pointer   const   optionalPath to the stream file (null-terminated)
Return value:
PointerPointer to input provider
Exported.
Infos:
  The calling program must make sure to free the allocated resources with the procedure rng_input_stmf_finalize.

rng_input_stmf_finalize  

voidrng_input_stmf_finalize(Pointer)
Frees allocated memory.
Parameter:
PointerPointer to input provider
Exported.

rng_input_stmf_open  

voidrng_input_stmf_open(Pointer)
Opens the stream file. This procedure must be called prior to any read calls. Once opened the file must be closed with the rng_input_stmf_close procedure.
Parameter:
Pointer   constPointer to input provider
Exported.

rng_input_stmf_read  

Booleanrng_input_stmf_read(Pointer, Zeichen)
The data will be read blockwise from the file. The content will be parsed char by char. The data block to be returned will be build until a CR or LF is found.
Parameter:
Pointer   constInput provider
Zeichen (65535)   varyingData read
Return value:
Boolean*on = EOF (end of file) else *off
Exported.