Step 3. Add a Working list to save Status and Messages to the CHECK_STS Subroutine

INT001 - Getting Started with Basic JSM Operations

In this step, you will define a working list to store the status and message after executing each JSM statement to the CHECK_STS subroutine to indicate the function status as the JSM performs different operations.

1.      Since this is an RDMLX function, it cannot use a DISPLAY command or browse list. In the next step you will create an RDML function to call iiiFN01 and receive a working list containing messages. Define a working list  WL_MSGS containing fields JSMSTS and JSMMSG, at the end of the CHECK_STS subroutine and add entries to it.

         The RDMLX code might appear as follows:








#MSGDTA := 'Error Status Code: ' + #JSMSTS


#MSGDTA := 'Error Message: ' + #JSMMSG




Def_List Name(#WL_MSGS) Fields(#JSMSTS #JSMMSG) Type(*WORKING) ENTRYS(*max)

Add_Entry To_List(#WL_MSGS)



2.      In order to be able to call function iiiFN01 and pass and receive a working list, change the 'Function' command as follows

Function Options(*DIRECT) Rcv_List(#WL_MSGS)


3.      Save and compile function iiiFN01.