Skip to main content
Omnitracs Knowledge Base

Get Message Information - OMGETMSG

Get Message Information (OMGETMSG) RI

Required Parameter Group:

1 Global Message Handle Input Packed(9,0)
2 Format Name Input Char(6)
3 Return Status Output Char(1)
4 Return Block Output Char(5002)

API Overview:
The Get Message Information API (OMGETMSG) is used to return detailed information about a QTRACS message. This API will be useful for external applications that need to retrieve one or more of the related 'parts' of a QTRACS message. Use of this API ensures backward compatibility in the future, and it insulates external applications from the complexities of the message data structures.

Required Parameter Group Details:
(1) Global Message Handle
INPUT; PACKED(9,0)
This parameter contains the global message handle (GMH) of the message.

(2) Format Name
INPUT; CHAR(6)
The format of the information to be returned. Valid values are:

MSG100 Message header information
MSG101 Message header information; take 2
MSG200 Message body in displayable form
MSG201 Message body in displayable form including body type
MSG210 Message body in external application form
MSG211 Message body in external application form including body type
MSG300 Message destination list; as entered by user, not fanned out
MSG400 Message to-list; fanned out to lowest level
MSG500 Message disposition information

(3) Return Status
OUTPUT; CHAR(1)
Status value returned to the caller will be set as follows:

0 Success, message found and information returned
1 Failure, message or related macro not found; no information returned
2 Failure, requested data block is invalid; no information returned
3 Success, message found and MSG400 returned for first 500 recipients (however > 500 exist).
A Failure, API failed when called remotely

(4) Return Block
OUTPUT; CHAR(5002)
Variable format data structure that returns information to the calling program based on the 'format name' parameter. If the 'return status' parameter is not '0', the contents of this return block are not reliable.

The supported data formats are shown in the shaded tables below.

MSG100 Data Format ( Message header information )

1-10 Source (sender) Char(10)
11-11 Source Type(V,A,H or U) Char(1)
12-12 Priority(0,1,2,3,4 or 9) Char(1)
13-13 Binary/Text/T2 Indicator(B, T or R) Char(1)
14-15 Macro Num, Binary Data Type, or T2 Data Type Packed(3,0)
16-17 Macro Version Number Packed(3,0)
18-19 Times to Transmit Packed(3,0)
20-22 Transmitted Message Length Packed(5,0)
23-23 Return Receipt Requested(1 or 0) Char(1)
24-33 Reply-to Designator Char(10)
34-39 Reply to GFMN Packed(11,0)
40-41 Latest Composite Status Zoned(2,0)

MSG101 Data Format ( Message header information : take 2 )

1-10 Source (sender) Char(10)
11-11 Source Type(V,A,H or U) Char(1)
12-12 Priority(0,1,2,3,4 or 9) Char(1)
13-13 Binary/Text/T2 Indicator(B, T or R) Char(1)
14-14 Macro Type(F=forward, R=return, Blank=other) Char(1)
15-16 Macro Num, Binary Data Type, or T2 Data Type Packed(3,0)
17-18 Macro Version Number Packed(3,0)
19-20 Times to Transmit Packed(3,0)
21-23 Transmitted Message Length Packed(5,0)
24-24 Return Receipt Requested(1 or 0) Char(1)
25-34 Reply-to Designator Char(10)
35-40 Reply to GFMN Packed(11,0)
41-42 Latest Composite Status Zoned(2,0)

MSG200 Data Format ( Message body in displayable form ) OBSOLETE

1-3 Displayable Message Length Packed(5,0)
4-3903 Message Body Char(3900)

MSG201 Data Format ( Message body in displayable form including body type )

1-3 Displayable Message Length Packed(5,0)
4-4 Message Body Type(T=text, B=binary, R=T2) Char(1)
5-3904 Message Body Char(3900)

The 3900-character Message Body field returned in the MSG201 block is comprised of up to 100 text lines. Each of these 'displayable' lines is 39 characters in length (not 38). The first character is a hex character that controls the display attribute on a 5250 terminal (or emulation session). Characters 2-39 include the actual displayable text.

MSG210 Data Format ( Message body in external app. form ) OBSOLETE

1-3 External Full Field Message Length Packed(5,0)
4-1903 External Full Field Message Body Char(1900)

MSG211 Data Format ( Message body in external app. form including body type )

1-3 External Full Field Message Length Packed(5,0)
4-4 Message Body Type(T=text, B=binary, R=T2) Char(1)
5-1904 External Full Field Message Body Char(1900)

MSG300 Data Format ( Message destination list; as entered by user, not fanned out )

1-2 Number of Destinations(0-20) Packed(3,0)
3-582 Destination List Elements
Repeating blocks of 29 bytes each
Char(580)

Destination List Element

1-5 HMN (Unique for each element) Packed(9,0)
6-16 Destination Char(11)
17-17 Direction (Forward, Return, Local) Char(1)
18-23 Global Hub Reference Number Packed(11,0)
24-27 Completion Status Char(4)
28-29 Latest Composite Status Zoned(2,0)

MSG400 Data Format ( Message to-list; fanned out to lowest level )

1-2 Number of To-List Elements (<=500) Packed(3,0)
3-5002 To-List Identifiers (10 chars each) Char(5000)

MSG500 Data Format ( Message disposition information )

1-7 Sent Date/Time (GMT seconds) Packed(13,0)
8-14 Received Date/Time (GMT seconds) Packed(13,0)
15-21 Latest Status Date/Time (GMT seconds) Packed(13,0)
22-23 Latest Composite Status Zoned(2,0)
  • Was this article helpful?