You should take note of the special considerations listed below when using CPI-C applications on BS2000 systems.
Compilation, linking, starting on BS2000 systems
The following applies when compiling and linking CPI-C applications on BS2000 systems:
Every CPI-C program requires the following include file in order to allow compilation:
#include <upic.h>
The include file is located in the library
$
userid.SYSLIB.UTM-CLIENT.070
.A CPI-C program comprises a set of modules which must be linked to form a single program. The following objects are required for linking:
main program of the user
User modules
For programs that wish to use CMX:
The system libraries $sysid
.SYSLNK.CRTE
and$sysid.SYSLIB.CMX.014
The libraries $userid
.SYSLIB.UTM-CLIENT.070.WCMX
and$
userid.SYSLIB.UTM-CLIENT.070
For programs that wish to use Sockets:
The system library $sysid
.SYSLNK.CRTE
The library $userid
.SYSLIB.UTM-CLIENT.070
You start a CPI-C program on a BS2000 system in the same way as any other program using the command
START-EXECUTABLE-PROGRAM
.
In doing so you have to specify SHARE-SCOPE=SYSTEM-MEMORY (default at start time of the task), *NONE must not be specified!
Runtime environment on BS2000 systems
Execution of CPI-C applications on BS2000 systems is controlled by the job variables. The link names of the job variables are listed in the table on "Runtime environment, linking, starting". You can set these as follows, for example:
/SET-JV-LINK LINK-NAME=*UPICPAT,JV-NAME=UPICPATH /MODIFY-JV JV-CONTENTS=*LINK(LINK-NAME=UPICPAT),SET-VALUE='prefix' /SET-JV-LINK LINK-NAME=*UPICFIL,JV-NAME=UPICFILE /MODIFY-JV JV-CONTENTS=*LINK(LINK-NAME=UPICFIL),SET-VALUE='filename' /SET-JV-LINK LINK-NAME=*UPICLOG,JV-NAME=UPICLOG /MODIFY-JV JV-CONTENTS=*LINK(LINK-NAME=UPICLOG),SET-VALUE='prefix' /SET-JV-LINK LINK-NAME=*UPICTRA,JV-NAME=UPICTRACE /MODIFY-JV JV-CONTENTS=*LINK(LINK-NAME=UPICTRA),SET-VALUE='option'
Note that the link name assignment established with SET-JV-LINK is lost after LOGOFF. SET-VALUE='-r 128' controls the trace (see section “UPIC trace”).