Page History
...
- 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:
SUBROUTINE NAME(CHECK_STS) PARMS(#W_HDLE)*DEFINE FIELD(#MSGDTA) TYPE(*CHAR) LENGTH(132)DEFINE FIELD(#W_HDLE) TYPE(*CHAR) LENGTH(4)*IF COND('#JSMSTS *NE OK')*#MSGDTA := 'Error Status Code: ' + #JSMSTSMESSAGE MSGID(DCM9899) MSGF(DC@M01) MSGDTA(#MSGDTA)#MSGDTA := 'Error Message: ' + #JSMMSGMESSAGE MSGID(DCM9899) MSGF(DC@M01) MSGDTA(#MSGDTA)ENDIF*Def_ListName(#WL_MSGS)Fields(#JSMSTS#JSMMSG)Type(*WORKING)ENTRYS(*max)Add_EntryTo_List(#WL_MSGS)ENDROUTINE 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)- Save and compile function iiiFN01.
...