Support This Project Get i5/OS Programmer's Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads

CL Command Start SEU on Stream Files (STMFSEU)

CL command Start SEU on Stream Files (STMFSEU) enables i5/OS programmers to work with source code stored in stream files (STMF) using the Source Entry Utility (SEU). STMFSEU is a glue layer between SEU and source stream files. By specify the OPTION parameter of STMFSEU programmers can edit, view, or print source stream files via STMFSEU. The rationale of STMFSEU is quite simple. It first accepts the path of target source stream file along with other parameters to CL command STRSEU, then copies the stream file to a temparory source PF member, and finaly invoke STRSEU on the temparory source PF member and passes the SEU parameters to it. Optionally, after the user finished editing a source stream file, the edit-result stored in the temparory source member will be copied back to the target source stream file.

CL command STMFSEU has an optional parameter STMFCCSID. When creating a new STMF using STMFSEU, this parameter can be specified to determine the CCSID attribute of the result STMF. The default value of parameter STMFCCSID is 1208 (UTF-8). This is because that STMFSEU is designed to work with Software Configuration Management (SCM) tools migrated from common platforms such as Subversion and the PASE make utility.

Parameters of CL Command STMFSEU

Keyword Description Choices Notes

STMF Path of source STMF. Path name Required, positional 1.

SRCTYPE Source type Simple name, *SAME, BAS, BASP, BND, C, CBL, CBLLE, CICSC, CICSCBL, CICSCBLLE, CICSMAP, CICSSQLCBL, CL, CLD, CLP, CLLE, CMD, CPP, DFU, DSPF, FTN, ICFF, LF, MENU, MNU, MNUCMD, MNUDDS, PAS, PF, PLI, PNLGRP, PRTF, QRY, REXX, RMC, RPG, RPGLE, RPT, SPADCT, SQLC, SQLCBL, SQLCBLLE, SQLFTN, SQLPLI, SQLRPG, SQLRPGLE, SRT, TBL, TXT, BAS38, BASP38, BSCF38, CBL38, CL38, CLP38, CMD38, CMNF38, DFU38, DSPF38, LF38, MXDF38, PF38, PLI38, PRTF38, QRY38, RPG38, RPT38, SRT38, TXT38, ARS36, ASM36, BAS36, BASP36, BGC36, BGD36, BGF36, CBL36, DFU36, DTA36, DSPF36, FOR36, MNU36, MSGF36, OCL36, PHL36, RPG36, RPT36, SRT36, TXT36, UNS36, WSU36 Optional, positional 2.

OPTION Option. *BLANK, ' ', 2, 5, 6 Optional, positional 3.

STMFCCSID CCSID of newly created STMF. Integer Optional, positional 4.

ENDLINFMT End of line characters. *LF, *CR, *CRLF, *LFCR, *FIXED Optional, positional 5.

STMF

Specifies the path name of source STMF to edit, view, or print. The path name should be a valid i5/OS Interated File System (IFS) stream file path, either a absolute path name or a relative path name. For example:

Remarks:
STMFSEU does NOT support the QSYS.LIB file system. Do NOT specify an IFS path name of a source PF member, such as '/qsys.lib/product.lib/RPGLESRC.FILE/HELLO.MBR'.

SRCTYPE

Specifies the type of source member to edit or create. The possible values are:

*SAME
The default value of paramteter SRCTYPE. When *SAME is specified, STMFSEU use the extension file name of the target stream file as the value of parameter SRCTYPE.

TYPE
This value allows you to specify the type of source to use. You can specify any combination up to 10 characters, or you can specify a type supported by SEU.

The following member types are supported:

Operating system types
BAS, BASP, BND, C, CBLLE, CBL, CICSC, CICSCBLLE, CICSCBL, CICSMAP, CICSSQLCBL, CL, CLD, CLLE, CLP, CMD, CPP, DFU, DSPF, FTN, ICFF, LF, MENU, MNU, MNUCMD, MNUDDS, PAS, PF, PLI, PNLGRP, PRTF, QRY, REXX, RMC, RPG, RPGLE, RPT, SPADCT, SQLC, SQLCLE, SQLCBL, SQLCBLLE, SQLFTN, SQLPLI, SQLRPG, SQLRPGLE, SRT, TBL, and TXT.

