Previous Topic Next topic Print topic


MSG-SW

Send data or a message to the specified program trancode or subprogram.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Target:

IMS DC

Syntax:

[TP-]MSG-SW trancode|programname|dataname 
[errorpara]
... [screenname|recordname]
... [keyword[+keyword]...]

Syntax Rules:

  1. Allow the program to send invalid or empty screen values by specifying NORETRY with the NTRY keyword; use generated flags to test whether input data is valid.
  2. Use the PURG and NOPURG keywords to control how AMB sends messages. When issuing multiple inserts to the same destination before reaching a SYNC point, IMS sends the messages as one multi-segmented message. If you send the message via an Express PCB, AMB issues a PURG after the insert and sends it as one single-segmented message.
  3. Omitting screenname or recordname sends a message with a transaction code to the new program.
  4. When coding RECORD and recordname in conversational programs, and recordname differs from your application trancode, code:
    SYM1    % &recordname-TRANCODE = "trancode"
    

General Rules:

  1. Making both the sending and receiving program conversational passes data in the Commarea (SPA) to the new program (see TP-COMMAREA).
  2. MSG-SW lets a program send a message to itself. You might use this feature to break a long process into several small pieces.
  3. Remember to define an alternate IO PCB in the program specification block (PSB) and specify MODIFY=YES. See Program Control Blocks in online help for more information.

Parameters:

dataname

Name of data element

errorpara

User-defined error routine to perform when an abnormal condition occurs. Errorpara is positional; if omitted, code an asterisk (*) in its place.

keyword

Valid keywords are:

NOALTRESP

Default. Use an IO PCB, not an alternate response IO PCB to send a response to the terminal.

ALTRESP

Use an alternate response IO PCB to send a response to the terminal.

NOCONT

Default. Control returns to top of the Procedure Division of the sending program.

CONT

Control returns to the instruction following call execution, that is, the next statement after the MSG-SW.

CONTCOND

TP-CONTCOND determines if control passes to the next instruction or returns to the top of the program.

NOEXPRESS

Default. Do not send a message for abnormal program termination.

EXPRESS

Send a message at program termination.

NOENDCONV

Default. Do not blank out the TRANCODE in the SPA.

ENDCONV

Blank out the TRANCODE in the SPA.

SCREEN

Default. Input is a AMB-painted screen. Multisegment screens are not supported.

RECORD

Input is recordname. See also Considerations below.

NOPURG

Send all messages to the same destination as one multi-segmented message. Default with NOEXPRESS argument.

PURG

After inserting the message, send it as one single-segmented message. Default with EXPRESS keyword.

record-name

User-defined I/O area in Working-Storage. See also Considerations below.

screen-name

Screen name; must be literal (maximum 8 characters).

trancode| program-name

Literal name of destination program or transaction code identifying receiving program; can be a literal (maximum 8 characters) or a COBOL data name (minimum 9 characters).

Examples:

Send messages to another program; perform error routine when error occurs.
MSG-SW trancode PROCESS-ERRORS
Send messages and pass a screen record. Note that the asterisk (*) replaces the positional parameter errorpara.
MSG-SW trancode * SCRA
Send messages and pass a COBOL record.
MSG-SW trancode * WS-CUSTOMER RECORD
Previous Topic Next topic Print topic