Copy From Main Storage Dump (CPYFRMMSD)

The Copy From Main Storage Dump (CPYFRMMSD) command copies a main storage dump (MSD) from the Licensed Internal Code (LIC) MSD library to a stream file.

Restrictions:

Parameters

Keyword Description Choices Notes
DUMPID Dump identifier 0-9999, *SELECT Required, Positional 1
TOSTMF To stream file Path name Required, Positional 2
REPLACE Replace file *NO, *YES Optional

Dump identifier (DUMPID)

Specifies the identifier of the main storage dump to be copied.

*SELECT
A list of all main storage dumps available in the LIC MSD library is shown. You can select the main storage dump to copy.

Note: This value is valid only when the CPYFRMMSD command is called interactively.

0-9999
Specify the identifier of the main storage dump to be copied.

To stream file (TOSTMF)

Specifies the path name of the stream file to which the main storage dump is copied. All directories in the path name must exist. New directories are not created. If the stream file does not exist, it is created.

For more information on specifying path names, refer to "Object naming rules" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

Replace file (REPLACE)

Specifies whether the copy main storage dump operation replaces a stream file if a stream file with the specified name already exists. If the stream file does not exist, it is created.

*NO
No main storage dump data is copied and an error message is signalled if the file already exists.
*YES
The main storage dump data replaces any existing stream file data.

Examples

CPYFRMMSD DUMPID(1) TOSTMF('/My_MSDs/MSDFile') REPLACE(*YES)

This command copies the data contained in the main storage dump with identifier 1 to a stream file named /My_MSDs/MSDFile. If this stream file already exists, it will be replaced.

Error messages

*ESCAPE Messages

CPF7206
&4 ended abnormally. Completion code &2 qualifier &3.
CPF7210
No main storage dump is available.
CPF7212
Main storage dump identifier &1 is not found.
CPF7215
System Service Tools already active in this process.
CPF7218
Not authorized to run &2 command.
CPF7218
Not authorized to run &2 command.
CPF7220
Option *SELECT is only valid if the command is being run interactively.
CPFA0D4
File system error occurred. Error number &1.