Open/Close Example
Use this example code to test that your install has been successful.
Opens and closes the connection to the Java Service Manager.
********** Beginning of RDML commands **********
FUNCTION OPTIONS(*DIRECT)
**********
DEFINE FIELD(#JSMSTS) TYPE(*CHAR) LENGTH(20)
DEFINE FIELD(#JSMMSG) TYPE(*CHAR) LENGTH(255)
**********
********** Open service
**********
USE BUILTIN(JSM_OPEN) TO_GET(#JSMSTS #JSMMSG)
**********
IF COND('#JSMSTS *NE OK')
DISPLAY FIELDS((#JSMSTS) (#JSMMSG))
ENDIF
**********
********** Close service
**********
USE BUILTIN(JSM_CLOSE) TO_GET(#JSMSTS #JSMMSG)
IF COND('#JSMSTS *NE OK')
DISPLAY FIELDS((#JSMSTS) (#JSMMSG))
ENDIF
********** End of RDML commands **********