Figure 11. Checking the result of an API call
/* Error return code parameter for the APIs--------------------------*/ DCL VAR(&ApiErrDS) TYPE(*CHAR) LEN(256) DCL VAR(&aProvided) TYPE(*INT) STG(*DEFINED) LEN(4) DEFVAR(&ApiErrDS) DCL VAR(&aAvail) TYPE(*INT) STG(*DEFINED) LEN(4) DEFVAR(&ApiErrDS 5) DCL VAR(&aMsgid) TYPE(*CHAR) STG(*DEFINED) LEN(7) DEFVAR(&ApiErrDS 9) DCL VAR(&aReserved) TYPE(*CHAR) STG(*DEFINED) LEN(1) DEFVAR(&ApiErrDS 16) DCL VAR(&aMsgdta) TYPE(*CHAR) STG(*DEFINED) LEN(112) DEFVAR(&ApiErrDS 17) /* Api call with &ApiErrDS as a parameter ---------------------------*/ CALL PGM(QUSPTRUS) PARM(&uSpaceName &HeaderPtr &ApiErrDS)