RXS_ProcessStmf()
This subprocedure can be used to create, copy, move, or delete a specified IFS stream file.
Subprocedure Prototype
|
|
|
Contains the IFS file path as well as configuration options to control how the data is written. May be one of a few possible data structures, listed below. |
Example Code
*--------------------------------------------------------------
* This example code creates a stream file named new_file.xml in
* the IFS directory /tmp with CCSID 819.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)
/copy QRPGLECPY,RXSCB
D CreateStmfDS DS LikeDS(RXS_CreateStmfDS_t)
/free
RXS_ResetDS( CreateStmfDS : RXS_DS_TYPE_CREATESTMF );
CreateStmfDS.Stmf = '/tmp/new_file.xml';
CreateStmfDS.Ccsid = RXS_CCISD_ISO88591;
RXS_ProcessStmf( CreateStmfDS );
*INLR = *ON;
/end-free
*--------------------------------------------------------------
* This example code copies an IFS file from /tmp/new_file.xml to
* /tmp/copied_new_file.xml.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)
/copy QRPGLECPY,RXSCB
D CopyStmfDS DS LikeDS(RXS_CopyStmfDS_t)
/free
RXS_ResetDS( CopyStmfDS : RXS_DS_TYPE_COPYSTMF );
CopyStmfDS.FromStmf = '/tmp/new_file.xml';
CopyStmfDS.ToStmf = '/tmp/copied_new_file.xml';
RXS_ProcessStmf( CopyStmfDS );
*INLR = *ON;
/end-free
*--------------------------------------------------------------
* This example code copies an IFS file from /tmp/new_file.xml
* to /tmp/moved_new_file.xml.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)
/copy QRPGLECPY,RXSCB
D MoveStmfDS DS LikeDS(RXS_MoveStmfDS_t)
/free
RXS_ResetDS( MoveStmfDS : RXS_DS_TYPE_MOVESTMF );
MoveStmfDS.FromStmf = '/tmp/new_file.xml';
MoveStmfDS.ToStmf = '/tmp/moved_new_file.xml';
RXS_ProcessStmf( MoveStmfDS );
*INLR = *ON;
/end-free
*--------------------------------------------------------------
* This example code deletes an IFS file named /tmp/moved_new_file.xml.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)
/copy QRPGLECPY,RXSCB
D DeleteStmfDS DS LikeDS(RXS_DeleteStmfDS_t)
/free
RXS_ResetDS( DeleteStmfDS : RXS_DS_TYPE_DELETESTMF );
DeleteStmfDS.Stmf = '/tmp/moved_new_file.xml';
RXS_ProcessStmf( DeleteStmfDS );
*INLR = *ON;
/end-free
Data Structures
|
|
|
|
|
|
|
Specify the IFS file path to copy from. |
|
Specify the IFS file path to copy to. |
|
Specify the CCSID the copied file will use. |
|
Internal use only |
|
|
|
|
|
|
|
Specify IFS path where the file will be created. |
|
Specify the CCSID to create the file with. |
|
Internal use only |
|
|
|
|
|
|
|
Specify the IFS file path to delete. |
|
Internal use only |
|
|
|
|
|
|
|
Specify the IFS file path to move from. |
|
Specify an IFS file directory to move to. Note: You should only specify a directory path, not a full path to a file. |
|
Internal use only |