z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


NCS defines NCSDEFS.H

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

The linkage editor and loader on MVS™ restrict the number of characters in an external name to eight characters or less. This means that if you are porting an existing non-MVS program, and it contains external references that are longer than eight characters, you need to redefine these references into unique, eight-character names. If you are writing new code on MVS and you create external references that are longer than eight characters, you also have to redefine these references into unique eight-character names.

A data set called NCSDEFS.H, contains the redefines of all the external references greater than eight characters in length that are part of the NCS RPC run-time library. This data set needs to be included in all of your code that uses NCS.

Figure 1 shows the lines of code that should be included in each NCS-based routine to maintain portability of your code.

Figure 1. Macro to maintain IBM® System/370 portability
#ifdef IBM370
#  include “ncsdefs.h”    /* NCS redefines for IBM 370.*/
#endif

To compile the code on MVS, define IBM370 to the compiler by using the compilation option DEFINE(IBM370). By isolating MVS-dependent sections of code, you can maintain code portability.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014