Function VSAM017: Get Server Job or Process Details
Name: VSAM017
Description: The following RDML function should be compiled for execution on the client and server systems.
FUNCTION OPTIONS(*DIRECT *HEAVYUSAGE);
DEFINE FIELD(#SJOBNAME) REFFLD(#JOBNAME) DEFAULT(*blanks);
DEFINE FIELD(#SUSER) REFFLD(#USER) DEFAULT(*blanks);
DEFINE FIELD(#SJOBNBR) REFFLD(#JOBNBR) DEFAULT(*blanks);
DEFINE FIELD(#RETCODE) TYPE(*CHAR) LENGTH(2);
IF COND('*ON_CLIENT_SYSTEM = Y');
USE BUILTIN(CALL_SERVER_FUNCTION) WITH_ARGS(*SSERVER_SSN *FUNCTION N Y) TO_GET(#RETCODE);
ELSE;
CHANGE FIELD(#SJOBNAME) TO(*JOBNAME);
CHANGE FIELD(#SUSER) TO(*USER);
CHANGE FIELD(#SJOBNBR) TO(*JOBNBR);
ENDIF;
EXCHANGE FIELDS(#SJOBNAME #SUSER #SJOBNBR);
RETURN;
Name: VSAM017
Description: The following RDML function should be compiled for execution on the client and server systems.
FUNCTION OPTIONS(*DIRECT *HEAVYUSAGE);
DEFINE FIELD(#SJOBNAME) REFFLD(#JOBNAME) DEFAULT(*blanks);
DEFINE FIELD(#SUSER) REFFLD(#USER) DEFAULT(*blanks);
DEFINE FIELD(#SJOBNBR) REFFLD(#JOBNBR) DEFAULT(*blanks);
DEFINE FIELD(#RETCODE) TYPE(*CHAR) LENGTH(2);
IF COND('*ON_CLIENT_SYSTEM = Y');
USE BUILTIN(CALL_SERVER_FUNCTION) WITH_ARGS(*SSERVER_SSN *FUNCTION N Y) TO_GET(#RETCODE);
ELSE;
CHANGE FIELD(#SJOBNAME) TO(*JOBNAME);
CHANGE FIELD(#SUSER) TO(*USER);
CHANGE FIELD(#SJOBNBR) TO(*JOBNBR);
ENDIF;
EXCHANGE FIELDS(#SJOBNAME #SUSER #SJOBNBR);
RETURN;