System/38 types
BAS38, BASP38, BSCF38, CBL38, CL38, CLP38, CMD38, CMNF38, DFU38, DSPF38, LF38, MXDF38, PF38, PLI38, PRTF38, QRY38, RPG38, RPT38, SRT38, and TXT38.

System/36 types
ARS36, ASM36, BAS36, BASP36, BGC36, BGD36, BGF36, CBL36, DFU36, DSPF36, DTA36, FOR36, MNU36, MSGF36, OCL36, PHL36, RPG36, RPT36, SRT36, TXT36, UNS36, and WSU36.

OPTION

Specifies the function to perform on the selected member. The default value depends on if you specify a member name. If you do not specify a member name, the default is *BLANK, which indicates no action. If you specify a member name, the default value is 2 (Edit). This specifies an Edit session for the member.

The possible value is:

*BLANK or ' '
This is the default value if you do not specify a member name. *BLANK specifies no action.

2=Edit a member
Type 2 after you have selected the option parameter to go to the Edit display.

5=Browse a member
Type 5 after you have selected the option parameter to go to the Browse display.

6=Print Member
Type 6 to print the member specified.

STMFCCSID

When creating a new source stream file using STMFSEU, this parameter can be specified to determine the CCSID attribute of the result stream file. The default value of parameter STMFCCSID is 1208 (the UTF-8 CCSID). This is because that STMFSEU is designed to work with Software Configuration Management (SCM) tools migrated from common platforms such as Subversion and the PASE make utility.

ENDLINFMT

Specifies the end-of-line characters to insert into the stream file when the result source code stored in the temparory source member being copied back to the source stream file. Default to *LF.

If one of the end-of-line character options is selected (ENDLINFMT(*FIXED) is not specified) the database file records are transformed to variable-length stream file text lines as they are copied. Each database file record is trimmed of any trailing blanks. Then, the data is converted to the destination data format (if specified) and the end-of-line character is appended to the end of the text line. The text line is copied to the stream file.

*LF
Line-feed is appended to the end of each line.

*CR
Carriage-return is appended to the end of each line.

*CRLF
Carriage-return followed by line-feed is appended to the end of each line.

*LFCR
Line-feed followed by carriage-return is appended to the end of each line.

*FIXED
The lines in the stream file are written as fixed length records. CR and LF characters are not added at the end of each line, trailing blanks are not removed from the end of each record. The length of the stream file records equals the length of the database file records.

Only stream files and database files with compatible encoding schemes which do not result in the expansion of data record lengths are valid with this option. If an incompatible combination of encoding schemes is detected, the operation will fail.

The following encoding scheme combinations are supported:

Attentions Should be Paid When Using STMFSEU

The following attentions should be paid when working source stream files using STMFSEU.

Choose Stream File CCSID for ILE RPG Source Stream Files

When compiling from source stream file, ILE RPG compiler does not accept UTF-8 source file directly unless a UTF-8 source stream file is included by directive /copy or /include. Because of this fact, when we create a new ILE RPG source stream file which is to be the direct source unit handled by the ILE RPG compiler, it should avoid to be created as a UTF-8 one. When creating a new ILE RPG source stream file by STMFSEU, if it is a header file, aka. it is supposed to be included by other source units, you may choose any proper CCSID for it or UTF-8 by simply leaving the STMFCCSID parameter unspecified; if it is a direct source unit to the ILE RPG compiler, you should specify a proper CCSID value for it via the STMFCCSID parameter. See the following examples.
/*
 Create a new ILE RPG header source stream file
 */
STMFSEU STMF('../include/compute-date-duration.rpgleinc') SRCTYPE(RPGLE) OPTION(2)

/*
 Create a new ILE RPG source stream file which is to be compile into
 a RPG module object. Here CCSID 819 (ISO 8859-1) is choosed as
 target source stream file's CCSID.
 */
STMFSEU STMF('datdur.rpgle') SRCTYPE(RPGLE) OPTION(2) STMFCCSID(819)

See also Specify CCSID for Newly Created Stream Files.


Support This Project
Generated on Wed Jul 20 00:25:08 2011 for i5/OS Programmer's Toolkit: Change Managment Tools for i5/OS by  doxygen 1.5.9