z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


C socket API: Non-reentrant modules

z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
SC27-3660-00

You must make additions to the compile step of your cataloged procedure to compile a non-reentrant module. The following lines describe these additions. Cataloged procedures are included in the IBM-supplied samples for your MVS™ system.

Note: Compile all C code source using the def(MVS) preprocessor symbol.
  • Add the following line as the first //SYSLIB DD statement:
    //SYSLIB DD  DSN=SEZACMAC,DISP=SHR
  • Add the following //USERLIB DD statement:
    //USERLIB DD  DSN=USER.MYPROG.H,DISP=SHR
The following lines describe the additions that you must make to the link-edit step of your cataloged procedure to link-edit a non-reentrant module.
  • To link-edit programs that use C sockets library functions, add the following statement as the first //SYSLIB DD statement:
    //SYSLIB DD  DSN=SEZACMTX,DISP=SHR
Figure 1 shows a sample JCL to be used when compiling non-reentrant modules. Modify the lines to conform to the naming conventions of your site:
Figure 1. Sample JCL for compiling non-reentrant modules.
//COMPIT   JOB ,COMPILE,MSGLEVEL=(1,1)
//********************************************************************
//*                                                                  *
//*  SAMPLE JCL THAT COMPILES A TEST PROGRAM  AS NORENT              *
//*       USING THE C/C++ COMPILER C/MVS IN NON-OE ENVIRONMENT       *
//*  INPUT  : USER71.TEST.SRC(&INFILE)                               *
//*  OUTPUT : USER71.TEST.OBJ(&OUTFILE)                              *
//*                                                                  *
//********************************************************************
//*
//CPPC PROC CREGSIZ='4M',
//   INFILE=CTEST,
//   OUTFILE=CTEST,
//   CPARM1=NORENT,
//   CPARM2='LIS,SO,EXP,OPT,DEF(MVS)',
//   DCB80='(RECFM=FB,LRECL=80,BLKSIZE=3200)',
//   DCB3200='(RECFM=FB,LRECL=3200,BLKSIZE=12800)',
//   LIBPRFX1='CEEL.OSV2R7',
//   LIBPRFX2='CEE.OSV2R7',
//   COMPRFX='CBC.OSV2R7'
//*
//*----------------------------------------------------
//*  COMPILE STEP:
//*----------------------------------------------------
//COMPILE EXEC PGM=CCNDRVR,PARM=('&CPARM1','&CPARM2'),
//   REGION=&CREGSIZ
//STEPLIB  DD  DSNAME=&LIBPRFX1..SCEERUN,DISP=SHR
//         DD  DSNAME=&COMPRFX..SCBCCMP,DISP=SHR
//SYSMSGS  DD  DUMMY,DSNAME=&COMPRFX..SCBC3MSG(EDCMSGE),DISP=SHR
//SYSIN    DD  DSNAME=USER71.TEST.SRC(&INFILE),DISP=SHR


//         DD DSN=&LIBPRFX2..SCEEH.H,DISP=SHR
//SYSLIN   DD  DSNAME=USER16.TEST.OBJ(&OUTFILE),DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSCPRT  DD  SYSOUT=*
//SYSUT1   DD  UNIT=VIO,SPACE=(32000,(30,30)),DCB=&DCB80
//SYSUT5   DD  UNIT=VIO,SPACE=(32000,(30,30)),DCB=&DCB3200
//SYSUT6   DD  UNIT=VIO,SPACE=(32000,(30,30)),DCB=&DCB3200
//SYSUT7   DD  UNIT=VIO,SPACE=(32000,(30,30)),DCB=&DCB3200
//SYSUT8   DD  UNIT=VIO,SPACE=(32000,(30,30)),DCB=&DCB3200
//SYSUT9   DD  UNIT=VIO,SPACE=(32000,(30,30)),
//             DCB=(RECFM=VB,LRECL=137,BLKSIZE=882)
//SYSUT10  DD  SYSOUT=*
//*
//    PEND
//    EXEC PROC=CPPC

Figure 2 shows a sample JCL to be used when linking non-reentrant modules. Modify the lines to conform to the naming conventions of your site:

Figure 3 shows JCL to be used when running non-reentrant modules. Modify the lines to conform to the naming conventions of your site:
Figure 3. Sample JCL for running non-reentrant modules.
//RUNTST  JOB ,RUN,MSGLEVEL=(1,1),CLASS=A,REGION=4096K
//********************************************************************
//*                                                                  *
//*  SAMPLE JCL THAT RUNS A TEST PROGRAM, CTEST                      *
//*                                                                  *
//********************************************************************
//S1  EXEC PGM=CTEST
//STEPLIB DD DSN=CEEL.OSV2R7.SCEERUN,DISP=SHR
//        DD DSN=USER71.TEST.LMOD,DISP=SHR
//SYSPRINT DD  SYSOUT=*
Note: For more information about compiling and linking, see z/OS XL C/C++ Compiler and Runtime Migration Guide for the Application Programmer.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014