Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

MOVE - Copy and delete message unit

&pagelevel(5)&pagelevel

Function

The //MOVE statement allows the user to copy message units, with or without the associated documentation lines, from one message file to another or to a different location within the same file. Unlike the COPY function, the MOVE function also deletes the source area.

Each message unit is identified by means of its message code. It is possible to move more than one message unit at a time by specifying a message class or a message range in the MSG-ID operand. If the value *DOCUMENTATION is specified in the INFORMATION operand, the documentation lines defined in the specified message range are also moved.

If the source file for the MOVE procedure is identical to the target file, new message codes must be defined in the TO-MSG-ID operand. It is possible to move message units between any two message files, irrespective of the file that is currently open. The FROM-FILE and TO-FILE operands permit access to these files; the current message file remains open and, if it is neither the source file nor the target file, is not changed.

If languages are specified explicitly in the operand INFORMATION=*MESSAGES(...), only the texts (message, meaning and response) in these languages are moved to the target message unit. If the target unit does not exist, it is created with the message attributes (access methods, output destination, ...) of the source message unit. If the target message unit already contains a text with the same message code and language identifier, the text of the target message unit is overwritten with the text of the source message unit.
If this occurs in interactive mode, an error message is issued asking the user whether or not the existing message unit is to be overwritten.
In batch jobs and procedures, the specified message file components are not moved and processing is continued, unless OVERWRITE=*YES was specified in the //MOVE or //MODIFY-OPTION statement.

If the only difference between the texts is the language, the text is appended to the contents of the target message unit.

Once all the language-dependent components have been deleted from a message unit by the //MOVE statement, the remaining message attributes and thus the message unit itself are deleted automatically.

Differences compared with the //MOVE statement in menu mode

The //MOVE statement that can be entered in the command area of the screen mask differs from the //MOVE statement in command procedures in that

  • in menu mode, the operand value *PANEL-REQUEST can be assigned to any operand

  • an additional value can be specified for the MSG-ID operand

  • the OVERWRITE operand is not available in menu mode.

For further details, see section “Special features of statements in menu mode”.

 

Format

MOVE                                                                                                                                                             

MSG-ID = *ALL / *CLASS(...) / *INTERVAL(...) / list-poss(2000): <name 7..7>


*CLASS(...)



|

MSG-CLASS = <name 3..3>


*INTERVAL(...)



|

FROM = <name 7..7>



|

,TO = <name 7..7>

,INFORMATION = *MESSAGES(...) / *ALL / list-poss(4): *DOCUMENTATION / *COMPONENT-ID /





*CORRECTION-INFO / *MESSAGES(...)


*MESSAGES(...)



|

LANGUAGES = *ALL / list-poss(8): <name 1..1>

,FROM-FILE = *CURRENT / <filename 1..54>

,TO-MSG-ID = *SAME / *CLASS(...) / <alphanum-name 4..7 with-wild>


*CLASS(...)



|

MSG-CLASS = <name 3..3>

,TO-FILE = *CURRENT / <filename 1..54>

,OVERWRITE = *STD / *YES / *NO

Operands

MSG-ID = *ALL / *CLASS(...) / *INTERVAL(...) / list-poss(2000): <name 7..7>
Specifies the message codes of one or more message units of the open message file that are to be copied and then deleted from the source file.
If INFORMATION=*DOCUMENTATION is specified, the documentation lines defined for these message codes are also moved.

MSG-ID = *ALL
All message components defined in the INFORMATION operand are moved. This operand value may be specified only if the TO-MSG-ID operand is assigned the value *SAME.

MSG-ID = *CLASS(...)
All message components of the specified message class are moved.

MSG-CLASS = <name 3..3>
Specifies the three-letter message class.

 

MSG-ID = *INTERVAL(...)
All message components within this message range are moved. If the message range contains more than one message class, the value *SAME must be assigned to the TO-MSG-ID operand.

FROM = <name 7..7>
Specifies the first message code of the message range.

TO = <name 7..7>
The full seven-character message code must be specified.

MSG-ID = list-poss(2000): <name 7..7>
Specifies the full message code of a message component that is to be moved. If a list of message codes is specified, the TO-MSG-ID operand must be assigned the value *SAME. Several message codes may be specified as a list.

