RNGINSTMF2 (RPGLE)

Stream File Input Provider
Details ....

Copybooks  

'streamfile2_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_stmf2_closeexported
Close file
rng_input_stmf2_createexported
Create input provider
rng_input_stmf2_finalizeexported
Dispose input provider
rng_input_stmf2_openexported
Open file
rng_input_stmf2_readexported
Read block from file

Detailed Description  

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

Procedure Documentation  

rng_input_stmf2_close  

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

rng_input_stmf2_create  

Pointerrng_input_stmf2_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_stmf2_finalize.

rng_input_stmf2_finalize  

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

rng_input_stmf2_open  

voidrng_input_stmf2_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_stmf2_close procedure.
Parameter:
Pointer   constPointer to input provider
Exported.

rng_input_stmf2_read  

Booleanrng_input_stmf2_read(Pointer, Zeichen)
The data will be read and returned blockwise from the file.
Parameter:
Pointer   constInput provider
Zeichen (65535)   varyingData read
Return value:
Boolean*on = EOF (end of file) else *off
Exported.