Compile and Link Routines - FastExport

Teradata FastExport Reference

Product
FastExport
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2410
lifecycle
previous
Product Category
Teradata Tools and Utilities

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, OUTMOD, or notify exit routines on IBM z/OS client systems, use the following 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, OUTMOD, 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 linkedit phase to indicate that the module is linked as a dll.

z/Linux

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

where:

 

Syntax Element

Description

gcc

Call to the program that invokes the native C compiler

m31

Generates code for a 32bit 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

sharedobjectname

Specifies the resulting shared object module

This is the name specified as the:

  • INMOD modulename parameter in the IMPORT of the FastExport job script
  • OUTMOD modulename parameter of the EXPORT command of the FastExport job script
  • EXIT name parameter of the NOTIFY option in the BEGIN EXPORT command of the FastExport job script
  • The sharedobjectname can be any valid UNIX file name.

    AMD Opteron Systems Running Oracle Solaris

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

    where:

     

    Syntax Element

    Description

    cc

    Invokes the native UNIX C compiler

    dy

    Specifies to use dynamic linking

    G

    Specifies to create a shared object

    sourcefile

    Is a source module for the INMOD

    o

    Specifies the output file name

    sharedobjectname

    Specifies the resulting shared object module

    This is the name specified as the:

  • INMOD modulename parameter in the IMPORT of the FastExport job script
  • OUTMOD modulename parameter of the EXPORT command of the FastExport job script
  • EXIT name parameter of the NOTIFY option in the BEGIN EXPORT command of the FastExport job script
  • The sharedobjectname can be any valid UNIX file name.

    SPARC Systems Running Oracle Solaris

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

    where:

     

    Syntax Element

    Description

    gcc

    Call to the program that invokes the native UNIX C compiler

    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

    sourcefile

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

    o

    Switch to the linker

    sharedobjectname

    Name o f the shared object file

    This is the name specified as the:

  • INMOD modulename parameter in the IMPORT of the FastExport job script
  • OUTMOD modulename parameter of the EXPORT command of the FastExport job script
  • EXIT name parameter of the NOTIFY option in the BEGIN EXPORT command of the FastExport job script
  • The sharedobjectname can be any valid UNIX file name.

    HP‑UX PA RISC

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

    where:

     

    Syntax Element

    Description

    Aa

    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 not defined by the HPUX Operating System, but not the ANSI standard.

    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 sharedobjectname

    sharedobjectname

    Name of the shared object file

    This is the name specified as the:

  • INMOD modulename parameter in the IMPORT of the FastExport job script
  • OUTMOD modulename parameter of the EXPORT command of the FastExport job script
  • EXIT name parameter of the NOTIFY option in the BEGIN EXPORT command of the FastExport job script
  • The sharedobjectname 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

    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

    Use the following syntax example to compile a C INMOD on HPUX Itanium based clients.

    where:

     

    Syntax Element

    Definition

    cc

    Invokes the native UNIX C compiler

    +u1

    Compiler option that allows pointers to access nonnatively aligned data

    D_REENTRANT

    Ensures that all the Pthread definitions are visible at compile time

    +DD64

    Generates 64bit object code for PA2.0 architecture

    c

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

    inmod.c

    A C source module for the INMOD.

    Use the following syntax example to link the object modules on HPUX Itanium into the shared object.

    where:

     

    Syntax Element

    Definition

    ld

    Invokes the UNIX linker editor

    n

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

    b

    Linker option specified to generate a shared object file

    inmod.o

    Object module derived from the compile step

    lc

    Search a library libc.a, libc.so, or libc.sh

    o

    Specifies the output filename; default is a.out

    inmod.so

    Specifies the resulting shared object module
    This is the user specified name in the IMPORT command.

    Note: Object modules can be linked into shared objects or shared libraries (for example, .so or .sl extension respectively) on HPUX Itanium.

    IBM AIX

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

     

    where:

     

    Syntax Element

    Description

    cc

    Call to the program that invokes the native UNIX C compiler

    o

    Switch to the linker

    qmkshrobj

    Creates a shared object from the generated object files.

    sharedobjectname

    Name of the shared object file

    This is the name specified as the:

  • INMOD modulename parameter in the IMPORT of the FastExport job script
  • OUTMOD modulename parameter of the EXPORT command of the FastExport job script
  • EXIT name parameter of the NOTIFY option in the BEGIN EXPORT command of the FastExport job script
  • sourcefile

    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, OUTMOD, or notify exit routines on Linux client systems, use the following syntax.

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

    where:

     

    Syntax Element

    Description

    gcc

    Call to the program that invokes the native C compiler

    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

    inmod.c

    INMOD source file name

    inmod.so

    INMOD shared object name

    m32

    Generate code for a 32bit environment. The 32bit environment sets int, long and pointer to 32 bits.