INFORMATION = *MESSAGES(...) / *ALL / list-poss(2000): *MESSAGES(...) /*DOCUMENTATION / *COMPONENT-ID / *CORRECTION-INFO
Specifies the message components to be moved.

INFORMATION = *MESSAGES(...)
Specifies message units that are to be moved. The message units are selected via the MSG-ID operand.

LANGUAGES = *ALL / list-poss(8): <name 1..1>
Specifies the languages of the message, meaning and response texts to be moved.

LANGUAGES = *ALL
The entire message unit is moved, including all message attributes, inserts, insert attributes and texts.

LANGUAGES = list-poss(8): <name 1..1>
Message texts and/or meaning and response texts in the selected language(s) are moved. The message attributes and insert attributes of the source message unit are moved to the target message unit only if the latter does not already exist. Otherwise the following the message MSME108 is output.

INFORMATION = *ALL
All message file components (message units and documentation lines) are moved. If MSG-ID = *ALL is specified, all the contents of the message file are moved.

INFORMATION = *DOCUMENTATION
All documentation lines whose message codes are within the selected range (MSG-ID operand) are transferred. If other defined message ranges overlap the specified message range, their documentation lines are likewise moved.

Example

MSG-ID = *INTERVAL (TST1500-TST1599).
The documentation lines of the message ranges (TST1500-TST1510), (TST1000-TST1999), (TST1000-TST1500), TST1510, ... are moved.

MESSAGES = *CORRECTION-INFO / *COMPONENT-ID
These operands are reserved for internal use with the manufacturer.

 


FROM-FILE = *CURRENT / <filename 1..54 without-gen-vers>
Name of the message file from which the specified message components (MSG-ID operand) are to be transferred.

The operand value *CURRENT refers to the current message file, i.e. the message file last opened using the //OPEN-MSG-FILE statement. The file must have been opened in UPDATE mode.

TO-MSG-ID = *SAME / *CLASS(...) / <alphanum-name 4..7 with-wild>
Specifies the new message code for the message components once they have been moved to the target area.

TO-MSG-ID = *SAME
Once moved, the message components retain their original message code. The value *SAME must not be specified if message components are being moved to a different location within the same message file. The value *SAME must be specified if the MSG-ID operand is assigned a list of message codes, the value *ALL or message codes from several message classes.

TO-MSG-ID = *CLASS(...)
Specifies a new message class for the message components to be moved. The message numbers remain unchanged.

MSG-CLASS = <name 3..3>
Specifies the new three-letter message class.

TO-MSG-ID = <alphanum-name 4..7 with-wild>
The new message code is specified either in full or as a partially qualified name containing wildcards. The partial name determines the first part of the new message code; the remaining characters, symbolized by *, are transferred unchanged from the original message code.

Example

See the TO-MSG-ID operand of the //COPY statement and the following examples.

TO-FILE = *CURRENT / <filename 1..54 without-gen-vers>
Specifies the message file to which the message components are to be moved.

TO-FILE = *CURRENT
The assignment TO-FILE = *CURRENT defines the message file last opened with the //OPEN-MSG-FILE statement as the target file. The target file must have been opened in UPDATE mode.

TO-FILE = <filename 1..54 without-gen-vers>
Explicit specification of the message file into which the message components are to be moved.

OVERWRITE = *STD / *YES / *NO
Specifies whether the message component of the source file may overwrite an existing area of the target file. The default value *STD corresponds to the value last specified in the OVERWRITE operand of the //MODIFY-OPTION statement.

Example

//MOVE MSG-ID=*INTERVAL(TST000,TST0009),-
INFORMATION=(MESSAGE,DOCUMENTATION), TO-MSG-ID=TTT*, OVERWRITE=*NO

 

Examples for the MSG-ID and TO-MSG-ID operands

Example A:

The statement has the following effect:

//MOVE MSG-ID=*INTERVAL(CCCA000,CCCI999), TO-MSG-ID=DDD0*

CCCA001, CCCA002, ...

->

DDD0001, DDD0002, ...

CCCBAAA, CCCBAAB, ...

->

DDD1AAA, DDD1AAB, ...

.

.


.

CCCE100, CCCE101, ...

->

DDD4100, DDD4101, ...

.

.


.

CCCI998, CCCI999

->

DDD8998, DDD8999


The message class or partially qualified message code defined in the TO-MSG-ID operand is transferred to the new message code. The remaining part of the original message code appears in place of the wildcard character *.

Example B:

The statement has the following effect:

//MOVE MSG-ID = *INTERVAL(CCCA000,CCCI999), TO-MSG-ID=CCC0*

The four message codes <CCCA010, CCCA800, CCCD033, CCCH000> to be renamed as <CCC0010, CCC0800, CCC3033, CCC7000> and not as <CCC0010, CCC0800, CCC1033, CCC2000>.

If necessary, the part of the message number that belongs to the defined part of the new message code (in “CCC0*”, this is “0”), is incremented automatically by the predefined amount. The message class is not incremented.

 

Example C:

The following combinations are possible:

MSG-ID

TO-MSG-ID

Function                                          

Insufficient range
specification

*CLASS(CCC)

*CLASS(DDD)/

DDD*

New message class

Message numbers are retained

DDD0*

(CCCH403,
CCCH503,
CCCH603)

*SAME

*SAME

All entries
except *SAME

*INT(CCC0000-
CCC4999)

*CLASS(DDD)/

DDD*

CCC5*
CCC50*

DDD0000, ...... ,DDD4999

DDD0000, ...... ,DDD4999

CCC5000, ...... ,CCC9999
CCC5000, ...... ,CCC9999

CCC6* /

CCC51*

*INT(CCC0000,
CCC0599)

*CLASS(DDD)/

DDD*

DDD5*
DDD55*

DDD555*

DDD0000, ...... ,DDD0599

DDD0000, ...... ,DDD0599

DDD5000, ...... ,DDD5599
DDD5500, ...... ,DDD5599

DDD5600, ...... ,DDD5599
DDD6A00, ...... ,DDD6A99
DDD5550, ...... ,DDD5599
DDD56A0, ...... ,DDD5999
DDD6AA0, ...... ,DDD6BE9

DDD95*

The message range of the target file must be at least as large as that of the source file.