CRTS36MSGF (Create System/36 Message File)

CRTS36MSGF Command syntax diagram

 

Purpose

The Create System/36 Message File (CRTS36MSGF) command creates a message file from the user's System/36 message source member. Using the TOFILE and TOMBR parameters, the user can convert the System/36 message source to an AS/400 system message source.

Restrictions: When the QSSP product library is installed, the CRTS36MSGF command can be run either in the System/36 environment or on the AS/400 system.

System/36 message source consists of 3 types of statements:

  1. The message control statement must be the first record in the source. Only one control statement is allowed. The control statement has the following syntax:

    name<,level> <comment>

    where: name is the name of the message file being created or changed. The name must start in column 1 of the source record. Level must be a 1 or 2 or a blank, and is separated from the name by a comma. A level 1 indicates that the source is for message text (first-level messages); a level 2 indicates that the source is for online help information (second-level messages). If level is omitted or blank, a first level message is assumed. Anything after the first blank in the control statement is considered to be a comment and is ignored.

  2. Comment records that start with an asterisk (*) in column 1. All comment records are ignored.

  3. One or more message text statements may be defined. The message text statement has the following syntax:

    mmmm text

    where: mmmm is the System/36 Message Identification Code (MIC) and must start in column 1 and consist of 4 digits (0-9). All 4 digits are required. The 7-character message identifier is created by adding the message prefix specified by the MSGPFX parameter in front of the MIC. Column 5 is ignored and should be left blank. Text is the text of the message being defined and starts in column 6. The message text statements must be arranged so that the MICs are not in descending order. If there is insufficient room to define the entire message in a single record, the MIC can be repeated in column 1 of the next record and the text can be continued starting in column 6.

    A first level message is restricted to a maximum of 75 characters, and a second level message is restricted to a maximum of 225 characters unless RESTRICT(*NO) is specified. Trailing blanks on the last record for each MIC are not counted. The record length used when processing the SRCMBR is the RCDLEN source attribute for that member. This attribute defaults to the source file record length, but can be set or changed when using the CHGS36SRCA, EDTS36SRCA, or RSTS36LIBM commands. The RCDLEN source attribute is the member's logical record length. If the RCDLEN source attribute is less than the record length of the source file, all characters after the logical record length are ignored. If any record contains any non-blank characters after the logical record length, a diagnostic message is issued as a warning.

When SUBST(*YES) is specified on this command, certain strings of # symbols within the message text are treated as substitution fields. A # symbol string (a series of 1 or more characters defined by code point '7B'X) qualifies as a substitution field only if it is preceded and followed by one of the following delimiter characters:

Char Hex Description
40 Blank
41 Blank
\ E0* Backslash
< 4C Less Than
( 4D Left Parenthesis
+ 4E Plus
| 4F* Vertical Bar
! 4F* Exclamation
& 50 Ampersand
* 5C Asterisk
) 5D Right Parenthesis
; 5E Semicolon
not symbol 5F* Not
^ 5F* Caret
- 60 Minus
/ 61 Slash
, 6B Comma
% 6C Percent
> 6E Greater Than
? 6F Question
: 7A Colon
' 7D Quote
= 7E Equals
" 7F Double Quote

Note: Some hex code points X'4F' and X'5F' are assigned different graphics. The comparison is for the HEX value, not the graphic entered. The backslash ('E0'X) is not a CL delimiter, but is also not allowed in a name. No character below '40'X is allowed in a name.

The delimiter that precedes the # symbol string need not be the same as the delimiter that follows the # symbol string. If a # symbol string occurs at the beginning or end of the message text, it is treated as if it were preceded or followed by a blank, respectively.

Double-Byte Character Set Considerations:

If any double-byte character set (DBCS) text is contained in a message, the first MIC for the message must be preceded by a record containing an MIC of A000. This special MIC resets the current MIC counter so that the non-descending MIC requirement is temporarily suspended, allowing the user to define DBCS versions of previously defined MICs within the same message file. The special A000 MIC also alters the third character of the MSGPFX, changing it to a 'Z'. If DBCS messages will be defined, the user should not specify a MSGPFX that uses 'Z' for the third character or duplicate message ID errors may result.

 

Required Parameters

SRCMBR
Specifies the source member that is used to create the message file. The first record that is not a comment record in the source member specifies the name of the message file being created or changed. The first record that is not a comment record also specifies whether the text in this source member is for the first-level or second-level message text.

 

Optional Parameters

SRCFILE
Specifies the qualified name of the source file used to create the message file.

The name of the source file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

QS36SRC: The source file named QS36SRC is used.

file-name: Specify the name of the source file that contains the member specified by the SRCMBR parameter.

MSGLIB
Specifies the qualified name of the library used to receive the message file that is created.

The name of the message file can be qualified by one of the following library values:

