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   Input                             Like(RXS_Var16Mv_t) Const
D                                     Options(*Varsize)

Data to write to the IFS stream file.

D   DS                                Likeds(RXS_PutStmfDS_t)

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


D PutStmfDS       DS                  LikeDS(RXS_PutStmfDS_t)
D                                     Inz(*LikeDS)
D Data            S                   Like(RXS_Var64Kv_t)
  Data = '<data>The quick brown fox jumps over the lazy dog</data>';

  reset PutStmfDS;
  PutStmfDS.Stmf = '/tmp/rxs_putstmf.txt';
  RXS_PutStmf( Data : PutStmfDS );

  *INLR = *ON;

Data Structures

D RXS_PutStmfDS_t...
D                 DS                  Qualified Template Inz
D   ReturnedErrorInfo...
D                                     LikeDS(RXS_ReturnedErrorInfoDS_t) Inz
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   VarCcsid                    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                                 *

Internal use only

D   InputLength                 10I 0

Internal use only