The Duplicate Message Description (DUPMSGD) Comman

CL
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

The Duplicate Message Description (DUPMSGD) command allows you to duplicate a message in a message file. The duplicated message can be in the same or different message files. If the message is duplicated to a different message file, the message ID can be the same or different. This command duplicates most of the parameters of a message.

The command uses four parameters. The first two are FROMID and FROMMSGF. These parameters specify the ID of an existing message in the message file. If the message ID or the message file does not exist, the command sends an escape message to your job.

The last two parameters, TOID and TOMSGF, specify the ID of the duplicated message and the name of the message file where the duplicate is to be added. The TOID parameter must specify a valid message ID or the special default value *FROMID. If you specify *FROMID, the message ID specified in the FROMID parameter is used. The TOMSGF must contain a valid message file name or the special default value *FROMMSGF. If the message ID specified in TOID is already in the message file specified in TOMSGF, the command sends an escape message to your job. You must change either the TOID or the TOMSGF parameter, or both, for the command to run successfully.

After the command completes, the message will be in the TOMSGF if there were no errors. You can then use the Work with Message Description (WRKMSGD) or Change Message Description (CHG-MSGD) commands to change the duplicated version of the message.

We encountered a quirk when we tested this command. If the default value (*FROMMSGF) is used in the to message file (TOMSGF) parameter, the library used to qualify the from message file (FROM-MSGF) parameter is not used to qualify the to message file, as you would expect. This forces you to qualify the TOMSGF parameter if the from message file library qualifier isn't in your library list or if the message file exists more than once in your library list.

Restrictions

The RANGE and REL validity parameters aren't duplicated; the defaults are taken.

A maximum of 40 field definitions for message data are duplicated.

Required Parameters

FROMID Specify the message ID to be duplicated.

FROMMSGF Specify the qualified name of the message file that contains the message identified in FROMID. The possible library values are:

*LIBL: The library list is used to locate the message file. library-name: Specify the name of the library that contains the message file.

message-file-name: Specify the name of the message file containing the message to be duplicated.

Optional Parameters

TOID Specify the message ID of the new message.

*FROMID: The message ID specified in FROMID is used. message-ID: Specify the message ID for the duplicated message.

TOMSGF Specify the qualified name of the message file to contain the new message identified in TOID. The possible library values are:

*LIBL: The library list is used to locate the message file.

library-name: Specify the name of the library that contains the message file.

*FROMMSGF: The message file is the same as the message file specified in FROMMSGF.

message-file-name: Specify the name of the message file that is to contain the new message.

Example

 DUPMSGD FROMID(UMS0001) + FROMMSGF(MYLIB/MYMSGF) + TOID(UMS0002) 

This command creates a duplicate of message UMS0001, which is contained in message file MYMSGF in library MYLIB. The new message ID is UMS0002, and it is placed into the same message file.

Source Members

 INFO: DUPMSGD (QATTINFO) CDO: TAAMSGJ (QATTCMD) CPP: TAAMSGJC (QATTCL) RPG: TAAMSGJR (QATTRPG) 

These tools are documented in Midrange Computing's QUSRTOOL Command Reference. The manual contains explanations and syntax diagrams for more than 300 useful tools.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: