This subprocedure writes the contents of a field up to 16MB in size to an IFS stream file.

Subprocedure Prototype

D RXS_PutStmf...
D                 PR                  Extproc('RXS_PutStmf') Opdesc
D  pInput                             Like(RXS_Var16Mv_t) Const
D                                     Options(*Omit:*Varsize)

Data to write to the IFS stream file.

D  pDS                                LikeDS(RXS_PutStmfDS_t)
D                                     Options(*Varsize)

RXS_PutStmfDS_t used to configure the write operation, such as the file path to write to.

Example Code

*-------------------------------------------------------------- * This example code writes the value <data>The quick brown fox * jumps over the lazy dog</data> to the file /tmp/rxs_putstmf.txt *-------------------------------------------------------------- H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER) /copy QRPGLECPY,RXSCB D PutStmfDS DS LikeDS(RXS_PutStmfDS_t) D Inz(*LikeDS) D Data S Like(RXS_Var64Kv_t) /free Data = '<data>The quick brown fox jumps over the lazy dog</data>'; RXS_ResetDS( PutStmfDS : RXS_DS_TYPE_PUTSTMF ); PutStmfDS.Stmf = '/tmp/rxs_putstmf.txt'; RXS_PutStmf( Data : PutStmfDS ); *INLR = *ON; /end-free

Data Structures

D RXS_PutStmfDS_t...
D                 DS                  Qualified Template Inz
D   ReturnedErrorInfo...
D                                     LikeDS(RXS_ReturnedErrorInfoDS_t) Inz
D   DataStructureType...
D                                5I 0 Inz(RXS_DS_TYPE_PUTSTMF)

Internal use only

D   OnErrorMessageType...
D                               10I 0
D   Stmf                              Like(RXS_Var1Kv_t)

Specifies an IFS path to a stream file to write to.

D   Append                        N

Determines whether to append the data to the file (RXS_YES), or to overwrite the file (RXS_NO).

Valid Values:

  • RXS_NO

Default Value: RXS_NO

D   StmfCcsid                   10I 0

The CCSID of the IFS stream file to be created/written to.

D   InputCcsid                  10I 0

The CCSID of the data being passed. Note: This is typically optional as internally RXS_PutStmf() will assume the data you're passing is the same CCSID as the current job.

D   InputPointer...
D                                 *   Inz(*Null)

Internal use only

D   InputLength                 10I 0

Internal use only