M -- Logic Commands

Match

Compares two extract files. The behavior of the Match logic command is similar to that of the Determine Actual logic command, except that it reads two extract files instead of one.

MATCH { CompareAscending | CompareDescending } (extract_file , extract_file) 
[ AND { CompareAscending | CompareDescending }  (extract_file , extract_file) ] 
[ GS status ]
OptionDescription

CompareAscending or CompareDescending

Reads records in ascending or descending order, respectively.

extract_file (first)

The first extract file to match.

If matching using a specific attribute of the extract file, this must be the full qualifier of the attribute, in the form <extract file>.<layout>.<attribute>, where <layout> is the class to read the extract file as.

extract_file (second)

The second extract file, to match to the first extract file.

If matching using a specific attribute of the extract file, this must be the full qualifier of the attribute, in the form <extract file>.<layout>.<attribute>, where <layout> is the class to read the extract file as.

AND

Matches using more than one pair of attributes from the extract files.

This command option can only be specified if matching using specific attributes of the extract files.

GS status

Indicates if neither extract file contains data, using the specified qualifier.

Message

Sends a message to the user interface.

MESSAGE { expression | ERROR | ATTENTION } [ expression ]
Option Description

expression (first)

A text or numeric value to display in reverse video before the text of the message, as an alternative to either Error or Attention. If a numeric value is used, it is converted to text.

expression (second)

The text of the message. Can be a numeric message. If a numeric value is used, it is converted to text.

Note: For MCP, the length of the second expression is limited to 50 characters or 24 Kanji characters.

Move

Used for data manipulation. It can be used to simply copy a source value directly over the value of the receiving variable (simple variant), or to manipulate both, to give a new value in the receiving variable (complex variant). None, either, or both the source value and receiving variables can be an array.

Complex Variant

Manipulates both a source value and the value of a receiving variable to give a new value in the receiving variable. It does not alter the source value.

MOVE expression [ POSITION source_variable ] [ LENGTH variable ] target_variable 
[ POSITION target_variable|SORTA | SORTD] [ GS status ]
OptionDescription

expression

The source value.

(POSITION or POS or PO) source_variable

The position of the first character of the source substring.

LENGTH variable

The length of the source substring.

target_variable

The receiving variable.

If the length of the source substring is less than the length of the existing value of this variable, the characters of this existing value that are not overwritten are retained.

(POSITION or POS or PO) target_variable

The position of the first character of the receiving substring to replace.

SORTA

Specifies ascending sort order of substring tokens.

SORTD

Specifies descending sort order of substring tokens.

GS status

Indicates an invalid move specification using the specified variable.

Simple Variant

Copies a source value directly over the value of a receiving variable.

MOVE expression target_variable
Option Description

expression

The source value.

target_variable

The receiving variable.

If the length of the source value is less than the length of the existing value of this variable, the characters of this existing value that are not overwritten are retained.

MoveDate

Obtains the current date and returns the result as a numeric value, in a specifiable format.

MOVEDATE variable [ FORMAT (CCYYMMDD | DDMMCCYY |
DDMMYY | MMDDCCYY | MMDDYY | YYMMDD) ]
Option Description

variable

A number-primitive variable, of length 6 or 8, without decimals, to receive the current date.

FORMAT

Specifies the format of the value, where the specifier is one of CCYYMMDD, DDMMCCYY, DDMMYY, MMDDCCYY, or MMDDYY

YYMMDD (This is the default, if this command option is not specified.)

MoveTime

Obtains the current time and returns the result as a numeric value in twenty-four hour format, in the form HHMMSShh (where HH is the hour, MM is the minute, SS is the second, and hh is the hundredth second).

MOVETIME variable
OptionDescription

variable

A number-primitive variable, of length 8, without decimals, to receive the current time.

Multiply

Multiplies the value of a numeric expression by the value of a number-primitive variable, and stores the result in that variable, or optionally in a specified result variable.

MULTIPLY expression variable [ GIVING variable ] [ ROUNDED ] [ GS status ]
Option Description

expression variable

The numeric expression and qualifier to multiply together. The qualifier also receives the result if the Giving command option is not specified. If the Giving option is specified then qualifier might be replaced by an expression.

(GIVING or GIV) variable

Directs the result to the specified qualifier.

(ROUNDED or ROU)

Rounds the result when truncation occurs.

GS status

Indicates arithmetic overflow using the specified variable.