15.00 - #endif /* MLDNFYXT_H */Compiling and Linking Routines - MultiLoad

Teradata MultiLoad Reference

prodname
MultiLoad
vrm_release
15.00
category
Programming Reference
featnum
B035-2409-034K

#endif /* MLDNFYXT_H */Compiling and Linking Routines

Note: For a description of the syntax diagrams used in this book, see Appendix A: “How to Read Syntax Diagrams.”

SPARC Systems Running Oracle Solaris

To compile and link source files into a shared object module for INMOD or notify exit routines on a SPARC client system running Oracle Solaris, use the following syntax:

Compile Syntax

where

 

Syntax Element

Description

cc

Call to the program that invokes the UNIX native C compiler

-G

Linker option that generates a shared object file

-KPIC

Compiler option that generates Position Independent Code for all user exit routines

-o

Switch to the linker

shared-object-name

Name of shared object file

 

This is the name specified as the:

  • INMOD modulename parameter in the IMPORT of the Teradata MultiLoad job script
  • EXIT name parameter of the NOTIFY option in the BEGIN MLOAD and BEGIN DELETE MLOAD of the Teradata MultiLoad job script
  •  

    The shared-object-name can be any valid UNIX file name.

    sourcefile

    UNIX file name of the source file for the INMOD or notify exit routine

    AMD Opteron Systems Running Oracle Solaris

    To compile and link source files into a shared object module for INMOD or notify exit routines on an Opteron client system running Oracle Solaris, use the following syntax:

    Compile Syntax

    where

     

    Syntax Element

    Description

    cc

    Call to the program that invokes the native UNIX C compiler

    -dy

    Specifies to use dynamic linking

    -G

    Produces a shared object-enabled for use with the run‑time linker

    shared-object-name

    Name of the shared object file

     

    This is the name specified as the:

  • INMOD modulename parameter in the IMPORT of the Teradata MultiLoad job script
  • EXIT name parameter of the NOTIFY option in the BEGIN MLOAD and BEGIN DELETE MLOAD of the Teradata MultiLoad job script
  •  

    The shared-object-name can be any valid UNIX file name.

    -o

    Switch to the linker

    sourcefile

    UNIX file name of the source file for the INMOD or notify exit routine

    HP-UX PA RISC

    To compile and link source files into a shared object module for INMOD and notify exit routines on HP-UX PA RISC client systems, use the following syntax:

    Compile Syntax

    Link Syntax

    where

     

    Syntax Element

    Description

    -Aa

    Compiler option that enables the compiler to conform to ANSI standards

    -b

    Linker option that generates a shared object file

    -c

    Compile-only option (does not link)

    cc

    Call to the program that invokes the native UNIX C compiler

    -D_HPUX_SOURCE

    Enables the compiler to access macros and typedefs that are undefined by the ANSI standard but are provided by the HP-UX operating system

    ld

    Call to the program that invokes the native UNIX linker

    -o

    Switch to the linker

    objectfile

    Compiler-generated file used by the linker to generate shared-object-name

    shared-object-name

    Name of the shared object file

    This is the name specified as:

  • The INMOD modulename parameter of the IMPORT of the Teradata MultiLoad job script.
  • The EXIT name parameter for the NOTIFY option of the BEGIN MLOAD and BEGIN DELETE MLOAD of the Teradata MultiLoad job script.
  • The shared-object-name can be any valid UNIX file name.

    sourcefile

    UNIX file name(s) of the source file(s) for the INMOD or notify exit routine

    +u1 (number 1, not a lowercase L)

    Compiler option that allows pointers to access non‑natively aligned data

    +z

    Compiler option that generates Position Independent Code for all user exit routines

    HP-UX Itanium

    To compile and link source files into a shared object module for INMOD and notify exit routines on HP-UX Itanium-based clients, use the following syntax.

    Compile Syntax

    where

     

    Syntax Element

    Definition

    -c

    Compiles one or more source files but does not enter the linking phase

    cc

    Invokes the native UNIX C compiler

    -D_REENTRANT

    Ensures that all the Pthread definitions are visible at compile time

    +DD64

    Generates 64-bit object code for PA2.0 architecture

    inmod.c

    A C source module for the INMOD

    +u1 (number 1, not lowercase L)

    Compiler option that allows pointers to access non-natively aligned data

    Use the following syntax example to link the object modules on HP-UX Itanium into the shared object.

    Link Syntax

    where

     

    Syntax Element

    Definition

    -b

    Linker option that generates a shared object file

    inmod.o

    Object module derived from the compile step.

    inmod.so

    Specifies the resulting shared object module. This is the user-specified name in the IMPORT command. Only .so and .sl files are valid as INMOD.

    Note: Object modules can be linked into shared objects or shared libraries (i.e., .so or .sl extension respectively) on HP-UX Itanium.

    ld

    Invokes the UNIX linker editor

    -lc

    Searches a library lib.a, libc.so, or libc.sh

    -n

    Generates an executable with file type SHARE_MAGIC. This option is ignored in 64-bit mode.

    -o

    Specifies the output filename; default is a.out

    IBM AIX

    To compile and link source files into a shared object module for INMOD and notify exit routines on IBM AIX client systems, use the following syntax:

    Compile Syntax

    where

     

    Syntax Element

    Description

    cc

    Call to the program that invokes the native UNIX C compiler

    -o

    Switches to the linker

    -qmkshrobj

    Creates a shared object from the generated object files.

    shared-object-name

    Name of the shared object file

    The shared-object-name can be any valid UNIX file name. This is the name specified as:

  • The INMOD modulename parameter of the IMPORT of the Teradata MultiLoad job script.
  • The EXIT name parameter for the NOTIFY option of the BEGIN MLOAD and BEGIN DELETE MLOAD of the Teradata MultiLoad job script.
  • sourcefile.c

    UNIX file name(s) of the source file(s) for the INMOD or notify exit routine

    LINUX

    To compile and link source files into a shared object module for INMOD or notify exit routines on LINUX client systems, use the following syntax.

    Note: Be sure to compile the INMOD and notify exit routines in 32-bit mode so they are compatible with Teradata MultiLoad.

    Compile Syntax

    where

     

    Syntax Element

    Description

    gcc

    Call to the program that invokes the native C compiler

    -m32

    Generates code for a 32-bit environment. Sets int, long, and pointer to 32 bits.

    -shared

    Flag that produces a shared object that can then be linked with other objects to form an executable

    -fPIC

    Compiler option that generates Position Independent Code for all user exit routines

    -o

    Output file name

    sourcefile

    File name(s) of the source file(s) for the INMOD or notify exit routine

    shared-object-name

    Name of the shared object file

    The shared-object-name can be any valid file name. This is the name specified as:

  • The INMOD modulename parameter of the IMPORT of the Teradata MultiLoad job script.
  • The EXIT name parameter for the NOTIFY option of the BEGIN MLOAD and BEGIN DELETE MLOAD of the Teradata MultiLoad job script.
  • Note: For a description of the syntax diagrams used in this book, see Appendix A: “How to Read Syntax Diagrams.”

    IBM z/OS

    To compile and link source files into a DLL for INMOD or notify exit routines on IBM z/OS client systems, use the following syntax:

    Compile Syntax

    where

     

    Syntax Element

    Description

    -o

    Specifies the output of linked module.

    "MVS.PDSE.LOAD(module_name)"

    MVS data set, which must be Z/OS PDSE format. Module_name is the name of the executable load module, it is limited to eight characters.

    "//MVS.PDSE.C(source_name.c)"

    MVS data set. The source file for the INMOD or notify exit routine.

    -W c,dll,expo

    Options passed to the compiler phase to indicate that the source is to be compiled as a dll with all functions exported.

    -W l,dll

    Options passed to the link-edit phase to indicate that the module is linked as a dll.

    Note: For a description of the syntax diagrams used in this book, see Appendix A: “How to Read Syntax Diagrams.”

    z/Linux

    To compile and link source files into a shared object module for INMOD and notify exit routines on z/Linux client systems, use the following syntax:

    Compile Syntax

    where

     

    Syntax Element

    Description

    gcc

    Call to the program that invokes the native C compiler

    -m31

    Generates code for a 32-bit environment

    -shared

    Flag that produces a shared object that can then be linked with other objects to form an executable

    -fPIC

    Compiler option that generates Position Independent Code for all user exit routines

    -o

    Output file name

    sourcefile

    UNIX file name(s) of the source file(s) for the INMOD or notify exit routine

    shared-object-name

    The shared-object-name can be any valid file name. This is the name specified as:

  • The INMOD modulename parameter of the IMPORT of the Teradata MultiLoad job script.
  • The EXIT name parameter for the NOTIFY option of the BEGIN MLOAD and BEGIN DELETE MLOAD of the Teradata MultiLoad job script.
  • Note: For a description of the syntax diagrams used in this book, see Appendix A: “How to Read Syntax Diagrams.”