Skip Headers

Oracle9i Enterprise Edition User's Guide
Release 2 (9.2.0.1.0) for OS/390
Part No. A97312-01
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

A
API Short Name Support

With this release of Oracle9i Enterprise Edition for OS/390, the nominal API application executable takes the form of a Program Object 3 (PM3).  This appendix presents methods for producing traditional load modules if needed.  The common components of these methods are the Prelinker and an alternate API stub called ORASTBS.  ORASTBS is shipped as an object deck so as to be suitable for Prelinker input.

Method 1: Prelink and Link

This method is suitable for the following types of Oracle API programs; Pro*COBOL, Pro*FORTRAN, Pro*PL/I, and OCI V7 programs.

Existing Pro*C and OCI V8 programs calling API functions via their truncated names, as documented in prior releases, can use this method as well.  The object produced by the compile step along with the alternate API stub ORASTBS are passed to the Prelinker and the resultant object is then passed to the Linkage Editor.

Example:

//PRELINK  EXEC PGM=EDCPRLK,COND=(4,LT),PARM=''

//STEPLIB   DD DISP=SHR,

//             DSNAME=SYS1.SCEERUN

//SYSMSGS   DD DISP=SHR,

//             DSNAME=SYS1.SCEEMSGP(EDCPMSGE)

//SYSLIB    DD DISP=SHR,

//             DSNAME=ORACLE.V920.OBJLIB

//SYSIN     DD DISP=(OLD,DELETE),

//             DSN=&&LOADSET

//          DD DDNAME=SYSIN2

//SYSMOD    DD DISP=(NEW,PASS),

//             DSNAME=&&PLKSET,

//             UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)

//SYSOUT   DD  SYSOUT=*

//SYSPRINT DD  SYSOUT=*

//SYSIN2   DD  *

INCLUDE SYSLIB(ORASTBS)

/*

//LINKEDIT EXEC PGM=HEWL,COND=(4,LT),

//             PARM='LET,LIST,MAP,XREF,DYNAM=DLL'

//SYSPRINT  DD SYSOUT=*

//SYSLIB    DD DISP=SHR,

//             DSN=SYS1.SCEELKED

//SYSUT1    DD UNIT=VIO

//SYSLMOD   DD DISP=SHR,

//             DSN=USER.LOADLIB(SAMPLE1)

//SYSLIN    DD DISP=(OLD,DELETE),

//             DSN=&&PLKSET

//          DD DDNAME=SYSIN

//SYSIN     DD DUMMY

The steps to precompile and/or compile the program would precede the PRELINK step.  In the case of C programs NOLONGNAME must be specified on the compile step.

Method 2: Precompile and/or Compile with Name Mapping

This method is suitable for the following types of Oracle API programs:  Pro*C and OCI V8.  At precompile and/or compile time, a header file is included which maps the long names to short names.  Inclusion of the header file is triggered by the definition of ORA_SNAME.  The object produced by the compile step, along with the alternate API stub ORASTBS, are passed to the Prelinker and the resultant object is then passed to the Linkage Editor.

Example:

//PRECOMP  EXEC PGM=PROC,

//STEPLIB   DD DISP=SHR,

//             PARM='++/DD/SYSPARM'

//             DSN=ORACLE.V920.CMDLOAD

//ORA$LIB   DD DISP=SHR,

//             DSN=ORACLE.V920.MESG

//SYSPRINT  DD SYSOUT=*,

//             DCB=(LRECL=132,BLKSIZE=1320,RECFM=VB)

//SYSOUT    DD SYSOUT=*,

//             DCB=(LRECL=132,BLKSIZE=1320,RECFM=VB)

//SYSERR    DD SYSOUT=*,

//             DCB=(LRECL=132,BLKSIZE=1320,RECFM=VB)

//SYSCOD    DD UNIT=SYSDA,

//             SPACE=(TRK,(10,10))

//SYSCUD    DD UNIT=SYSDA,

//             SPACE=(TRK,(10,10))

//SYSPUNCH  DD DISP=(,PASS),

//             DSN=&&PCCOUT,

//             UNIT=SYSDA,

//             SPACE=(CYL,(2,1)),

//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)

//SYSUT1    DD UNIT=SYSDA,

//             SPACE=(CYL,(5,5))

//SYSUT2    DD UNIT=VIO

//SYSUT3    DD UNIT=VIO

//SYSLIB    DD DISP=SHR,

//             DSN=ORACLE.U920.H

//          DD DISP=SHR,

//             DSN=SYS1.SCEEH.H

//          DD DISP=SHR,

//             DSN=SYS1.SCEEH.SYS.H

//          DD DISP=SHR,

//             DSN=SYS1.SCLBH.H

//CONFIG    DD DUMMY

//SYSIN     DD DISP=SHR,

//             DSN=USER.PROGRAM.SRC

//ORA@XXXX  DD DUMMY

//SYSPARM   DD *

INAME=/DD/SYSIN

LNAME=/DD/SYSPRINT

ONAME=/DD/SYSPUNCH

CONFIG=/DD/CONFIG

CODE=ANSI_C

USER=SCOTT/TIGER

SQLCHECK=FULL

DEFINE=ORA_SNAME

/*

//COMPILE  EXEC PGM=CBCDRVR,COND=(0,LT),

// PARM=('/SOURCE,NOMAR,NOSEQ,LIST,RENT,DEF(ORA_SNAME=)')

//STEPLIB   DD DISP=SHR,

//             DSNAME=SYS1.SCEERUN

//          DD DISP=SHR,

//             DSNAME=SYS1.SCBCCMP

//SYSMSGS   DD SYSOUT=*

//SYSLIB    DD DISP=SHR,

//             DSN=ORACLE.V920.H

//          DD DISP=SHR,

//             DSN=SYS1.SCEEH.H

//          DD DISP=SHR,

//             DSN=SYS1.SCEEH.SYS.H

//          DD DISP=SHR,

//             DSN=SYS1.SCLBH.H

//SYSLIN    DD DISP=(,PASS),

//             DSN=&&LOADSET,

//             UNIT=VIO,

//             SPACE=(CYL,(3,3)),

//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)

//SYSPRINT  DD SYSOUT=*

//SYSOUT    DD SYSOUT=*

//SYSCPRT   DD SYSOUT=*

//SYSUT1    DD UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)

//SYSUT4    DD UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)

//SYSUT5    DD UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800)

//SYSUT6    DD UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800)

//SYSUT7    DD UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800)

//SYSUT8    DD UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800)

//SYSUT9    DD UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=VB,LRECL=137,BLKSIZE=882)

//SYSUT10   DD SYSOUT=*

//SYSUT14   DD UNIT=VIO,

//             SPACE=(32000,(30,30)),

//             DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800)

//SYSIN     DD DISP=(OLD,DELETE),

//             DSN=&&PCCOUT

The precompile step is only needed when the program is a Pro*C application. For OCI V8 programs, only the compile step is needed.  In either case, the object produced by the compile step, along with the alternate API stub ORASTBS, are passed to the Prelinker and the resultant object is then passed to the Linkage Editor (see Method 1 above).


Previous Next
Oracle Logo
Copyright © 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents
Go To Index
Index