RXS_GetStmf()
This subprocedure retrieves up to 16MB of data from a specified IFS stream file.
Subprocedure Prototype
|
Returns data retrieved from the specified IFS stream file. |
|
RXS_GetStmfDS_t data structure used to configure the RXS_GetStmf() call and specify the IFS stream file to read. |
Example Code
*--------------------------------------------------------------
* This example code reads the contents of the file
* /tmp/rxs_getstmf.txt into the Data field.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)
/copy QRPGLECPY,RXSCB
D GetStmfDS DS LikeDS(RXS_GetStmfDS_t)
D Data S Like(RXS_Var64Kv_t)
/free
RXS_ResetDS( GetStmfDS : RXS_DS_TYPE_GETSTMF );
GetStmfDS.Stmf = '/tmp/rxs_getstmf.txt';
Data = RXS_GetStmf( GetStmfDS );
*INLR = *ON;
/end-free
*--------------------------------------------------------------
* This example code reads the contents of the file
* /tmp/rxs_getstmf.txt and outputs the entire file to STDOUT,
* even if the length of the file is greater than the Data variable.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)
/copy QRPGLECPY,RXSCB
D GetStmfDS DS LikeDS(RXS_GetStmfDS_t)
D Data S Like(RXS_Var64Kv_t)
/free
RXS_ResetDS( GetStmfDS : RXS_DS_TYPE_GETSTMF );
GetStmfDS.Stmf = '/tmp/rxs_getstmf.txt';
GetStmfDS.ChunkedLength = %size(Data - 4);
Dou %len(Data) = 0;
Data = RXS_GetStmf( GetStmfDS );
RXS_PutStdOut( Data );
Enddo;
*INLR = *ON;
/end-free
Data Structures
|
|
|
|
|
Internal use only |
|
|
|
Specifies IFS path to a stream file to retrieve. |
|
The CCSID to convert the data read from the IFS stream file into. |
|
Internal use only |
|
Internal use only |
|
This is a returned value containing the number of bytes stored in the stream file. |
|
The length to use when "chunks" of the stream file are to be returned. See example 2. |
|
Internal use only |