Processing Error Messages

All SYSMAIN functions can be performed on user-defined and Natural system error messages. Error messages can be moved from one library to another, or the language texts of each error message can be copied, moved or replaced. In addition, it is possible to renumber a single error message or a range of error messages by using the rename function.

Only authorized users can process Natural system error messages if Natural Security is installed.

Error messages are stored in the system files according to their type: Natural system error messages are stored in the FNAT system file and user-defined error messages in the FUSER or FNAT system file.

This section describes menu functions and selection list options provided to perform a SYSMAIN function on error messages and the syntax that applies when using direct commands.

Related Topic:


Fields in Error Message Menus

The Error Message Texts menus contain all SYSMAIN functions required for the processing of error messages. The fields that can be provided in a menu are described in the following table:

Field Explanation
Code
Specifies whether a short and/or an extended (long) error message is to be processed. Possible values are:
   
A Any error message for which a short and/or an extended (long) message exists is processed.
E Any error message for which an extended (long) error message exists is processed. Only extended error messages with corresponding short error messages are processed.

An extended error message cannot be transferred to a target environment if there is no corresponding short error message in the target environment.

S Any error message for which a short error message exists is processed.
Sel. List
Specifies whether selective processing or automated processing is used:
   
Y Yes.
Selective processing is activated. A selection list is displayed when processing error messages. This is the default setting. For the columns and line commands available on a selection list, see Selection Lists for Error Messages.
N No.
Selective processing is deactivated.
No. From or Number The number of the error message to be processed, or the start number of a range of numbers if an end number is entered in the No. To field. See also Renumbering Error Messages.
No. To The end number of a range of error messages numbers to be processed if a start number is entered in the No. From field. See also Renumbering Error Messages.
New From Applies to the rename function.

The new number to be given to an existing error message, or the start number of a range of new numbers to be given to a range of existing error messages. See also Renumbering Error Messages.

New To Applies to the rename function.

The end number of a range of new error message numbers to be given to a range of existing error message. See also Renumbering Error Messages.

Library The name of a source or a target library or a range of names. If you want to process Natural system error messages, leave the Library field empty.

The source library contains the error message(s) to be processed. The target library is the library to which the error message is to be copied or moved, or where the error message is renumbered.

See also Listing and Selecting Libraries.

Lang. The language code(s) in which the error message is available.

The languages can be specified using any combination of language codes. For information on which language code is assigned to which language, see Language Code Assignments in *LANGUAGE in the System Variables documentation. For Natural system extended (long) error messages, only language code 1 is available. Enter an asterisk (*) to select error messages in all existing languages.

See also Specifying Languages.

Database The database ID (DBID) of a source or a target database.

The source database contains the library and system file where the error message to be processed is stored. The target database contains the library and system file to which the error message is to be copied or moved, or where the error message is renumbered.

Valid database IDs are 1 to 65535.

File The file number (FNR) of a source or a target system file.

Valid file numbers are 1 to 65535.

The source file contains the library where the error message to be processed is stored. The target file contains the library to which the error message is to be copied or moved, or where the error message is renumbered.

Replace
Specifies whether an error message is to be replaced when using the move, copy or rename function:
   
Y Yes.
An error message with the same number which exists in the target environment is replaced.
N No.
An error message with the same number which exists in the target environment is not replaced. This is the default setting.
   
See also Using the Replace Option.

Selection Lists for Error Messages

If selective processing has been activated, a selection list of all error messages that meet the specified selection criteria is displayed on a Selection screen.

This section describes the columns contained on a Selection screen and the line commands provided to further process an error message:

Columns

The following columns are displayed on a Selection screen:

Column Explanation
C Input field for line commands (see below).
Error The name of the error message that meets the specified selection criteria.
Error Message Text The text of the short error message.
Type The type of error message: S (short) and/or E (extended/long).
Lang The first language code in sequence or alphabetical order that exists for the error message. If you want to display all languages that exist for an error message, on a Selection screen, enter the line command L or use the list function.
Message The message that indicates the processing status of an error message.

This column only appears after a line command was executed on an error message.

For possible messages, see Status Messages.

Line Commands

One of the following line commands can be entered in the C (Command) column of a Selection screen:

Line Command Function
A Process any type of message listed in the Type column. The type can be: short (S), extended/long (E) or short and extended (S/E).
E Process the extended (long) message if the corresponding short message exists in the target environment.

If E is specified for a message which exists only as a short message, an error is returned.

S Process all short messages.
L Review an error message before processing it. The short and/or extended (long) error message is displayed for all existing languages, depending on the function specified previously in the Error Message Texts menu.

This line command can also be used on a Library Selection screen (see also Listing and Selecting Libraries).

Renumbering Error Messages

You can renumber a single error message or a range of error messages.

Beginn der Anweisungsliste To renumber a single error message

  1. In the No. From field, enter the number of the error message you want to renumber and, in the New From field, enter the new error message number.

  2. In the Source Library field, enter the name of the library that contains the error message to be renumbered.

    If you want the renumbered error message to be placed in a different library, enter a name in the Target Library field.

Beginn der Anweisungsliste To renumber a range of error messages

  1. In the No. From field, enter the start number of the range of error messages to be renumbered and, in the No. To field, enter the end number.

    In the New From field, enter the start number of a new range of error messages, and in the New To field, enter the end number.

    The number of error messages specified by the range in the No. From and No. To fields of the source library must be equal in number to the range in the New From and New To fields of the target library. For example, it is not possible to renumber error message numbers 1 - 6 as new error message numbers 7 - 10.

    If you want to renumber a range of error messages within a single library, range values must not overlap. For example, it is not possible to renumber error message numbers 1 - 6 as new message numbers 5 - 10.

  2. In the Source Library field, enter the name of the library that contains the error messages to be renumbered.

    If you want the renumbered error messages to be placed in a different library, enter a name in the Target Library field.

