Step 3 Create RDML function to display statuses and messages

LANSA Integrator

Step 3. Create RDML function to display statuses and messages

INT002 - Getting Started with Basic JSM Operations

In this step, you will create the RDML function needed to display the messages stored in the working list when executing JSM commands.

1.  Create a new function named iiiFN02 JSM Display, belonging to process iiiPRO01, where iii is your unique 3 characters. Make sure that the 'Enabled for RDMLX' checkbox is NOT checked. You do not need to specify a template.

2.  Create a function which will call iiiFN01, passing the working list WL_MSGS and then display the results in a browse list. Your code should look something like the following:

* =======================================================

* Copyright .....: (C) LANSA, 1989

* Process .......: IIIPRO01
* Function ......: IIIFN02
* Created by ....: PCXUSER
* Created on ....: 08/06/20 at 14:38:31
* Description ...: JSM Display
* =======================================================

* List definition to show messages
DEF_LIST NAME(#WL_MSGS) FIELDS(#JSMSTS #JSMMSG) TYPE(*WORKING)
DEF_LIST NAME(#BL_MSGS) FIELDS(#JSMSTS #JSMMSG)

FUNCTION OPTIONS(*DIRECT)

CALL PROCESS(*DIRECT) FUNCTION(iiiFN01) PASS_LST(#WL_MSGS)

SELECTLIST NAMED(#WL_MSGS)
ADD_ENTRY TO_LIST(#BL_MSGS)
ENDSELECT

DISPLAY BROWSELIST(#BL_MSGS)
 

3.  Save and compile your iiiFN02 function.