Sample Program
A Sample program and a macro to map the required parameters are distributed in the platform server SAMPLIB data set.
Establish addressability to the APIDSECT work area:
LA R10,WORK_APIDSECT_DATA POINT to APIDSECT USING APIDSECT,R10 . . . . . . . . . . . . . . WORK_APIDSECT_DATA DS CL(APIDSECT_LENGTH) . . . . . . . . . . . . . . COPY APIDSECT
Initialization functions:
* Setup Server Parameters XC WORK_APIDSECT_DATA,WORK_APIDSECT_DATA MVI API_SERVER_TRACE_FLAG,API_SERVER_TRACE_NO * Save DCB Address (DCB Must be open) LA R15,WORK_OUTPUT_DCB ST R15,API_OUTPUT_DCB_ADDR
Set PCCALL (Cross Memory Call) information:
MVI API_SERVER_TYPE,API_SERVER_TYPE_PCCALL Indicate PC MVC API_SERVER_STCNAME,=CL8'FUSION' Started Task Name
Or, set SNA information:
MVI API_SERVER_TYPE,API_SERVER_TYPE_SNA Indicate SNA MVC API_SERVER_LUNAME,=CL8'FUSNAPPL' Server APPLID MVC API_SERVER_ACBNAME,=CL8'FUSN' MY ACBNAME MVC API_SERVER_MODENAME,=CL8'#BATCH' Mode Name
Or, set TCP (IP Address) information:
MVI API_SERVER_TYPE,API_SERVER_TYPE_IPADDR Indicate IPADDR MVC API_SERVER_IPADDR,=CL15'127.0.0.1' Server IPADDR MVC API_SERVER_IPPORT,=CL5'46464' Server IP Port MVC API_SERVER_JOBNAME,=CL8'TCPIP' TCPIP STC Name
Or, set TCP (IP Name) information:
MVI API_SERVER_TYPE,API_SERVER_TYPE_IPNAME Indicate IPNAME MVC API_SERVER_IPNAME,=CL24'server.ip.name' Server IPName MVC API_SERVER_IPPORT,=CL5'46464' Server IP Port MVC API_SERVER_JOBNAME,=CL8'TCPIP' TCPIP STC Name
Create file transfer parameter addressability:
* Save Transfer Parameters address LA R15,WORK_API_PARAMETERS Point to Parameter Area ST R15,API_TRANSFER_PARM_ADDR Save in APIDSECT WORK_API_PARAMETERS DS 100CL82
Set transfer parameters:
MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'PROCESS,,TRANSFER,SEND' Set PROCESS LA R15,82(R15) Point to next parameter * MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'TYPE=TEXT' Set TYPE= LA R15,82(R15) Point to next parameter * MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'LF=LOCAL.FILE.NAME' Set FROM Dataset LA R15,82(R15) Point to next parameter * MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'RF=REMOTE.FILE.NAME' Set TO File name LA R15,82(R15) Point to next parameter * MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'NODE=ZOSSYSA' Set TO NODE LA R15,82(R15) Point to next parameter * MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'WAIT=YES' WAIT for transfer LA R15,82(R15) Point to next parameter * MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'TRY=1' Only Try 1 time LA R15,82(R15) Point to next parameter * MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'PROCNAME=APISEND' Process Name LA R15,82(R15) Point to next parameter * MVC 0(2,R15),=AL2(80) Set the Length MVC 2(80,R15),=CL80'DESCRIPTION=TestAPI' Description LA R15,82(R15) Point to next parameter
Terminate transfer parameters:
MVC 0(2,R15),=H'0' Indicate no more parms
Copyright © Cloud Software Group, Inc. All rights reserved.