RampMessage Event

RAMP-NL

RampMessage Event


A message is issued by RAMP or the underlying 5250 application.

Parameters

uMessageType

Char 256

String that specifies a type of message as per table below.

uMessageText

Char 132

String that contains the text of the message.

 

This table illustrates the available message types and their causes:

Type

Cause

Comments

VF_ERROR

Fatal errors.

For whatever reason, RAMP has failed in the process of executing a request.

For example, a failed navigation request.

VF_INFO

A message from the 5250 application.

Any message sent by the actual 5250 program running under the covers.

For example, failed validation rules.

VF_INIT_ERROR

The Screen wrapper failed to initialize.

This usually happens when the session user object type supplied doesn't yield a defined session.

Alternatively, if you haven't set the uCommand property (see Screen Wrapper Fundamentals).

VF_WAITCONNECTION

Issued every ½ second while newlook is attempting a connection with the host.

Connections usually complete very quickly. This type is provided only when for whatever reasons the connection is expected to take a little while.

VF_UNKNOWN_FORM

During navigation, an undefined form was detected.

 

Remarks

It is entirely up to the developer how to handle different types of errors.

To cause a message to pop up automatically, use the #com_owner.avshowmessages method. During development it might be useful to show the underlying newlook screen when a fatal error occurs. You can do so by changing the Screen wrapper's visibility and/or display position.

Example

Evtroutine Handling(#screen wrapper.uRampMessage) Umessagetype(#MsgType) Umessagetext(#MsgText)

Case (#msgtype.value)

When Value_Is('= VF_ERROR')

* Optional. In design mode, making the screen wrapper visible allows you to show the 5250 screen.Set Com(#myscreen_wrapper) Visible(True)

When Value_Is('= VF_INFO')

Message Msgid(dcm9899) Msgf(dc@m01) Msgdta(#msgtext.value)

When Value_Is('= VF_UNKNOWN_FORM')

Message Msgid(dcm9899) Msgf(dc@m01) Msgdta(#msgtext.value)

When Value_Is('= VF_INIT_ERROR')

Message Msgid(dcm9899) Msgf(dc@m01) Msgdta(#msgtext.value)

Endcase

Endroutine