*CURLIB: The message file is created in the current library for the job. If no library is specified as the current library for the job, the QGPL library is used.

*SRCLIB: The source library is used to locate the message file.

library-name: Specify the name of the library where the message file is created.

REPLACE
Specifies whether an existing message file is replaced. This parameter is ignored if OPTION(*CREATE) is not specified. More information on this parameter is in Commonly used parameters.

*NO: No replacement occurs.

*YES: If a message file already exists, it is replaced by the one being created.

Note: A message file is not created if the message file has the same name and library as an existing program, display file, or other type of file.

MSGPFX
Specifies the message prefix used to create messages. The default prefix of USR must be used if the message is used to build a menu.

USR: The message prefix of USR is used.

prefix-name: Specify the three-character message prefix used in message IDs.

OPTION
Specifies what to do with the specified message file. A message file is created, or messages are added or changed, in existing message files.

*CREATE: A message file is created by using the message file name specified in the source.

*ADD: The system adds the new records to the end of the existing records.

*CHANGE: Messages are updated in the specified message file. If a given message does not exist, it is added.

SUBST
Specifies that System/36 text replacement fields are converted into the notation that represents text replacement fields in AS/400 system message files. Although *YES is the default, not everyone uses text replacement fields and *NO is a way to make sure that a field is not converted by mistake. Replacement fields are represented by a pair of trailing ## symbols in the S/36 source.

*YES: The text replacement fields are converted.

*NO: The text replacement fields are not converted.

RESTRICT
Specifies that all System/36 restrictions on message text length are enforced.

*YES: System/36 restrictions are enforced on the message text length. First-level message text is limited to 75 characters. Second-level message text is limited to 225 characters.

*NO: System/36 restrictions on the message text length are not enforced.

AUT
Specifies the authority given to users who do not have specific authority to the System/36 message file, who are not on an authorization list, and whose user group has no specific authority to the System/36 message file. More information on this parameter is in Commonly used parameters.

*LIBCRTAUT: The public authority for the System/36 message file is taken from the value on the CRTAUT parameter of the target library (the library that is to contain the System/36 message file). The public authority is determined when the System/36 message file is created. If the CRTAUT value for the library changes after the System/36 message file is created, the new value does not affect any existing objects.

*USE: The user can perform basic operations on the System/36 message file, such as running a program or reading a file. The user cannot change the System/36 message file. *USE authority provides object operational authority, read authority, and execute authority.

*CHANGE: The user can perform all operations on the object except those limited to the owner or controlled by object existence authority and object management authority. The user can change and perform basic functions on the object. Change authority provides object operational authority and all data authority.

*ALL: The user can perform all operations except those limited to the owner or controlled by authorization list management authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the System/36 message file.

*EXCLUDE: The user cannot access the System/36 message file.

authorization-list-name: Specify the name of the authorization list used.

TOFILE
Specifies the qualified name of the source file (to-file) in which to store the data description specifications (DDS) source that was used to create the object. If the file does not exist, the requester must be authorized to the Create Source Physical File (CRTSRCPF) command so it can be created. This parameter is ignored if TOMBR(*NONE) is specified.

The name of the to-file can be qualified by one of the following library values:

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

QCLSRC: The source file QCLSRC is used.

file-name: Specify the source file name under which to store the source file.

TOMBR
Specifies the name of the source file member in which to store the data description specifications (DDS) source. If the member does not exist, it is created. When the member name is the same as that of the display file name, and the to-file is QS36DDSSRC in the same library as the display file being created, the DDS is saved in this member only if the compile operation of the display file is successful. To guarantee that the DDS is saved, specify the name of some other source file, library, or member.

*NONE: The CL source is not stored in the to-file.

*SRCMBR: If no member name is specified, the member name specified in the SRCMBR parameter is used.

member-name: Specify the name of the source file member in which to receive the CL source file.

HALT
Specifies whether the processing stops when an error is found in the source.

*YES: The processing stops and an error message is sent.

*NO: The request ends and a return code of 2034 is set. A diagnostic message is sent.

*IGNORE: A diagnostic message is sent and the current source statement is ignored; processing continues with the next source statement.

Example for CRTS36MSGF

CRTS36MSGF  SRCMBR(MYMSGSRC)  SRCFILE(MYLIB/QS36SRC)
  MSGLIB(WORKLIB)  REPLACE(*YES)

This command creates a message file named MYMSGSRC in library WORKLIB. If a message file with the same name already exists, this new message file replaces the existing one.

Error messages for CRTS36MSGF

*ESCAPE Messages

SSP1727
Message file &1 not found in library &2.
SSP5017
TOFILE library &1 not found.
SSP6124
Unexpected error occurred.
SSP7375
Error &1 received by &2 utility.
SSP8663
User not authorized to access &1.