SRCTOSTMF -   Copy from Src Mbr to IFS File

<< Click to Display Table of Contents >>

Navigation:  Utility Commands >

SRCTOSTMF -   Copy from Src Mbr to IFS File


This CL command can be used as a simple replacement for the CPYTOSTMF command to quickly copy source members to the IFS from a library with no source control. CPYTOSTMF is called under the covers after any path determination and creation logic is executed. This command can be used from PDM or from RDi Remote Systems Explorer User Actions with files edited from a source member or the IFS because of the automated path determination.


If the export destination IFS directory tree structure does not exist it will get automatically created. 


The command is smart enough to be used with source members from a source file and from the IFS if the IFS file has the following naming pattern: /ifsdir/srclibname/srcfilename/srcmember.srctype.   Ex: /ifsdir/QGPL/QCLSRC/SAMPLE1.CLP


Note: No source member header information is added to the IFS file when an export copy occurs. (SRCTOGIT would be used for that.)


Note: See the CPYTOSTMF command for additional information on parameters passed through the call to CPYTOSTMF.


Command Example to export a source member to IFS file (No source info header data is added to members)

SRCTOSTMF TOSTMF('/ifsdir/test001.clp')














TOSTMF - To IFS stream file. This is the destination IFS file that source member will be exported to. 


FROMMBR - From source file member - This is info regarding how to derive the destination source member info. 



*IFSFILEPATH - The destination IFS file path is used to derive the source file member being exported info including, library, file, member and type. 


*SRCMEMBER - The From source file and From source member parameters are used to determine the source member being exported.


SRCFILE - From source file/library - The source file and library for the member to export.


SRCMBR - From source member - The source member name to export.


STMFOPT - The IFS stream file option. Default: *REPLACE


*REPLACE should normally be used.


CVTDTA - Data conversion options. Default: *AUTO


STMFCCSID - Stream file CCSID. Default: *STMF




*PCASCII - Use *PCASCII normally for exports.

1-65533 for a specific CCSID


DBFCCSID - Database file CCSID. Default: *FILE


TBL - Conversion table. Only used if CVTDTA = *TBL.


ENDLINFMT - End of line characters. Default: *CRLF


End of line characters for output file. Normally use: *CRLF.



*CRLF - Carriage return linefeed

*LF - Linefeed

*CR - Carriage return

*LFCR - Linefeed carriage return

*FIXED - Fixed records


AUTHORITY - Authority for new file. Default: *INDIR



*DFT - Owner of file granted *RWX, *PUBLIC will have *NONE.

*INDIR - Use the IFS directory authority to determine permissions.

*FILE - Use the original source file for the FROMMBR to determine authority.

*INDIRFILE - Use the IFS directory authority and then use authority form the FROMMBR.


Note: It may be a good idea to set the IFS directory permissions accordingly and set the AUTHORITY value to *INDIR to make sure the directory permissions are set adequately so there are not any odd member permission issues for any developers access files in this directory. *ALLOBJ authority will bypass any permission issues of course but not usually recommended.


STMFCODPAG - Stream file code page. Default: *STMF




*PCASCII - Use *PCASCII normally

1-65533 for a specific CCSID