See also the examples of range specifications in RENAME in Direct Command Syntax for Error Messages.

Specifying Languages

When specifying languages consider the following:

  • If the list function is performed and the specified language code does not exist for the error message, SYSMAIN uses the default language specified with the system variable *LANGUAGE (see *LANGUAGE in the System Variables documentation).

  • If an asterisk (*) is specified for a source error message, all language codes defined for this error message will overwrite any language codes defined for the target error message.

    For example: If the source error message exists only in languages 1, 2 and 3, and for the target error message only languages 1, 4 and 6 are defined, after performing a copy function, the resulting target error message exists only in languages 1, 2 and 3.

  • If the languages are specified as individual codes, each occurrence of language code is processed individually.

    For example: If the source error message contains languages 1, 2 and 3, and the language codes are set to 123, and if the target error message contains languages 1, 4 and 6, and the language codes are also set to 123, after performing a copy function, the resulting target error message contains languages 1, 2, 3, 4 and 6, but only the English target error message (language 1) is overwritten by the English text of the source error message.

  • If a single language code is specified for the source error message and multiple language codes are specified for the target error message, after performing the copy function, the resulting target error message is in the first language specified for the target.

Direct Command Syntax for Error Messages

This section shows the syntax that applies when performing a SYSMAIN function on error messages by using direct commands in either online or batch mode. For general instructions on using direct commands, refer to Executing Commands.

For explanations of the keywords and variable values used in the syntax diagrams below, refer to Keywords and Variables in Direct Commands. The symbols in the syntax diagrams correspond to the syntax symbols used for system commands. These symbols are explained in System Command Syntax in the System Commands documentation.

The syntax of the where-clause and the with-clause are identical for each command.

Wichtig:
For system error messages, specify NATURAL-SYSTEM or NATURAL-SYS as lib-name.

This section covers the following topics:

COPY and MOVE

COPY
MOVE

ERROR    
number [THRU number]
  FM [LIBRARY] lib-name [where-clause]
          TO [LIBRARY] lib-name [where-clause] [with-clause]

Examples:

COPY ERROR 1 FM ACCOUNTS TO ACCOUNTS1 REP WITH TYPE A
C ERROR 1 THRU 50 FM ACCT WHERE DBID 1 FNR 10 LANG 123456 TO ACCT WHERE DBID 5 FNR 26 LANG 234567 WITH REP HELP
MOVE E 200 THRU 210 FM ACCT FNR 10 LANG 123 TO ACCT LANG 123 TYPE S
M E 376 TYPE E FM ACCT LANG E TO ACCT LANG G

DELETE

DELETE ERROR number [THRU number]    
     

IN [LIBRARY] lib-name

[where-clause] [with-clause]

Examples:

DELETE ERROR 1 THRU 10 IN LIBRARY ACCT WHERE DBID 1 FNR 2 PSW GUESS CIPH 137561 WITH TYPE E MON HELP
D E 100 IN ACCT

FIND

FIND ERROR number

IN [LIBRARY] lib-name

[where-clause] [with-clause]

Examples:

FIND E 4280 IN A* MON
F ERROR 10 IN LIB ACCT WHERE DBID 1 FNR 3 WITH TYPE E

LIST

LIST ERROR number [THRU number]

IN [LIBRARY] lib-name

[where-clause] [with-clause]

Examples:

LIST E 1 THRU 10 IN ACCT
L ERROR 100 THRU 150 IN LIB ACCT WHERE DBID 12 FNR 5

RENAME

When renumbering a range of error messages within a single (source) library, the range values must not overlap as demonstrated in Examples of Invalid Number Ranges.

RENAME ERROR number [THRU number] AS new-number
      [THRU new-number] [with-clause]
      IN [LIBRARY] lib-name [where-clause]
      TO [LIBRARY] lib-name [where-clause]

Examples:

RENAME ERR 1 AS 101 IN ACCT
R ERROR 1 THRU 100 AS 101 THRU 200 IN CLAIMS
R ERROR 101 THRU 200 AS 1 THRU 100 IN CLAIMS
RENAME ERROR 1 THRU 50 AS 11 THRU 60 WITH TYPE A REP HELP MON RCOP IN LIBRARY ACCT WHERE DBID 1 FNR 2 TO LIB ACCOUNT WHERE FNR 3

Examples of Invalid Number Ranges:

The following examples are invalid, because the number ranges overlap:

R ERROR 1 THRU 100 AS 51 THRU 150 IN CLAIMS
R ERROR 101 THRU 200 AS 51 THRU 150 IN CLAIMS

where-clause

[WHERE] [DBID dbid] [FNR fnr] [NAME vsam-name] [CIPHER cipher]

PASSWORD
PSW

password

[LANGUAGE language] [SEC (dbid,fnr,password,cipher)]

Separators

Commas must be used as separators between the values following the SEC keyword, or if a value is missing. For example: SEC (10,,secret,2a). If the session parameter ID (see ID - Input Delimiter Character in the Parameter Reference documentation) has been set to a comma, use a slash (/) as the separator between values.

with-clause

[WITH] [TYPE type] [REPLACE] [ RCOP]

PROMPT
NOPROMPT

MON
NOMON

[HELP]