oracle 7 guide to processors and utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... ·...

170
ORACLE 7 Guide to Processors and Utilities DPS7000/XTA NOVASCALE 7000 Database Products: ORACLE REFERENCE 47 A2 12UR 04

Upload: others

Post on 04-Jun-2020

30 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE 7

Guide to Processors and

Utilities DPS

7000/XTA

NO

VASC

ALE

7000

Database Products: ORACLE

REFERENCE47 A2 12UR 04

Page 2: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:
Page 3: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

DPS7000/XTANOVASCALE 7000

ORACLE 7Guide to Processors and Utilities

Database Products: ORACLE

March 2000

BULL CEDOC

357 AVENUE PATTON

B.P.20845

49008 ANGERS CEDEX 01

FRANCE

REFERENCE47 A2 12UR 04

Page 4: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The following copyright notice protects this book under Copyright laws which prohibit such actions as, but notlimited to, copying, distributing, modifying, and making derivative works.

Copyright Bull SAS 1995, 2000

Printed in France

Suggestions and criticisms concerning the form, content, and presentation of thisbook are invited. A form is provided at the end of this book for this purpose.

To order additional copies of this book or other Bull Technical Publications, youare invited to use the Ordering Form also provided at the end of this book.

Trademarks and Acknowledgements

We acknowledge the right of proprietors of trademarks mentioned in this book.

Intel® and Itanium® are registered trademarks of Intel Corporation.

Windows® and Microsoft® software are registered trademarks of Microsoft Corporation.

UNIX® is a registered trademark in the United States of America and other countries licensed exclusively throughthe Open Group.

Linux® is a registered trademark of Linus Torvalds.

The information in this document is subject to change without notice. Bull will not be liable for errors containedherein, or for incidental or consequential damages in connection with the use of this material.

Page 5: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 iii

Preface

This guide is one of a series of documents which describe the use of the ORACLE(ORACLE is trademark of the ORACLE Corporation, registered in the UnitedStates Patent Office.) Relational Database Management System (RDBMS),Version 7 (ORACLE7) under GCOS 7 V6.

You should be familiar with the concepts and terminology associated withrelational database systems, and in particular, the fundamentals of the ORACLEdatabase. You should also be able to use the GCOS 7 Command Language (GCL)and the Job Control Language (JCL) under IOF.

This guide contains information specific to the use of ORACLE processors andutilities in a GCOS 7 environment. It does not provide exhaustive referencematerial on the processors and utilities themselves. You should refer to the list ofassociated documents in this Preface for further details. Direct references to otherORACLE manuals are given in the text, where appropriate.

This Guide:

• describes the elements of GCL and JCL that are required when calling and usingORACLE processors and utilities;

• deals with each processor and utility in turn, demonstrating their use under theGCOS 7 V6 operating system.

It is assumed that your ORACLE Relational Database Management System hasalready been correctly installed. If not, refer to the ORACLE7 Installation Guide.

• Database Administrators (DBAs).

• Systems-development staff whose responsibilities involve the design andprogramming of applications which use any of the facilities described.

Objectives ofThis Guide

IntendedReaders

Page 6: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

iv 47 A2 12UR Rev04

Section 1 provides essential information on the execution ofORACLE processors and utilities in a GCOS 7environment. The standard GCL parameter set isintroduced.

Section 2 describes the Start/Stop ORACLE (SOR) processor.

Section 3 describes the ORACLE Communication (COR)processor.

Section 4 describes the WOR processor.

Section 5 describes the LIST_SVR processor.

Section 6 describes the SQL*DBA processor.

Section 7 describes the ORAPWD Utility

Section 8 describes the SQL*Plus processor.

Section 9 describes the SQL*Loader utility.

Section 10 describes the IMPORT and EXPORT utilities.

Section 11 describes the LXINST utility.

Section 12 describes the SVRMGRL processor.

Section 13 describes the TNSPING utility.

Section 14 describes the TRCROUTE utility.

Section 15 describes the DBV utility.

Section 16 describes the MIGRATE utility.

Section 17 describes the PreCompiler Common (PCC) processor,incorporating Pro*C and Pro*COBOL.

Section 18 describes the TKPROF utility.

Section 19 describes the ORACLE Call Interfaces (OCI).

Section 20 describes SQL*Report: the RPT utility and the RPFprocessor.

Appendix A demonstrates how to use Job Control Language (JCL)to execute ORACLE utilities and processors.

Glossary defines selected ORACLE terms.

Index facilitates using this manual.

Structure ofThis Manual

Page 7: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

Preface

47 A2 12UR Rev04 v

The manuals below provide the information necessary for use of the ORACLERelational Database Management System (RDBMS) in a GCOS 7 environment.For the latest version (revision) of these manuals, please check the current GCOS 7Release Bulletin.

IOF Terminal User's Manual Part 1 Introduction to IOF .................................................................... 47 A2 31UJ Part 2 GCL Commands ......................................................................... 47 A2 32UJ Part 3 Processor Commands ................................................................. 47 A2 33UJ Part 4 Appendices.................................................................................. 47 A2 34UJ

COBOL 85 User's Guide ......................................................................... 47 A2 05ULC User's Guide ........................................................................................ 47 42 60ULJCL User's Guide .................................................................................... 47 A2 12UJJCL Reference Manual .............................................................................47 A2 11UJ

The ORACLE7 documentation set consists of the following books. Refer to theORACLE7 Documentation Catalog for more information on specific documents.

ORACLE7 Documentation Catalog.........................................................47 A2 10URORACLE7 Installation Guide.................................................................. 47 A2 11URORACLE7 Guide to Processors and Utilities..........................................47 A2 12URSQL*Net V1 With ORACLE7 User's Guide.............................................47 A2 13URORACLE7/TDS User's Guide..................................................................47 A2 14URSQL*Net V2 With GCOS 7 User's Guide ................................................47 A2 17UR

ORACLE7 Server Application Developer's Guide .................................. 86 A2 42PEProgrammer's Guide to the ORACLE Precompilers ............................... 86 A2 77CRPL/SQL 2.1 and Precompilers 1.6 Addendum......................................... 86 A2 74CRProgrammer's Guide to the ORACLE Call Interfaces..............................86 A2 15SLPro*COBOL Supplement......................................................................... 86 A2 79CRPro*C Supplement ................................................................................... 86 A2 78CR

ORACLE7 Server SQL Language Reference Manual ............................. 86 A2 43PEORACLE7 Server SQL Language Quick Reference ................................ 86 A2 47CR

PL/SQL (2)

PL/SQL User's Guide and Reference.......................................................86 A2 76SWPL/SQL 2.1 and Precompilers 1.6 Addendum......................................... 86 A2 74CR

AssociatedDocuments

InteractiveFacilities

Languages

The 47 Series:6 GCOS 7-specificManuals

The 86 Series:GeneralManualsProgrammaticInterfaces (6)

SQLLanguageReferenceBooks (2)

Page 8: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

vi 47 A2 12UR Rev04

General RDBMS and Utilities (6)

ORACLE7 Server Concepts Manual ....................................................... 86 A2 40PEORACLE7 Server Administrator's Guide ................................................ 86 A2 41PEORACLE7 Server Addendum release 7.1 ................................................ 86 A2 70CRORACLE7 Server Migration Guide......................................................... 86 A2 46PEORACLE7 Server Utilities User's Guide................................................. 86 A2 65PEORACLE7 Server Messages and Codes .................................................. 86 A2 66PE

SQL*Report User's Guide .......................................................................86 A2 15SWSQL*Report User's Guide .......................................................... 86 A2 15SW ADD A

SQL*Plus (2)

SQL*Plus User's Guide and Reference ................................................... 86 A2 90CRSQL*Plus Quick Reference...................................................................... 86 A2 30PE

SQL*Net (2)

ORACLE Network Products Messages Manual ...................................... 86 A2 85CRUnderstanding SQL*Net version 2.1....................................................... 86 A2 86CRAdministrator's Guide ............................................................................. 86 A2 84CR

Bold is used for emphasis in general and for signallingparameters and keywords.

Bold Italic are important words used for the first time. Thesewords are usually referenced in the index.

[square brackets] are used to indicate function keys in SQL*Forms.

The following syntax conventions are observed in this manual:

Syntax appears in the following font for ORACLE utilitycommands, SQL statements and GCOS 7 commands:SELECT * FROM EMP

UPPER CASE indicates a word or phrase to be entered exactly asshown. Commands, SQL reserved words andkeywords, and example filenames are in upper case.

Lower case indicates a variable where you should substitute anappropriate value, such as the name of a database file.

Square brackets [ ] indicate optional parameters of keywords.

Curly braces { } indicate a sequence of parameters or keywords, ofwhich one must be chosen.

SQL*Report(2)

ConventionsUsed in thisManualText Notation

SyntaxNotation

Page 9: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

Preface

47 A2 12UR Rev04 vii

Vertical lines | separate optional or mandatory choices.

Ellipses ... indicate that the preceding item can be repeated. Youmay enter an arbitrary number of similar items.

Default values are underlined.

<variable> variables are sometimes enclosed by angle brackets.

<decx> indicates the maximum number of digits that the valueconcerned can have. For example, <dec5> means thatyou can have values up to 99999.

Other punctuation such as commas and parentheses should be entered asshown.

The generic term, DPS 7000, used throughout this document, refers to all hardwaresystems (DPS 7 and DPS 7000).

Page 10: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

viii 47 A2 12UR Rev04

Page 11: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 ix

Table of Contents

1. The GCL Interface

1.1 Introduction ..................................................................................................................... 1-2

1.1.1 Interactive Mode ................................................................................................ 1-2

1.1.2 ABSENTEE Mode.............................................................................................. 1-4

1.1.3 Personalized GCL Procedures .......................................................................... 1-6

1.1.4 Rules for Naming ORACLE Files ...................................................................... 1-7

1.1.5 ORACLE File Name Suffixes............................................................................. 1-8

1.1.6 Interrupting Execution...................................................................................... 1-10

1.1.7 The INIT.ORA File ........................................................................................... 1-10

1.2 The Standard GCL Parameter Set................................................................................ 1-11

1.3 Severity-4 Errors ........................................................................................................... 1-18

1.4 Automatic Log-On to Oracle ......................................................................................... 1-19

1.5 Synchronizing a Job with the ORACLE Server using WOR ......................................... 1-20

1.6 Exiting from an ORACLE Processor or Utility using EOS............................................. 1-23

2. The SOR Processor

2.1 Introduction ..................................................................................................................... 2-1

2.2 SOR Syntax .................................................................................................................... 2-1

2.3 SOR Parameters............................................................................................................. 2-2

2.4 SOR Execution Notes ..................................................................................................... 2-4

3. The COR Processor

3.1 Introduction ..................................................................................................................... 3-1

3.2 COR Syntax .................................................................................................................... 3-1

3.3 COR Parameters............................................................................................................. 3-2

3.4 COR Execution Notes..................................................................................................... 3-3

Page 12: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

x 47 A2 12UR Rev04

4. The WOR Processor

4.1 Introduction ..................................................................................................................... 4-1

4.2 WOR Syntax ................................................................................................................... 4-1

4.3 WOR Parameters............................................................................................................ 4-2

4.4 WOR Execution Notes .................................................................................................... 4-2

5. The LIST_SVR Processor

5.1 Introduction ..................................................................................................................... 5-1

5.2 LIST_SVR Syntax ........................................................................................................... 5-1

5.3 LIST_SVR Parameters ................................................................................................... 5-1

5.4 LIST_SVR Execution Notes............................................................................................ 5-2

6. The SQL*DBA Processor

6.1 Introduction ..................................................................................................................... 6-1

6.2 SQL*DBA Syntax ............................................................................................................ 6-1

6.3 SQL*DBA Parameters .................................................................................................... 6-2

6.4 SQL*DBA Startup File..................................................................................................... 6-2

6.5 The Monitor Command ................................................................................................... 6-2

6.6 The Menu Mode.............................................................................................................. 6-2

7. The ORAPWD Utility

7.1 Introduction ..................................................................................................................... 7-1

7.2 ORAPWD Syntax ............................................................................................................ 7-1

7.3 ORAPWD Parameters .................................................................................................... 7-2

7.4 ORAPWD Execution Notes............................................................................................. 7-2

8. The SQL*Plus Processor

8.1 Introduction ..................................................................................................................... 8-1

8.2 SQL*Plus Syntax............................................................................................................. 8-1

8.3 SQL*Plus Parameters..................................................................................................... 8-2

8.4 SQL*Plus Command Files .............................................................................................. 8-3

8.5 SQL*Plus Startup Files ................................................................................................... 8-4

Page 13: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 xi

8.6 The Edit Command ......................................................................................................... 8-4

8.7 The Spool Command ...................................................................................................... 8-5

8.8 Using SQL*Plus to Format Reports ................................................................................ 8-6

8.9 Using HOST to Issue GCOS 7 Commands .................................................................... 8-7

9. The SQL*Loader Utility

9.1 Introduction ..................................................................................................................... 9-1

9.2 SQL*Loader Syntax ........................................................................................................ 9-2

9.3 SQL*Loader Parameters................................................................................................. 9-3

9.4 Conventional and Direct Path ......................................................................................... 9-6

9.5 Loading Data from an SL Library Member...................................................................... 9-7

9.6 Loading Data from Sequential Files................................................................................ 9-9

9.7 Input Data Formats ....................................................................................................... 9-10

10. The Import/Export Utilities

10.1 Introduction ................................................................................................................... 10-1

10.2 Import Syntax ................................................................................................................ 10-2

10.3 Import Parameters ........................................................................................................ 10-3

10.4 Export Syntax................................................................................................................ 10-5

10.5 Export Parameters ........................................................................................................ 10-6

10.6 Using Tape Files ........................................................................................................... 10-9

10.7 Transferring a Database between DPS 7000 Sites ...................................................... 10-9

10.8 Heterogeneous ORACLE7 Import/Export ................................................................... 10-10

10.8.1 GCOS 7 EXPORT then UNIX IMPORT......................................................... 10-10

10.8.2 EXPORT UNIX/IMPORT GCOS 7................................................................. 10-10

10.9 Using ORACLE V6 Export Files.................................................................................. 10-11

11. The LXINST Utility

11.1 Introduction ................................................................................................................... 11-1

11.2 Syntax ........................................................................................................................... 11-2

11.3 Usage............................................................................................................................ 11-3

11.4 The init_env File............................................................................................................ 11-6

11.5 Conclusion .................................................................................................................... 11-7

Page 14: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

xii 47 A2 12UR Rev04

12. The SVRMGRL Processor

13. The TNSPING Utility

14. The TRCROUTE Utility

15. The DBV Utility

16. The Migrate Utility

16.1 Introduction ................................................................................................................... 16-1

16.2 Migrate Syntax .............................................................................................................. 16-2

16.3 Migrate Parameters....................................................................................................... 16-3

16.4 Migrate Execution Notes............................................................................................... 16-5

17. The PCC Processor

17.1 Introduction ................................................................................................................... 17-1

17.2 PCC Syntax................................................................................................................... 17-2

17.3 PCC Parameters ........................................................................................................... 17-4

17.4 Include Files ................................................................................................................ 17-10

17.5 Configuration Files ...................................................................................................... 17-12

17.6 Using JCL to Precompile your Program...................................................................... 17-13

17.7 Compiling a Pre-Compiled Program ........................................................................... 17-14

17.7.1 Compiling a C Program ................................................................................. 17-14

17.7.2 Compiling a COBOL Program ....................................................................... 17-14

17.8 Linking a Pre-Compiled Program................................................................................ 17-17

17.9 Executing a Pre-Compiled Program using OREXEC ................................................. 17-18

17.10 Accessing Monitored Files .......................................................................................... 17-19

17.11 PCC Sample ............................................................................................................... 17-20

Page 15: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 xiii

18. The TKPROF Utility

18.1 Introduction ................................................................................................................... 18-1

18.2 TKPROF Syntax............................................................................................................ 18-2

18.3 TKPROF Parameters .................................................................................................... 18-3

18.4 TKPROF Execution Notes ............................................................................................ 18-4

19. The ORACLE Call Interfaces

19.1 Introduction ................................................................................................................... 19-1

19.2 Compiling an OCI Program........................................................................................... 19-2

19.2.1 Compiling a C Program using OCI Routines................................................... 19-2

19.2.2 Compiling a COBOL Program using OCI Routines......................................... 19-2

19.3 Linking an OCI Program ............................................................................................... 19-3

19.4 Executing an OCI Program ........................................................................................... 19-4

19.5 OBREAK Function ........................................................................................................ 19-4

20. SQL*Report: RPT and RPF

20.1 The RPT Utility .............................................................................................................. 20-1

20.1.1 RPT Syntax...................................................................................................... 20-1

20.1.2 RPT Parameters .............................................................................................. 20-2

20.1.3 RPT File Name Suffixes .................................................................................. 20-3

20.2 The RPF Processor....................................................................................................... 20-4

20.2.1 RPF Syntax...................................................................................................... 20-4

20.2.2 RPF Parameters .............................................................................................. 20-4

20.2.3 RPF File Name Suffixes .................................................................................. 20-6

A. JCL Specifics

Glossary

Index

Page 16: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

xiv 47 A2 12UR Rev04

Page 17: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 1-1

1. The GCL Interface

This section begins with some general points about executing ORACLE processorsand utilities. The differences between interactive and batch (absentee) mode aredescribed. Then rules for naming ORACLE files are explained. Finally, underGCOS 7, ORACLE processors and utilities are executed using dedicated GCLcommands. Therefore, the standard GCL parameter set is given, together with thepossible values for each parameter.

NOTE:The processors and utilities described in later sections have their own specificparameters. The standard parameter set can be used in addition to these, exceptwhere stated.

There is also some more general information about the use of ORACLE in aGCOS 7 environment.

If you are using Job Control Language (JCL), please refer to Appendix A.

Page 18: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-2 47 A2 12UR Rev04

1.1 Introduction

ORACLE processors and utilities receive their input from the file assigned to theSTDIN internal file name. ORACLE processors write their output results to thefile assigned to the STDOUT internal file name. They write trace output and anyerror messages to the file assigned to the STDERR internal file name.

Each GCL command invoking an ORACLE processor or utility uses the followingkeywords:

INFILE (to assign STDIN files)OUTFILE (to assign STDOUT files)ERRFILE (to assign STDERR files)

1.1.1 Interactive Mode

Executing in interactive mode means that GCL commands can be enteredinteractively, with the necessary keywords and parameter values.

If a GCL command is entered without assigning the requisite STDIN file, thesystem requests the information at the terminal.

If a GCL command is entered without assigning the requisite STDOUT andSTDERR files, all output and messages are displayed on the terminal.

EXAMPLE:

Executing the SQL*Plus processor interactively, without keywords and parametervalues.

S: SQLPLUS;

SQL*Plus requests any necessary information at the terminal, and writes all outputand messages to the terminal.

EXAMPLE:

Executing the SQL*Plus processor interactively, assigning only the STDOUT file.

S: SQLPLUS OUTFILE = O7103A.SL..RESULTS;

SQL*Plus again requests any necessary information at the terminal, but output iswritten to the subfile RESULTS which is contained in the library O7103A.SL.Trace and error messages are displayed on the terminal.

Page 19: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-3

EXAMPLE:

Executing SQL*Plus interactively, without assigning the STDERR file.

S: SQLPLUS INFILE = P1.MYLIB..COMM OUTFILE = O7103A.SL..RESULTS;

SQL*Plus will not request any input at the terminal because STDIN is assigned tothe subfile COMM which is contained in the library P1.MYLIB.

COMM might contain the following:

scott/tigerSELECT * FROM EMP;EXIT

The output will be placed in the subfile RESULTS which is contained in theO7103A.SL library. Trace and error messages are displayed on the terminalbecause STDERR is not assigned.

Page 20: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-4 47 A2 12UR Rev04

1.1.2 ABSENTEE Mode

All GCL commands delivered with ORACLE have a boolean parameter calledABSENTEE. When the ABSENTEE keyword is specified, commands areexecuted as batch jobs in absentee mode.

When a processor or utility runs in absentee mode, input comes from the fileassigned to the STDIN internal file name instead of prompting at the terminal.Similarly, output is written to the file assigned to the STDOUT internal file nameinstead of sending it to the terminal. Trace output and error messages are written tothe file assigned to the STDERR internal file name instead of sending them to theterminal.

If STDIN is not assigned, the utility or processor cannot obtain any input. STDIN,therefore, is mandatory (except in cases where a command file is not required, suchas RPF). If the STDOUT and STDERR files are not assigned, all output, trace anderror messages are sent to the public SYSOUT file to be printed.

EXAMPLE:

Executing the SQL*Plus processor as an absentee job, assigning only the STDINfile.

S: SQLPLUS INFILE = P1.MYLIB..COMM ABSENTEE;

Here, the input to the SQL*Plus processor is read from the subfile COMM which iscontained in the P1.MYLIB library. Since OUTFILE and ERRFILE have beenomitted, all output, trace and error messages will be sent to the public SYSOUTfile for printing.

EXAMPLE:

Executing the SQL*Plus processor as an absentee job, assigning all files.

S: SQLPLUS INFILE = ORACLE7.SL..MY_INP -:- OUTFILE = ORACLE7.SL..MY_OUT -:- ERRFILE = ORACLE7.SL..ERR ABSENTEE;

In this example, the current working directory is ORACLE7. Therefore, the inputto the SQL*Plus processor is contained in the subfile ORACLE7.SL..MY_INP.

This subfile might contain the following:

scott/tigerSELECT * FROM EMP;EXIT

Page 21: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-5

ORACLE7.SL..MY_OUT contains the output. ORACLE7.SL..ERR contains anytrace or error messages.

Alternatively, you can use the ABS command to execute commands in absenteemode.

EXAMPLE:

ABS (SQLPLUS scott/tiger);

Page 22: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-6 47 A2 12UR Rev04

1.1.3 Personalized GCL Procedures

Several processors and/or utilities can be executed in the same job, if required.Alternatively, the same processor or utility can be executed several times.

The figure below sets out a personalized skeleton GCL procedure (PSQL) whichcalls the SQL*Plus processor twice. The first time, the SQL*Plus processor iscalled synchronously; that is, the SQLPLUS command is executed interactively.The second time, the SQL*Plus processor is called asynchronously; that is, theSQLPLUS command is called in absentee mode (providing for its execution as abatch job).

PROC PSQL; .......Interactive--------> SQLPLUS SYSTEM/MANAGER COMFILE = X; LMN SL COMFILE = Y; .......Absentee-----------> SQLPLUS SYS/PWD COMFILE = Z ABSENTEE; ....... ENDPROC;

S: EJR PROC = PSQL BINLIB = ........etc

Personalized GCL Procedure

If necessary, refer to the IOF Terminal User's Reference Manual Part 1:Introduction to IOF, in particular, the paragraph in Section 8 headed "JobSubmission." You may also wish to remind yourself about theMAINTAIN_COMMAND processor, and the means of setting up personalizedGCL procedures. For this, refer more generally to the four-part IOF manual set.

Page 23: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-7

1.1.4 Rules for Naming ORACLE Files

The rules governing ORACLE file names are based upon the value of the currentworking directory (formerly #WD) during the utility session (see the ORACLE7Installation Guide). The value of the current working directory is set by theMODIFY_PROFILE (MDP) directive, and is contained in the #WD systemvariable.

When ORACLE analyzes a file name, it takes the local file name and sets up anabsolute file name from it. It then attempts to access the corresponding file. Theprocess is:

• If the local file name begins with the "." (dot) character, the value of the currentworking directory is inserted before this character,

• otherwise, if the name contains the "." (dot) character, no change takes place,

• otherwise, the value of the current working directory followed by the string".SL.." is inserted before the first character.

EXAMPLE:

If the current working directory is MYDIR, local file names are converted toabsolute file names as shown:

A.X remains unchanged .Z becomes MYDIR.Z MB2 becomes MYDIR.SL..MB2 ..MB2 becomes MYDIR.SL..MB2

In the last case, the name comprises the subfile MB2 contained in the SourceLanguage library located under the MYDIR directory.

Subfiles can be referenced by their member name only when those members existin the Source Language library <current-working-directory>.SL. While theexistence of such a library is not mandatory, it is recommended for ease of use:many files handled by ORACLE are small source files containing commandswhose names must be provided by the user.

Note that if the file name contains a media list (for example,ABC:FSD08:MS/D500), it is left unchanged (that is, it refers to the uncatalogedfile ABC on the media FSD08). You are recommended not to use uncataloged filesunder ORACLE. Remember also the ORACLE database files (.DCF, .DBS,.LOG1, .LOG2).

Page 24: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-8 47 A2 12UR Rev04

1.1.5 ORACLE File Name Suffixes

Most ORACLE processors and utilities add a special suffix to file names to aididentification. For example, SQL*Plus adds the suffix _SQL to command fileswhen they are referenced by the SQL*Plus commands SAVE, START and GET.Files used by the EXPORT utility add _DMP and so on.

Note that under the SQL*Plus processor, the default suffix ("_SQL") can bechanged or suppressed using the "SET SUF" SQL*Plus command. Refer to theSQL*Plus User's Guide and Reference.

While this suffixing is useful to recognize particular files, it may be a nuisancewhen manipulating files which were created outside ORACLE (for example, by theGCOS 7 Text Editor), and which, therefore, have no suffix.

The adding of a suffix can be suppressed if required by using either the $ or the:character in the file name. You can, for example, append the file status of the fileto its name to do this:

MY_EXPORT$RES

EXAMPLE:

SQL> SELECT * FROM EMP; .................. SQL> SAVE MY_LIB..RQ$CAT SQL> SAVE RQ SQL> EXIT

Here, the query is saved under two different names as shown. When you referencethe library MY_LIB, you will notice the two resulting subfiles:

• RQ (which was saved as MY LIB..RQ$CAT) and,

• RQ_SQL (which was saved as RQ).

In the first case, no suffixing took place because of the $ character. In the secondcase, the _SQL suffix was added.

Page 25: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-9

If the given file name already contains the default suffix used by the processor, itwill be left unchanged (no other suffixing will be made).

EXAMPLE:

SQL> SELECT * FROM EMP; ........ SQL> SAVE RQ_SQL; SQL> EXIT;

Here, as the file name already contains the default suffix used by the SQL*Plusprocessor, the query is saved in the member RQ_SQL of the library MY_LIB.

Page 26: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-10 47 A2 12UR Rev04

1.1.6 Interrupting Execution

If you wish to interrupt a utility such as EXPORT or IMPORT, use the standardGCOS 7 "Break" mechanism, and reply QUIT to the break prompt (???).Processing will then stop.

Certain ORACLE processors and utilities may have their own break mechanisms.If so, these are described in the relevant manual.

IMPORTANT:It is not advisable to interrupt SOR with a Break once it has started.

1.1.7 The INIT.ORA File

In the standard ORACLE documentation, you will find many references to theINIT.ORA file. This contains ORACLE database-system parameters for use with awarmstart. These system parameters are described in detail in the ORACLE7Server Administrator's Guide and, GCOS 7 dependent values are described inappendix A of the ORACLE7 Installation Guide.

IMPORTANT:Under GCOS 7, the default INIT.ORA file is called INIT_ORA. It is located inthe source library associated with the current working directory.

If you want to override the default, another file can be specified by the PFILEparameter when SQL*DBA is executed. SQL*DBA is discussed in Section 6.

13

3

13

3

Page 27: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-11

1.2 The Standard GCL Parameter Set

All GCL commands that call ORACLE processors and utilities have a set ofstandard parameters that:

• identify the user;

• specify the database to be connected;

• assign the input, output and error files;

• define the mode and execution parameters;

• choose the required ORACLE version.

where is given the each time. Instead, a edto refer to the standard GCL parameterset somethise

GCL command procedures are delivered in binary form in the standard ORACLEbinary library; for example ORACLE7.BIN if the product has been installed underthe ORACLE7 directory. This is discussed in the ORACLE7 Installation Guide.The standard parameters are listed on the pages which follow:

USERID

[ { USERID } = <user-name>/<password> ] [ { UID } ]

USERID identifies the user. All ORACLE processors and utilities which connectto a database need some means of user identification for data protection purposes.USERID is composed of two elements, a user-name and a user-password,separated by a slash (/) character.

EXAMPLE:

USERID = SYSTEM/MANAGER

If USERID is omitted, the user name and password are requested at the terminal (inthe case of SQL*Plus, EXPORT and IMPORT), or an automatic log-on isattempted (in the case of SQL*Loader). For details on automatic log-on, see laterin this section.

Page 28: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-12 47 A2 12UR Rev04

INSTANCE

[ { INSTANCE } = <name> ] [ { ORACLE_WORKING_DIRECTORY } ] [ { OWD } ]

INSTANCE is a character string identifying the ORACLE database server. Tokeep INSTANCE compatible with earlier releases, the database server can beidentified by a directory; therefore, OWD is retained as a synonym forINSTANCE. Any processor that does not access the database directly does notneed this parameter. The default value for INSTANCE is the value of the GCLsystem variable #WD. characters

INFILE

[ INFILE = <input-file-name> ]

<input-file-name> specifies the file which is assigned to the STDIN internal filename. This file contains input for ORACLE processors and utilities. It can be alibrary subfile, if required. INFILE serves no purpose if the processor requires nocommand file.

In interactive mode, the default is the terminal. That is, input is accepted at theterminal. In absentee mode, INFILE is mandatory.

NOTE:The file naming conventions described earlier do not apply to INFILE. Youmust always supply the full file name.

EXAMPLE:

INFILE = ORACLE7.SL..MY_IN (not INFILE = MY_IN)

OUTFILE

[ OUTFILE = <output-file-name> ]

<output-file-name> specifies the file which is assigned to the STDOUT internalfile name. This file contains the output resulting from processor or utilityexecution. It can be a library subfile, if required.

In interactive mode, the default is the terminal. That is, all output is displayed onthe terminal. In absentee mode, the default is the public SYSOUT file.

Page 29: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-13

NOTE:The file naming conventions described earlier do not apply to OUTFILE. Thefull file name must always be applied.

EXAMPLE:

OUTFILE = ORACLE7.SL..MY_OUT (not OUTFILE = MY_OUT)

ERRFILE

[ ERRFILE = <error-file-name> ]

<error-file-name> specifies the file which is assigned to the STDERR internal filename. This file contains trace output or error messages which result fromprocessor or utility execution. It can be a library subfile, if required.

In interactive mode, the default is the terminal. That is, all trace and errormessages are displayed on the terminal. In absentee mode, the default is the publicSYSOUT file.

NOTE:The file naming conventions described earlier do not apply to ERRFILE. Thefull file name must always be applied.

EXAMPLE:

ERRFILE = ORACLE7.SL..MY_ERR (not ERRFILE = MY_ERR)

Page 30: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-14 47 A2 12UR Rev04

ABSENTEE

[ { ABSENTEE } [ { = 0 } ] ][ { ABS } [ { = 1 } ] ]

ABSENTEE is a boolean parameter which specifies whether execution is to beperformed in interactive mode (0), or in absentee mode (1). For most processorsand utilities the default is interactive mode.

Exceptions are the COR I, SOR I and SOR W which are executed, by default, inabsentee mode. This is because interactive execution in these cases would blockthe terminal until a SOR SHUTDOWN is issued either from another terminal, orwith a batch job. Refer to Section 2.

NAME

[ NAME = <job-name> ]

<job-name> is specified only when execution takes place in absentee mode. Thevalue of NAME gives the name of the absentee job. It is a very useful way toidentify database servers. If omitted, a default name is applied depending on theprocessor being executed.

EXAMPLE:

SOR W HOLDOUT INSTANCE = ORA.70 NAME = SOR_70

Here, the SOR server for database ORA.70 is activated with the name SOR_70.

CLASS

[ CLASS = <job-class> ]

<job-class> is specified only when execution takes place in absentee mode.CLASS specifies the class for the generated absentee job. By default, CLASStakes the value associated with the H_ORACLE_CLASS global variable set by theORACLE command.

This information is generally placed in the project startup. It is important that anSOR I or SOR W command is issued in a class high enough to ensure fastexecution.

Page 31: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-15

JOR

[ = { NORMAL } ][ JOR = { ABORT } ][ = { NO } ]

JOR is used only when execution is in absentee mode. JOR specifies whether aJob Occurrence Report (JOR) is to be generated, and, if so, what form it takes.NORMAL, the default, means that the JOR will always be produced. ABORTmeans that the JOR will be produced only if the job aborts. NO means that theJOR will always be suppressed.

HOLD

[ HOLD [ { = 0 } ] ][ [ { = 1 } ] ]

HOLD is a boolean parameter only used when execution is in absentee modewhich specifies whether the job is to be held (1) or immediately executed (0). Thedefault is that the job is not held.

HOLDOUT

[ HOLDOUT [ { = 0 } ] ] [ [ { = 1 } ] ]

HOLDOUT is a boolean parameter only used execution is in absentee mode whichspecifies if the output in the public SYSOUT file, and the JOR (Job OccurrenceReport), if any, are to be held (1) or not (0). The default is that the output and theJOR (if any) are printed as soon as possible.

SIZE

[ SIZE = <integer> ]

<integer> specifies the memory size required for processor or utility execution.Each GCL procedure for calling ORACLE processors and utilities is delivered withits own default value for SIZE, and this is usually sufficient. Under normalcircumstances, SIZE is explicitly declared only for the SOR processor.See Section 2.

Page 32: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-16 47 A2 12UR Rev04

SMLIB

[ SMLIB = <sharable-module-library> ]

<sharable-module-library> specifies the sharable module library where theORACLE code is stored. SMLIB is not generally declared explicitly because itsvalue is held, by default, in the GCL global variable H_ORACLE_SMLIB. Thisvariable should be set up as part of the ORACLE command in each user's startup.

LMLIB

[ LMLIB = <load-module-library> ]

<load-module-library> specifies the load module library where ORACLE code isstored. LMLIB is not generally declared explicitly because its value is held, bydefault, in the GCL global variable H_ORACLE_LMLIB. This variable should beset up as part of the ORACLE command in each user's startup.

SLLIB

[ SLLIB = <source-library> ]

<source-library> specifies the standard ORACLE source library. SLLIB is notgenerally declared explicitly because its value is held, by default, in the GCLglobal variable H_ORACLE_SLLIB. This variable should be set up as part of theORACLE command in each user's startup.

MSGDIR

[ MSGDIR = <message-directory> ]

<message-directory> specifies the directory under which error-message files are tobe retrieved. MSGDIR is not generally declared explicitly because its value is bydefault, in the GCL global variable H_ORACLE_MSGDIR. This variable shouldbe set up as part of the ORACLE command in each user's startup.

MSGDIR is used where different languages apply. The various language files areheld in different message directories. The default is the current working directory(#WD). See the ORACLE7 Installation Guide for details of the National LanguageSupport (NLS) facilities.

Page 33: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-17

NLS_LANG

[ { NLS_LANG } = <nls-identification> ][ { LANG } ]

<nls-identification> specifies the language, territory and character set to be used byORACLE. NLS_LANG is not generally declared explicitly because its value is, bydefault, in the GCL global variable H_ORACLE_LANG. This variable should beset up as part of the ORACLE command in each user's startup.

NLS_LANG is used where different languages apply. See Appendix C of theORACLE7 Installation Guide for details on the National Language Support (NLS).

OEL

[ OEL [ { = 0 } ] ][ [ { = 1 } ] ]

OEL is a boolean parameter which specifies the ORA_ENCRYPT_LOGIN valueto be used by ORACLE.

ORA_ENCRYPT_LOGIN is used during the connection processing to a server tofind out if the password must (or must not) be encrypted. See Chapter 5 of theORACLE7 Server Documentation Addendum for details on connection security.

JCL

[ JCL [ { = 0 } ] ][ [ { = 1 } ] ]

JCL is a boolean parameter which specifies whether execution of the command isto be performed (0), or a display of the set of JCL statements equivalent to thespecified GCL command is to be performed at the user console (1). The defaultvalue is 0 (execution of the command). See Appendix A of this manual for detailson JCL execution.

Page 34: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-18 47 A2 12UR Rev04

1.3 Severity-4 Errors

If a serious error is encountered during processor or utility execution, the severitystatus is set to 4. The severity-4 errors that are possible are:

• The SIZE of a SOR database server is too small to create the System GlobalArea successfully. That is, there is not enough space for the number of buffersneeded for the cache.

• There is no SOR server for the database to which you wish to connect.

• It is impossible to connect to the server because of system saturation, or becausea system patch is missing.

• Certain system resources are unavailable and the processor or utility cannot beexecuted.

• An incorrect OPTIONS string has been given. The instance or current workingdirectory are unrecognizable.

• A load module link error in a user program.

Page 35: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-19

1.4 Automatic Log-On to Oracle

There is a facility which enables users to automatically log on to ORACLE. Thismeans that there is no need to give a correct user/password combination to gainaccess to the database. Instead, the user simply presses the TRANSMIT key.

To do this, the Database Administrator must use the SQL commands CREATEUSER and GRANT in a special way.

EXAMPLE:

Suppose that there is a GCOS 7 user called JONES whose GCOS 7 password isJNS. To give Jones an automatic log-on to ORACLE, the DBA must enter thefollowing command:

SQLDBA> CREATE USER OPS$JONES IDENTIFIED EXTERNALLY;SQLDBA> GRANT CREATE SESSION TO OPS$JONES;

From then, therefore, when the SQL*Plus prompt

Enter username:

appears, Jones merely has to press the TRANSMIT key.

If required, the ORACLE password can be different from the GCOS 7 password.In this case, it must be explicitly specified as a parameter of the CREATE USERcommand.

EXAMPLE:

SQLDBA> CREATE USER OPS$JONES IDENTIFIED BY MY_PWD;SQLDBA> GRANT CREATE SESSION TO OPS$JONES;

The automatic log-on facility also guarantees password confidentiality for absenteejobs. In this case, the USERID keyword should not be specified with thecommand. Instead, the first line of the file referred to by the INFILE keywordmust be kept blank. This indicates to the system that an automatic log-on isrequired, and that the user is the same as the one which started the absentee job.

NOTE:OPS$ is the default prefix for automatic logon. It may be changed using theOS_AUTHENT_PREFIX parameter of the INIT_ORA parameter file.

Page 36: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-20 47 A2 12UR Rev04

1.5 Synchronizing a Job with the ORACLE Server using WOR

When an ORACLE processor or utility is executing, the SOR server (of thedatabase to which it is to be connected) and the COR must both be running and thedatabase must be open; otherwise the execution will immediately abort.

To ensure synchronization of a job with the server, the ORACLE delivery kitcontains a GCL procedure named WOR. Execution of this command willterminate only when the server designated by the INSTANCE parameter runningon the site designated by the SITE parameter is ready to accept user connections.Note that the command will wait up to one hour for the server, and then terminate.

EXAMPLE:

Executing the WOR command on a local site.

S: MP O7103A;S: MWINLIB BIN .BIN;S: ORACLE CLASS = K;.............S: WOR INSTANCE = MYBASE;

This command will terminate only when an ORACLE server of the databaseidentified by MYBASE is ready, when the step is killed by a TJ(TERMINATE_JOB) command, or after one hour.

EXAMPLE:

Executing the WOR command against a remote site.

S: MP O7103A;S: MWINLIB BIN .BIN;S: ORACLE CLASS = K;.............S: WOR INSTANCE = RMTBASE SITE = RMSIT;

In this example, WOR is waiting for the database server to be identified by thestring RMTBASE running on the remote site RMSIT.

Page 37: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-21

The example below shows a personalized GCL procedure which executes theSQL*Plus commands contained in the file CMDS_SQL as soon as the server of thedatabase identified by MYBASE is ready:

PROC MYPROC;..........WOR INSTANCE = MYBASE; ..........ENDPROC;

JCL Notes

You can synchronize a job with the server by executing the Load ModuleH_OR_WOR. Execution terminates only when the database server specified in theOPTIONS string is ready to accept user connections. The LM will wait amaximum of one hour for the server, and then terminate.

EXAMPLE 1: STARTING A JOB

$JOB SYNC_UFI; JOBLIB SM O7103A.SM; STEP H_OR_WOR O7103A.LM OPTIONS = 'MYBASE/MYDIR/O7103A/AMERICAN/* '; ENDSTEP; JOBLIB SM O7103A.SM; STEP H_OR_AFI O7103A.LM OPTIONS = 'MYBASE/MYDIR/O7103A/AMERICAN/* '; ASSIGN STDIN MYDIR.SL SUBFILE = CMDS_SQL; ENDSTEP; $ENDJOB;

Page 38: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-22 47 A2 12UR Rev04

EXAMPLE 2:

This example shows how you can run a processor, SQL*Plus for example, in GCLabsentee mode. When you check the JOR of such a run, you will find the JCLequivalent.

S: MP O7103AS: MWINLIB BIN .BIN;S: ORACLE CLASS = K;S: MP MYDIR;S: SQLPLUS INSTANCE = MYSERVER ABSENTEE COMFILE = MYCON 14.52 X463 IN GENORA USER1 K SPR = 2 X0462 MAIN--> 14.52 X463 STARTED GENORA USER1 K--> 14.52 X464 IN SQLPLUS USER1 K SPR = 2 X0463 MAIN--> 14.52 X463.2 COMPLETED GENORA USER1 K--> 14.52 X464 STARTED SQLPLUS USER1 K--> 14.52 X463 OUTPUT COMPLETED GENORA USER1--> 14.52 X464.1 COMPLETED SQLPLUS USER1 K

Use the GCOS 7 SCANNER processor to find the JCL equivalent (or use the JCLparameter - see Appendix A of this manual).

$JOB SQLPLUS CLASS = K JOR = NORMALJOBLIB SM O7103A.SM;STEP H_OR_AFI (O70B.LM) DUMP = NO OPTIONS ='MYSERVER/MYDIR/O70B/* @MYCOM ';SIZE 160;ENDSTEP;$ENDJOB;

Where:

MYSERVER - instance nameMYDIR - current working directoryO7103A - MSGDIR@MYCOM - COMFILE

Page 39: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The GCL Interface

47 A2 12UR Rev04 1-23

1.6 Exiting from an ORACLE Processor or Utility using EOS

If you wish to interrupt a processor or utility, you can use the standard GCOS 7system interrupt mechanism, which was described earlier.

To exit cleanly, you can enter EOS (in upper case letters) as the reply to any promptissued by the current processor or utility. EOS is always treated as an 'end of input'indicator. When replying to prompts, therefore, treat EOS as a reserved word.

EXAMPLE:

Enter the SQL*Plus processor, then change your mind and exit instantaneously.

S: SQLPLUS; .........

Enter user name: EOS

.........S:

NOTE:Always enter EOS in upper case.

Page 40: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

1-24 47 A2 12UR Rev04

Page 41: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 2-1

2. The SOR Processor

2.1 Introduction

You use the SOR Processor to start or stop an ORACLE database server.

Refer, if necessary, to the ORACLE7 Installation Guide, for further informationabout action to be taken before SOR is used.

2.2 SOR Syntax

SOR

ACTION = { INITIALIZE } { INIT } { I } { WARMSTART } { WARM } { W } { } { SHUTDOWN } { SHUT } { S } { CLEAR } { C } { } { ADDTASKS } { A }

[ NUMTASKS = { 16 } ] { 24 } ] { 32 } ]

[ ASMO = { 0 } ] [ = { 1 } ]

[ <standard-parameter-set> ]

Page 42: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

2-2 47 A2 12UR Rev04

2.3 SOR Parameters

ACTION Specifies the type of SOR execution that is to takeplace.

Choose one of the options described below.

INITIALIZEINITIWARMSTARTWARMW Starts an ORACLE database server. Up to 14 tasks are

made available. Some of these are dedicated to thestandard ORACLE7 background process (SMON,PMON, DBWR, ...), the others are available toperform connections to ORACLE. Depending on theconfiguration of your ORACLE server, a SOR W willgive you about 7 free tasks to perform connections toORACLE7. Further tasks (or connections) can beadded (see the ADDTASKS option). StartingORACLE is described in Section 4 of the ORACLE7Installation Guide.

SHUTSCLEARC Stops an ORACLE database server. Shutdown is

described in Section 4 of the ORACLE7 InstallationGuide.

ADDTASKSA This option is to be used when it is necessary to

increase the number of ORACLE tasks needed toperform a two-task or SQL*Net connection. Eachtime SOR ADDTASKS is issued, the number ofavailable ORACLE tasks is increased by the valuegiven to the NUMTASKS parameter.

Page 43: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SOR Processor

47 A2 12UR Rev04 2-3

NUMTASKS Specifies the number of additional ORACLE tasks tobe started when a SOR A command is typed. You canenter a value 8, 16, 24 or 32. The default value is 16.

standard-parameter-set Refer to Section 1.

For SOR, the SIZE parameter should be specified toensure that there is sufficient memory available for theprocessor to execute. The value of SIZE can beestimated using the following formula:

SIZE >= 2000 + (n - 200) * 4 + (m - 3500000)/1024

where, n = number of buffers, and m = shared poolsize, as declared in the parameter file INIT_ORA.

SIZE = 2000 is sufficient for up to 200 buffers and a3500000 bytes shared pool size.

You must not specify the USERID parameter.

ASMO If 1, all the messages written in the ALERT_LOG filewill also be displayed to the OPERATOR console. If 0(the default), messages will only be written in theALERT_LOG.

Page 44: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

2-4 47 A2 12UR Rev04

2.4 SOR Execution Notes

The SOR INITIALIZE command starts an ORACLE database server.

On a given site several ORACLE database servers may exist, each one workingwith its own private database files.

The ORACLE database server is fully initialized (that is, a database can be opened)when the message:

ORACLE instance server xxx initialized

is displayed.

The SOR ADDTASKS command starts an additional ORACLE database server. Itmust be issued when the current number of initiated ORACLE tasks is notsufficient to be connected to the ORACLE database Server (that is, the connectionis refused with the message "No vacant process, retry later").

There are 2 conditions to be able to start an additional ORACLE database server:

• the ORACLE Database server must be running (that is a SOR INITIALIZE musthave been executed and at least a STARTUP NOMOUNT command under theSQL*DBA processor must have been executed),

• and the ORACLE Communication manager must be running (that is, COR Imust have been executed).

The additional ORACLE Database server is fully initialized when the message:

ORACLE task server initialized

is displayed.

If you issue an SOR SHUTDOWN, the default mode of execution is interactive.That is, the ABSENTEE parameter takes the value 0. If required, however, youcan set this option to ABSENTEE mode by setting the parameter to 1.

If you issue an SOR INITIALIZE, the default mode of execution is absentee. Thatis, the ABSENTEE parameter takes the value 1. Interactive mode is notrecommended for this option. The terminal becomes blocked until a SOR Scommand is executed, either from another terminal, or from a batch job.

NOTE:If you have several ORACLE versions (for example, OR6018 and O7103A),and you use SOR A to launch an additional ORACLE server, you must ensurethat the SOR A command uses the same ORACLE version as that of the SORW command.

Page 45: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SOR Processor

47 A2 12UR Rev04 2-5

When the ASMO=1 option is choose, all the messages written in the ALERT_LOGwill also be displayed on the operator console under the following format:

<oracle instance name> <message>

For example, for an ORACLE instance named ORASRV, messages will bedisplayed on the operator console using the following format:

... ORASRV Thread 1 advanced to log sequence 245 ORASRV Current log# 1 seq# 245 mem# 0: ORASRV.LOG1

...

Page 46: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

2-6 47 A2 12UR Rev04

Page 47: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 3-1

3. The COR Processor

3.1 Introduction

You use the COR Processor to start or stop the ORACLE CommunicationManager. Under GCOS 7, SQL*Net can operate only if that specific server isexecuting. Connections from a remote site or connections from the local sitethrough the two-task interface require the ORACLE Communication Manager(COR) to be running. To allow connections between two DPS 7000 hosts, CORmust be executed on each site.

COR generates a batch job which manages all remote connections to and fromORACLE servers/users on the site.

Refer, if necessary, to the SQL*Net With ORACLE7 User's Guide to get moreinformation about COR.

3.2 COR Syntax

COR

[ ACTION = { INITIALIZE } ] [ { I } ] [ { } ] [ { SHUTDOWN } ] [ { SHUT } ] [ { S } ] [ { CLEAR } ] [ { C } ]

[ <standard-parameter-set> ]

Page 48: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

3-2 47 A2 12UR Rev04

3.3 COR Parameters

ACTION Specifies the type of COR execution which is to takeplace. You must choose one option described below.The default value is I.

INITIALIZEIINIT Starts the ORACLE Communication Manager.

Wait for the message "ORACLE CommunicationsServer Initialized" to appear.

SHUTDOWNSHUTSCLEARC Stops the ORACLE Communication Manager.

Wait for the message "ORACLE CommunicationsServer Shutdown Complete" to appear.

standard-parameter-set Refer to Section 1

USERID parameter could not be specified.

Page 49: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The COR Processor

47 A2 12UR Rev04 3-3

3.4 COR Execution Notes

Even if several ORACLE Database server (and additional ORACLE databaseservers) are running on the same site (each one having its own private database),only one ORACLE Communication manager must be running.

An attempt to launch a new ORACLE communication manager when a precedingone is still running is aborted with the message:

"The server name entry is busy"

Note that, if you issue a COR S or a COR C command when an ORACLE databaseserver is running, all the running processes in this database server will be aborted.

If you issue a COR SHUTDOWN, the default mode of execution is interactive.That is, the ABSENTEE parameter takes the value 0. If required, however, thisoption can be selected with the ABSENTEE parameter set to 1.

If you issue a COR INITIALIZE, the default mode of execution is absentee. Thatis, the ABSENTEE parameter takes the value 1. Interactive mode is notrecommended for this option. The terminal becomes blocked until a COR Scommanded is executed, either from another terminal, or via a batch job.

NOTE:If several ORACLE database servers with different versions (for example, anOR6018 database server and an O7103A database server) are running on yoursite, you are recommended to launch the COR server under the most recentORACLE version (version O7103A in this example).

Page 50: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

3-4 47 A2 12UR Rev04

Page 51: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 4-1

4. The WOR Processor

4.1 Introduction

The WOR Processor (Wait ORACLE) can be used to ensure synchronization of ajob with the ORACLE database server.

When this command is submitted, it will terminate only if the ORACLE databaseserver is in the state given by the TYPE parameter (either in a started state, or in aready state).

Also refer to Section 1.5 of this manual to get additional information on how to usethe WOR processor.

4.2 WOR Syntax

WOR

[ TYPE = { 1 } ] [ { 2 } ]

[ USERID = { SYSTEM/MANAGER } ] [ { <user-name>/<password> } ]

[ SITE = { <remote-site> } ]

[ COUNT = { 60 } ] [ { <dec-2> } ]

[ INTERVAL = { 60 } ] [ { <dec-2> } ]

[ <standard-parameter-set> ]

Page 52: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

4-2 47 A2 12UR Rev04

4.3 WOR Parameters

TYPE Specifies the state of the ORACLE database server towait for.

The TYPE = 1 setting is useful when it is onlynecessary to wait for the ORACLE database serverinitialization.

The TYPE = 2 setting is useful when it is necessary towait for the opening of the database.

The default value is 2.

USERID Specifies the <username> and the <password> to beused. The default value is SYSTEM/MANAGER.

SITE Specifies the name of the (remote) site on which theORACLE database server is running.

COUNT Specifies the number of tries to be done against theORACLE database sever. The value given must be inthe interval [1,99]. The default value is 60.

INTERVAL Specifies the interval of time, in seconds, between twotries. The value given must be in the interval [1,99].The default value is 60 (60 seconds).

standard-parameter-set Refer to Section 1.

4.4 WOR Execution Notes

Once the WOR processor starts executing it tries to contact the ORACLE databaseserver at regular intervals defined by the values COUNT and INTERVAL.

Depending on the value of the TYPE parameter, the WOR processor will terminateeither:

• if TYPE = 1, when the ORACLE database server is ready (that is, the "ORACLEinstance server xxx initialized" message has been issued by the server),

or

• if TYPE = 2, when the database associated to the ORACLE database server hasbeen opened under the SQL*DBA processor.

When the amount of time defined by the COUNT and INTERVAL values has beenspent without contacting the ORACLE database server, the WOR processor isaborted.

Page 53: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 5-1

5. The LIST_SVR Processor

5.1 Introduction

The LIST_SVR Processor (LIST SerVeR) can be used to display a list of allORACLE process groups running on the site.

This list may include:

• the ORACLE communication manager (COR),

• the ORACLE database server(s) identified by their instance name.

• the SQLNET ADAPTER (SQL*Net V2)

Refer to the SQL*Net V2 with GCOS 7 User's Guide to get information on theSQLNET_ADAPTER.

5.2 LIST_SVR Syntax

LIST_SVR

[ <standard-parameter-set> ]

5.3 LIST_SVR Parameters

standard-parameter-set Refer to Section 1.

USERID parameter could not be specified.

Page 54: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

5-2 47 A2 12UR Rev04

5.4 LIST_SVR Execution Notes

This command display on the user console a list of the ORACLE process groupsrunning on the site.

The format of the generated list (not ordered list) is given below:

LIST OF RUNNING SERVERS :INSTANCE NAME TYPE RON J.P. PROJECT VERSION ORACLE WORKING DIR.<Oracle-process-group> <Process-group-type> <Xron> <j.p> <project> <xyzz> <Oracle-directory>

<Oracle-process-group> <Process-group-type> <Xron> <j.p> <project> <xyzz> <Oracle-directory>

with:

<Oracle-process-group>: - COR for the ORACLE communication manager, - the INSTANCE name for an ORACLE database server, - the SQL*Net V2 ALIAS handled by a SQLNET ADAPTER<Process-group-type>: a string identifying the type of the process group: - « Database Server » for an ORACLE INSTANCE, - « Sqlnet Adapter (Mono) » or « Sqlnet Adapter (Multi) » depending on the SQLNET_ADAPTER type.

<Xron>: The GCOS 7 process-group identification (for example, X2356).

<j.p>: The GCOS 7 process-group number in decimal notation (for example, 26.0).

<project>: The GCOS 7 project under which the ORACLE process-group was launched.

<xyzz>: The ORACLE release (for example, 7.3.2.0 for version 7.3.2.0).

<Oracle-directory>: The GCOS 7 directory in use when the ORACLE process-group was launched.

Page 55: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The LIST_SVR Processor

47 A2 12UR Rev04 5-3

NOTES:1. If some additional ORACLE database servers (SOR A) have been

launched for a given INSTANCE, only the primary (SOR W) ORACLEdatabase server will be displayed by this command.

2. Some of the information displayed above depends on the ORACLEversion. The <xyzz> and <Oracle-directory> are displayed only for anORACLE process group launched with:

at least version OR6020 for ORACLE V6, or

at least version O7013C for ORACLE7.

In other words, ORACLE process groups launched with versions OR6016,OR6018, or O7013A will not have the Version and the ORACLE working-directory displayed.

Page 56: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

5-4 47 A2 12UR Rev04

Page 57: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 6-1

6. The SQL*DBA Processor

6.1 Introduction

The SQL*DBA Processor is the most useful tool for a Database Administrator(DBA).

SQL*DBA may be used for many tasks, including:

• creating a new database;

• starting and stopping an instance;

• running SQL statements;

• monitoring database activity;

• archiving online redo log files;

• recovering from instance or media failure.

Refer to the ORACLE7 Server Administrator's Guide to get complete informationon how to use the SQL*DBA processor and to the ORACLE7 Installation Guide(which provides examples of use).

6.2 SQL*DBA Syntax

SQLDBA

[ COMFILE = <comfile-name> ]

[ <standard-parameter-set> ]

Page 58: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

6-2 47 A2 12UR Rev04

6.3 SQL*DBA Parameters

COMFILE When activating SQL*DBA with no complementaryparameters, the default execution mode is interactive.When COMFILE is specified, SQL*DBA firstexecutes the set of commands included in the filebefore prompting begins.

The name of the command file can be a local file namewhich is converted by the system to an absolute filename (see "Rules for Naming ORACLE Files" inSection 1 of this manual).

The default COMFILE extension is _SQL.

If COMFILE is specified, any INFILE is ignored.

COMFILE is similar to INFILE, but COMFILEperforms dynamic file assignment, while INFILEperforms static file assignment via the STDIN internalfile name.

standard-parameter-set Refer to Section 1.

You must not specify the USERID parameter.

6.4 SQL*DBA Startup File

There is an optional startup file named SQLDBA_SQL for SQL*DBA.

When a SQL*DBA session is started, this startup file is searched for in the#WD.SL library (where #WD is the current user directory at the time SQL*DBA isinvoked).

6.5 The Monitor Command

In this version of ORACLE7, the MONITOR command of the SQL*DBAprocessor is not available.

6.6 The Menu Mode

The Menu Mode is not supported under GCOS 7.

Page 59: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 7-1

7. The ORAPWD Utility

7.1 Introduction

You use the ORAPWD Utility to create the password file associated to anORACLE Database.

The password file is used to authenticate users performing database administration.

It is used together with the REMOTE_LOGIN_PASSWORDFILE initializationparameter.

Database connection security is fully described in chapter 5 of the ORACLE7Server Documentation Addendum manual.

7.2 ORAPWD Syntax

ORAPWD

FILE = <file>

PASSWORD = <char60>

[ ENTRIES = <dec-4> ]

<standard-parameter-set>

Page 60: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

7-2 47 A2 12UR Rev04

7.3 ORAPWD Parameters

FILE Specifies the name of the password file to be created.The name must be of the form #WD.ORAPWD (#WD= Working Directory of the ORACLE instance).

PASSWORD Specifies the initial password associated to the SYSand INTERNAL users.

ENTRIES Specifies the maximum number of entries allowed inthe password file.

standard-parameter-set Refer to section 1

You must not specify USERID

7.4 ORAPWD Execution Notes

A password file cannot be shared between several databases. Each database to beprotected must have its own password file.

As a consequence, the SHARED value of theREMOTE_LOGIN_PASSWORDFILE is not supported on GCOS 7.

The name of the password file must be of the form "#WD.ORAPWD" where #WDis the working directory associated with the INSTANCE handling the ORACLEdatabase (the INSTANCE name displayed by the LIST_SVR command).

Page 61: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 8-1

8. The SQL*Plus Processor

8.1 Introduction

The SQL*Plus Processor enables you to use the SQL data language to createqueries, manipulate and change the contents of relational tables, produce reportsquickly, and control access rights to part or all of the database.

SQL*Plus commands are described in the SQL*Plus User's Guide and Reference.

8.2 SQL*Plus Syntax

SQLPLUS

[ COMFILE = <command-file> ]

[ NOLOG = { 0 } ] [ { 1 } ]

[ SILENT = { 0 } ] [ { 1 } ]

[ <standard-parameter-set> ]

Page 62: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

8-2 47 A2 12UR Rev04

8.3 SQL*Plus Parameters

COMFILE <command-file> allows you to specify a command filewhich will be executed as soon as the SQL*Plusprocessor starts. It can be used to perform a series ofprearranged tasks.

The name of the command file can be a local file namewhich is converted by the system to an absolute filename (see "Rules for Naming ORACLE Files" inSection 1). If COMFILE is specified, any INFILE isignored.COMFILE is similar to INFILE, but COMFILEperforms dynamic file assignment, while INFILEperforms static file assignment via the STDIN internalfile name (see Section 1).

NOLOG Allows you to execute the SQL*Plus processorwithout connecting to an ORACLE database. Thedefault value 0 requires a connection. You can executecommands such as COLUMN, SHOW and SET, butnot commands that act on the ORACLE database. Youcan log on using a CONNECT command if you wish.

SILENT Allows you to suppress all of SQL*Plus'sinformational and prompt messages, including thecommand prompt (SQL>) and the program bannernormally displayed when SQL*Plus is started. Thedefault value is 0.

standard-parameter-set Refer to Section 1.

Page 63: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SQL*Plus Processor

47 A2 12UR Rev04 8-3

8.4 SQL*Plus Command Files

When a SQLPLUS command is issued, a default source library is associated withthe environment. The name of this library is the current working directory,suffixed by .SL. This allows subfiles contained in that library to be referenced onlyby their name (without adding the _SQL suffix, as described in Section 1).

EXAMPLE:

To set up a working directory OR7000, to call the SQL*Plus processor (with thecorrect user/password combination), and to execute the commands contained in thesubfile called RQ1_SQL, enter the following:

S: MDP OR7000; S: SQLPLUS SCOTT/TIGER; SQL> START RQ1

The default library can be changed during an SQL*Plus session by using the GCLdirective MODIFY_PROFILE (MDP), preceded by the $$ identifier or as aparameter of the HOST command.

EXAMPLE:

To change the working directory to ORA.V7:

SQL> $$MDP ORA.V7

or:

SQL> HOST MDP ORA.V7;

Subfiles in a library that is not the default library must be referenced by theirabsolute file names.

EXAMPLE:

To execute the commands contained in the subfile RQ2_SQL in the MYLIBlibrary, enter the following:

SQL> START MYLIB..RQ2

See Section 1 for more details about rules for naming ORACLE files.

Page 64: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

8-4 47 A2 12UR Rev04

8.5 SQL*Plus Startup Files

There are two startup files for SQL*Plus:

• GLOGIN_SQL file for a global setup,

• LOGIN_SQL file for a local setup.

When a user invokes SQL*Plus, the contents of the GLOGIN_SQL is read first,then the contents of the user's LOGIN_SQL.

GLOGIN_SQL, which is a global startup file, is searched for in the<MSG_DIR>.SL library.

LOGIN_SQL, which is a local startup file, is searched for in the #WD.SL library(#WD is the current user's directory at the time SQL*Plus is invoked).

8.6 The Edit Command

The EDIT (or ED) command allows you to call the standard GCOS 7MAINTAIN_LIBRARY processor.

The library assigned under the MAINTAIN_LIBRARY session is the current#WD.SL library (#WD is the current user's directory at the time EDIT is invoked).It allows you to call a GCOS 7 editor (ED or FSE) to edit a member of this library.

EXAMPLE:

To edit MY_MEMBER located in the current #WD.SL library:

SQL> EDIT; C: ED; R: R MY_MEMBER; R: ...

NOTE:It is not possible, under the MAINTAIN_LIBRARY session, to dynamicallychange the assigned library (LIB, ILi and INFILE commands are rejected).

Page 65: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SQL*Plus Processor

47 A2 12UR Rev04 8-5

8.7 The Spool Command

SPOOL allows you to transfer your SQL*Plus output (that is, the dialogue betweenyou (the user) and ORACLE), to a file that can be spooled for printing.

SPOOL has three formats:

SPOOL <file-name> Opens a file to receive the output generated bySQL*Plus. Under SQL*Plus, the default file extensionfor SPOOL files is _LIS.

SPOOL OFF Closes the file currently open for spooling.

SPOOL OUT Closes the last file created by a SPOOL command, andschedules the printing of its contents from the publicSYSOUT file. Note that the file can be printed againvia the GCL directive DPRINT.

Page 66: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

8-6 47 A2 12UR Rev04

8.8 Using SQL*Plus to Format Reports

You can quickly produce good-quality reports using SQL*Plus. For example, youcan generate titles at the top or bottom of a page, and control the number of linefeeds at the top of each page.

EXAMPLE:

Suppose your terminal has 24 lines of 80 characters each. You can create thefollowing SQL*Plus command file to display the table named EMP and format itcorrectly on the screen.

SET LINESIZE 77 SET PAGESIZE 21 BTITLE '|' NEWPAGE SELECT * FROM EMP;

You can execute such a command file by the SQL command, START.

EXAMPLE:

If you want to set up a report to be printed on standard listing paper, that is, 66lines, 120 characters per line, you could use the following command file:

SET LINESIZE 120 SET PAGESIZE 64 BTITLE '|' SET ECHO OFF NEWPAGE SPOOL REPORT SELECT * FROM EMP; SPOOL OUT

Page 67: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SQL*Plus Processor

47 A2 12UR Rev04 8-7

8.9 Using HOST to Issue GCOS 7 Commands

The HOST command enables you to enter GCOS 7 command lines from withinSQL*Plus.

It does not allow to substitute an IOF session to the current SQL*Plus session butgives availability to execute:

• a command of the GCOS 7 H_NOCTX domain (such as MODIFY_PROFILE -MDP-, DISPLAY_SUBMITTER -DS-, ....),

• a command, in absentee mode (ABSENTEE parameter=1), of the ORACLEdomain (such as LIST_SVR, ...).

NOTE:A HOST command without any parameter return to the SQLPLUS> prompt.

EXAMPLE:

SQL> HOST DS OUT;

to check your own GCOS 7 output.

SQL> HOST DS EX;

to check which jobs are executing.

Page 68: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

8-8 47 A2 12UR Rev04

Page 69: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 9-1

9. The SQL*Loader Utility

9.1 Introduction

The SQL*Loader utility enables you to load data from an existing GCOS 7 fileinto existing table(s) of an ORACLE database. You must have INSERT access tothe table(s), even if you have only CONNECT access to the database.

SQL*Loader reads a control file (CONTROL) that contains general directions forload execution including a description of the input data file, the name of the inputdata file, the name(s) of the ORACLE table(s) into which the data is to be loaded,and the correspondence between fields in the data file and columns in the table(s).

The distribution media for SQL*Loader contains a set of sample files prefixedULCASE*. These examples are shown in the ORACLE7 Server Utilities User'sGuide which contains full details of the SQL*Loader utility.

NOTE:In order to be able to use the SQL*Loader, the CATLDR_SQL script must havebeen run. Refer to the ORACLE7 Server Utilities User's Guide.

Page 70: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

9-2 47 A2 12UR Rev04

9.2 SQL*Loader Syntax

SQLLOAD

CONTROL = <control-file>

[ LOG = <log-file> ]

[ BAD = <bad-file> ]

[ DATA = <data-file> ]

[ DISCARD = <discard-file> ]

[ PARFILE = <parameter-file>

[ DISCARDMAX = { -1 } ] [ { <dec9> } ]

[ SKIP = { 0 } ] [ { <dec9> } ]

[ LOAD = { 0 } ] [ { <dec9> } ]

[ ERRORS = { 50 } ] [ { <dec9> } ]

[ ROWS = { 64 } ] [ { <dec9> } ]

[ BINDSIZE = <dec6> ]

[ SILENT ={ } ] [ ={ | HEADER | } ] [ ={ | FEEDBACK | } ] [ ={ | ERRORS | } ] [ ={ | DISCARDS | } ] [ ={ } ] [ ={ ALL } ]

[ DIRECT = { FALSE } ] [ { TRUE } ]

[ PARALLEL = { FALSE } ] [ { TRUE } ]

[ FILE = <file-file> ]

[ <standard-parameter-set> ]

Page 71: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SQL*Loader Utility

47 A2 12UR Rev04 9-3

9.3 SQL*Loader Parameters

CONTROL <control-file> specifies the control file that describeshow to load data. The default file extension is _CTL.The ORACLE7 Server Utilities User's Guide providesall the necessary information about control file syntax.

LOG <log-file> specifies the log file created bySQL*Loader to store information about the loadingprocess. If a filename is not specified, the name of thecontrol file is used to build a log file name. Thedefault log file extension is _LOG.

BAD <bad-file> specifies the bad file created bySQL*Loader to store records that cause errors duringinsert, or that are improperly formatted. If a filenameis not specified, the name of the control file is used tobuild a bad file name. The default bad file extension is_BAD. The bad file has the same format as the inputdata file, so it can be loaded by the same control fileafter appropriate updates or corrections are made.

DATA <data-file> specifies the data file containing the data tobe loaded. If a filename is not specified, the name ofthe control file is used to build a data file name. Thedefault data file extension is _DAT. Data may bestored directly in the control file.

DISCARD <discard-file> specifies an optional discard file createdby SQL*Loader to store records that are neitherrejected nor inserted into a table. If a filename is notspecified, the name of the control file is used to build adiscard file name. The default discard file extension is_DSC. The discard file has the same format as theinput data file, so it can be loaded by the same controlfile after appropriate updates or corrections are made.

PARFILE <parameter-file> specifies an optional parameter filecontaining other SQL*Loader parameters.

SPECIAL NOTES FOR THE ABOVE PARAMETERS:File names follow the general ORACLE file naming rules described in Section1. A file can be a member of an SL library or a UFAS sequential file. If aUFAS file does not exist at loading time, SQL*Loader will create it. If an SLlibrary does not exist at loading time, SQL*Loader will not create it. If amember of an SL library does not exist, SQL*Loader will create it. If amember with the same name already exists, SQL*Loader will overwrite it.

Page 72: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

9-4 47 A2 12UR Rev04

DISCARDMAX Specifies the number of discard records allowed beforeterminating the load. The default value (-1) means thatall discarded records are accepted. To stop on the firstdiscarded record, specify zero (0).

SKIP Specifies the number of logical records, from thebeginning of the file that should not be loaded. Bydefault, no records are skipped.

LOAD Specifies the maximum number of logical records toload (after skipping the specified number of records).The default value (0) means that all records arecandidates to be loaded. No error occurs if fewer thanthe maximum number of records are found.

ERRORS Specifies the number of insert errors allowed beforeterminating the load. The default value is 50. To stopon the first error, specify zero (0). To specify that allerrors be allowed, specify a very high number.

ROWS In the conventional path (DIRECT = FALSE) itspecifies the number of rows to buffer at one timebefore performing an insert and commit. The defaultvalue is 64.

In the direct path, it identifies the number of rows toread before doing a data save. The default is to savedata once at the end of the load.

Refer to the ORACLE7 Server Utilities User's Guide.

BINDSIZE Specifies the maximum size of the bind array in bytes.The size of the bind array given by BINDSIZEoverrides the default size and any size computed on thebasis of ROWS.

SILENT Specifies the feedback mode. If you want to suppressthe SQL*Loader header, specify HEADER. If youwant to suppress feedback at each commit point,specify FEEDBACK. If you want to suppress entriesin log file for each record generating an ORACLEerror, specify ERRORS. If you want to suppressentries in the log file for each record written to thediscard file, specify DISCARDS. You can specify alist or more easily, you can specify ALL to do all ofthe above.

Page 73: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SQL*Loader Utility

47 A2 12UR Rev04 9-5

DIRECT Specifies the SQL*Loader processing mode. If youwant to use the conventional path of the SQL*Loader,specify FALSE. If you want to use the direct path ofthe SQL*Loader, specify TRUE. The default value isFALSE

PARALLEL Specifies that multiple concurrent sessions to performa direct path loading on the same table are allowed.

The TRUE value must be used together with theDIRECT=TRUE parameter.

The default value is FALSE.

FILE Specifies the database file from which temporarysegments used by concurrent sessions will beallocated.

This parameter is only valid when thePARALLEL=TRUE parameter is set.

standard-parameter-set Refer to Section 1.

Page 74: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

9-6 47 A2 12UR Rev04

9.4 Conventional and Direct Path

You can choose between two SQL*Loader processing modes:

• the Conventional Path processing mode:

in this mode, multiple data records are read in and placed in a bind array. Whenthe bind array is full it is passed to ORACLE for insertion. This path uses theORACLE SQL interface with the array option,

• the Direct Path processing:

in this mode, data records are put in into formatted database blocks and writtendirectly to the database, bypassing most RDBMS processing. This path is muchfaster than the conventional path but entails several restrictions.

The ORACLE7 Server Utilities User's Guide provides all the necessary informationabout these two processing modes.

Page 75: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SQL*Loader Utility

47 A2 12UR Rev04 9-7

9.5 Loading Data from an SL Library Member

SQL*Loader can be used to load data from a member of an SL library. Youindicate the file read mode in the LOAD DATA section of the control file to tell theSQL*Loader how to open the data file and how to retrieve physical records. Fourread modes can be specified:

STREAM The datafile is treated as a sequential byte stream.Characters are read one at a time. Physical reads aredelimited by new lines, and the notion of lines used bythe standard editors like EDIT or FSE is disabled.

RECORD This is the default read mode. SQL*Loader then usesthe GCOS 7 file management to retrieve the physicalrecords.

FIXED <len> Logical records are of fixed length, as specified by len.A new record is obtained by reading <len> bytesdirectly from the file. FIXED refers to the physicalrecord format.

VARIABLE [<len>] The length of a record is contained in the first twobytes. A record is read by first reading the length, thenreading that many bytes from the file. The 2-bytelength is not considered to be part of the record. Thevalue <len> is an optional maximum length used forbuffering optimization. For buffering efficiency, youmay specify an optional length which you guaranteethe records will not exceed. If not specified, 8K bytesare allocated for each record.

EXAMPLE:

To load data from a member of an SL library, the member name EX_DAT of the.SL library contains the following:

7782 CLARK7839 KING7934 MILLER

The ORACLE table named T has been created using the following SQL*Pluscommand:

CREATE TABLE T (NUM NUMBER 4, NAME VARCHAR2(10))

Page 76: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

9-8 47 A2 12UR Rev04

The control file stored in the member named EX_CTL of the .SL library containsthe following:

LOAD DATA INFILE EX_DAT INTO TABLE T (NUM POSITION (01:04) INTEGER, NAME POSITION (06:15) CHAR)

To load the data contained in the member named EX_DAT using the membernamed EX_CTL as the control file and the member EX_LOG as the log file, youcan enter:

SQLLOAD SCOTT/TIGER CONTROL = EX_CTL LOG = EX_LOG

assuming that the ORACLE table was created under the user identificationSCOTT/TIGER.

NOTE:When UID is not specified, SQL*Loader prompts for a username/password.

Page 77: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The SQL*Loader Utility

47 A2 12UR Rev04 9-9

9.6 Loading Data from Sequential Files

SQL*LOADER can be used to load data from a sequential UFAS file. The fileread modes may be used as for library members. If the file from which you want toload data is not sequential, you first have to unload it into a sequential file.

For example, if the data is contained in a UFAS indexed file, you must first unloadthe data into a UFAS sequential file (for example, by using IQS or COBOL), andthen proceed with SQL*Loader.

Page 78: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

9-10 47 A2 12UR Rev04

9.7 Input Data Formats

The data input to SQL*Loader must be in one of the following formats:

• character format;

• binary format (1, 2 or 4 bytes long);

• floating point format (keywords FLOAT and DOUBLE (4 and 8 bytes) in theINTO TABLE clause of the control file);

• ORACLE date format (with an ORACLE date mask like 'DD-MON-YY');

• variable length character format (VARCHAR keyword: the length is held in thefirst 2 bytes and the character string follows the length);

• packed decimal format (DECIMAL keyword);

• graphic format.

For each field, you can specify its datatype in the INTO TABLE section of thecontrol file. The default is the character format.

For more details about syntax, refer to the ORACLE7 Server Utilities User's Guide.

Page 79: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 10-1

10. The Import/Export Utilities

10.1 Introduction

You use the Import Utility (abbreviation IMP) to move previously exported datafrom a GCOS 7 sequential file back into an ORACLE database.

You use the Export Utility (abbreviation EXP) to move part or all of an ORACLEdatabase into a GCOS 7 sequential file, either for data archive purposes, or for laterrestoration using Import. The output sequential file can be a UFAS (or BFAS)sequential file, or a member of an SL library.

If you wish to import data from a GCOS 7 sequential file which was not previouslyexported via Export, you must use the SQL*Loader utility (see Section 8).

Depending on the parameters provided with an Export or Import command, thesystem can start a question-and-answer session to determine the details of therequired operation.

Import and Export are discussed further in the ORACLE7 Server Utilities User'sGuide.

NOTE:In order to be able to use the IMPORT/EXPORT utilities, the CATEXP_SQLscript must have been run. See the ORACLE7 Server Utilities User's Guide.

Page 80: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

10-2 47 A2 12UR Rev04

10.2 Import Syntax

IMP

[ BUFFER = <dec5> ]

[ FILE = <file> ]

[ SHOW = { 0 } ] [ { 1 } ]

[ IGNORE = { 0 } ] [ { 1 } ]

[ GRANTS = { 0 } ] [ { 1 } ]

[ INDEXES = { 0 } ] [ { 1 } ]

[ ROWS = { 0 } ] [ { 1 } ]

[ FULL = { 0 } ] [ { 1 } ]

[ FROMUSER = ( <name> [ ,<name> ] ... ) ]

[ TOUSER = (<name> [ ,<name> ] ... ) ]

[ TABLES = ( <name> [ ,<name> ] ... ) ]

[ INCTYPE = { SYSTEM } ] [ { RESTORE } ]

[ COMMIT = { 0 } ] [ { 1 } ]

[ PARFILE = <file> ]

[ DESTROY = { 0 } ] [ { 1 } ]

[ INDEXFILE = <file> ]

[ HELP = { 0 } ] [ { 1 } ]

[ <standard-parameter-set> ]

Page 81: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Import/Export Utilities

47 A2 12UR Rev04 10-3

10.3 Import Parameters

BUFFER The size, in bytes, of the buffer used to fetch datarows. If zero is specified, or if rows contain LONGdata, only one row at a time is fetched.

FILE The name of the export file to import. The default filename (FILE parameter not given) is built with thecurrent working directory (#WD) followed by.EXPDAT_DMP. If a <file> name is specified (e.g.,MYFILE), the resulting file name will be built with thecurrent working directory followed by .<file>_DMP(for example .MYFILE_DMP).

SHOW A flag to indicate whether to only list the contents ofthe export file, and not import the table data, not createany objects, and not modify the database. The defaultis 0.

IGNORE A flag to indicate whether to ignore create errors dueto the object's existence. The default is 0.

GRANTS A flag to indicate whether to import grants.The default is 1.

INDEXES A flag to indicate whether to import indexes.The default is 1.

ROWS A flag to indicate whether to import the rows of tabledata. The default is 1.

FULL A flag to indicate whether to import the entiredatabase. The default is 0. If FULL=0, you areprompted for the names of objects to import.

FROMUSER A list of usernames whose objects will be imported.The default is undefined.

TOUSER A list of usernames to whom data will be imported.The default is undefined.

TABLES A list of table names to import.

INCTYPE The type of incremental import. Valid values areSYSTEM and RESTORE. The default is undefined.

COMMIT A flag to indicate whether to commit after each arrayinsert. The default is 0. When the value 0 is specified,Import commits after loading each table.

Page 82: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

10-4 47 A2 12UR Rev04

PARFILE The name of an import parameter file that contains oneor more parameter specifications.

DESTROY A flag to indicate if the existing data files should bereused. The default is 0.

INDEXFILE The name of a file to receive index-creationcommands.

HELP A flag to indicate whether to obtain complementaryinformation about the current command. The defaultis 0.

standard-parameter-set The standard parameters, as described in Section 1, canbe used with Import.

Page 83: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Import/Export Utilities

47 A2 12UR Rev04 10-5

10.4 Export Syntax

EXP

[ BUFFER = <dec5> ]

[ FILE = <file> ]

[ COMPRESS = { 0 } ] [ { 1 } ]

[ GRANTS = { 0 } ] [ { 1 } ]

[ INDEXES = { 0 } ] [ { 1 } ]

[ ROWS = { 0 } ] [ { 1 } ]

[ CONSTRAINTS = { 0 } ] [ { 1 } ]

[ FULL = { 0 } ] [ { 1 } ]

[ OWNER = ( <name> [ ,<name> ] ... ) ]

[ TABLES = ( <name> [ ,<name> ] ... ) ]

[ INCTYPE = { COMPLETE } ] [ { CUMULATIVE } ] [ { INCREMENTAL } ]

[ RECORD = { 0 } ] [ { 1 } ]

[ PARFILE = <file> ]

[ HELP = { 0 } ] [ { 1 } ]

[ CONSISTENT = { 0 } ] [ { 1 } ]

[ STATISTICS = { ESTIMATE } ] [ { STATISTICS } ] [ { NONE } ]

[ DIRECT = { 0 } ] [ { 1 } ] [ <standard-parameter-set> ]

Page 84: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

10-6 47 A2 12UR Rev04

10.5 Export Parameters

BUFFER The size, in bytes, of the buffer used to fetch datarows. If zero is specified, or if rows contain LONGdata, only one row at a time is fetched.

FILE The name of the output file created by Export. Thedefault file name (FILE parameter not given) is builtwith the current working directory (#WD) followed by.EXPDAT_DMP. If a <file> name is specified (e.g.,MYFILE), the resulting file name will be built with thecurrent working directory followed by .<file>_DMP(for example .MYFILE_DMP).

COMPRESS A flag to indicate whether to compress table data intoone extent during a later Import. The default is 1.

GRANTS A flag to indicate whether to export grants.The default is 1.

INDEXES A flag to indicate whether to export indexes.The default is 1.

ROWS A flag to indicate whether to export the rows of tabledata. The default is 1.

CONSTRAINTS A flag to indicate whether to export table constraints.The default is 1.

FULL A flag to indicate whether to export the entiredatabase. The default is 0. Specify FULL=1 to exportin full database mode.

OWNER A list of usernames whose objects will be exported.Specify OWNER=userlist to export in user mode.

TABLES A list of table names to export. SpecifyTABLES=tablelist to export in table mode.

INCTYPE The type of incremental export. Valid values areCOMPLETE, CUMULATIVE and INCREMENTAL.The default is undefined.

RECORD A flag to indicate whether to record an incrementalexport in database tables SYS.INCVID, SYS.INCFILand SYS.INCEXP. The default is 1.

Page 85: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Import/Export Utilities

47 A2 12UR Rev04 10-7

PARFILE The name of an export parameter file that contains oneor more parameter specifications. The default isundefined.

HELP A flag to indicate whether to obtain complementaryinformation about the current command.The default is 0.

CONSISTENT A flag to indicate whether a read-consistent view ofthe database is exported. The default is 0.

STATISTICS The type of database optimizer statistics to generatewhen the exported data is imported at a later date.Valid values are ESTIMATE, COMPUTE and NONE.The default is NONE.

DIRECT Starting from Oracle O7340A the new DIRECTExport parameter is available.

This flag specify the data extract mode. The defaultis 0.

Specifying 1 causes Export to extract data by readingthe data directly, bypassing the SQL commandprocessing layer.

This method can be much faster than a conventionalpath Export.

Export files generated using direct path export areincompatible with earlier Import versions. If backwardcompatibility is an issue, we recommend that you useExport’s conventional path export.

Refer to “Oracle7 Server Utilities User’s Guide” formore information.

standard-parameter-set The standard parameters, as described in Section 1, canbe used with Export.

IMPORTANT:The output file is not the file you export into! It contains the report of the dialogand execution of the utility. The file to export into or to import from isspecified in the parameters or during the screen dialog.

13

3

Page 86: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

10-8 47 A2 12UR Rev04

The ORACLE database is specified by the INSTANCE parameter whether you areimporting or exporting.

The following remarks apply to the Export file specified during the dialog:

• if the member of the SL library specified does not exist, Export will create it (butit will not create the library itself),

• if the member of the SL library specified exists, its existing contents will beover-written,

• if the sequential file specified does not exist, it will be created (with the correctattributes),

• if the specified file exists but its attributes are not valid (not sequential, orsequential but with RECSIZE less than 256 bytes), it cannot be used and Exportwill abort.

Page 87: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Import/Export Utilities

47 A2 12UR Rev04 10-9

10.6 Using Tape Files

During the dialog, you name an output file to be created by Export. This can be atape file if you wish. If the tape is multi-file, Export writes onto the first file of thetape (thereby erasing the others).

To save part or all of an ORACLE database onto a multi-file tape, you must firstuse Export to export into disk files, and then save the disk files onto a multi-filetape by using SAVE_FILESET or LOAD_FILESET.

To import from a multi-file tape, you must first restore onto disk usingRESTORE_FILESET or LOAD_FILESET, and then use Import to import the diskfiles.

10.7 Transferring a Database between DPS 7000 Sites

You can transfer all or part of an ORACLE database from one DPS 7000 to anotherusing Export and Import.

If the two systems are connected by a DSA network, you can transfer thesequential file (loaded by Export) to the destination site using theENTER_FILETRANS_REQ directive. When the file has been transferred, you canuse Import to load it into the ORACLE database at the destination site.

If the two systems are not connected by a DSA network, you can export anORACLE database onto a tape file and take this tape to the destination site. TheImport utility can be used to load the ORACLE database at the destination site.

Page 88: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

10-10 47 A2 12UR Rev04

10.8 Heterogeneous ORACLE7 Import/Export

When an EXPORT processing is run, the CHARACTER SET used to store data inthe database is written in the header of the EXPORT file (e.g.: when an export isrun from a GCOS 7 database, the EXPORT file header indicates that data arestored according to the WE8GCOS7 character set - refer to appendix NLS Supportof the ORACLE7 Installation Guide -).

When the IMPORT processing is run, it begins to check if the current ORACLEIMPORT version supports the CHARACTER SET noted inside the EXPORT file.

If so, the IMPORT processing can be achieved; if not it is aborted with the errormessage IMP-00038.

In this case (character set not known by the receiving machine), the way aroundthis is to use the possibility of running the EXPORT phase on the receivingmachine by using the SQL*Net facility (EXPORT runs locally on the receivingmachine, exporting data from the remote database).

When EXPORT/IMPORT is done between two heterogeneous machines (EXPORTrun on the first machine, transfer of the EXPORT file, then IMPORT run on thesecond machine), be careful during the transfer operation of the EXPORT file fromone machine (e.g., DPS 7000) to the other (e.g., DPX/20):

• Transfer must be done using a binary format (e.g., "-b -n" option of theCPGTOU command, "BINARY=1" option of the FTP command, ...),

• Make sure that the EXPORT file has no alteration (no character conversion, nopadding, no extra-character, ...) during the transfer phase.

10.8.1 GCOS 7 EXPORT then UNIX IMPORT

The EXPORT file is identified as coded with a WE8GCOS7 character set.

The WE8GCOS7 character set is known, on the UNIX-BULL platform, startingwith version 7.1.6.

10.8.2 EXPORT UNIX/IMPORT GCOS 7

Character sets known by the GCOS 7 IMPORT are WE8GCOS7, US7ASCII,WE8ISO8859P1 and EL8ISO8859P7.

Page 89: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Import/Export Utilities

47 A2 12UR Rev04 10-11

10.9 Using ORACLE V6 Export Files

If you are importing data from an ORACLE V6 export file, it must be noted that,due to a change in the password encryption processing from ORACLE V6 toORACLE7 on DPS 7000, exported ORACLE V6 passwords will be lost. So, itwill be necessary for the database administrator to re-introduce them for all users(using the ALTER USER command).

Also refer to the paragraph Using Version 6 Export Files in the ORACLE7 ServerUtilities Guide and to the ORACLE7 Sever Migration Guide.

Also refer to the paragraph Creating Version 6 Export File in the ORACLE7 ServerUtilities Guide.

Page 90: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

10-12 47 A2 12UR Rev04

Page 91: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 11-1

11. The LXINST Utility

11.1 Introduction

LXINST is a NLS data installation utility which converts NLS objects into binaryformat. Along with the binary object files, a boot-file is generated by LXINST.This boot-file is used by the modules to identify and locate the NLS objects whichneed to be loaded - refer to ORACLE7 Server Utilities User’s Guide.

Only two types of boot-files are supported by GCOS 7:

• installation boot-file lx0boot

• system boot-file lx1boot

Page 92: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

11-2 47 A2 12UR Rev04

11.2 Syntax

The LXINST utility is invoked from the command line with the following syntax:

LXINST[ORANLS=dirname][SYSDIR=dirname][DESTDIR=dirname][HELP=[YES|NO]]

ORANLS=dirname [INPUT/OUTPUT-Parameter]

Specifies the directory name of a ".SL" library wherethe text-format boot (lx0boot_nlt) and object files(others _nlt files) are to be found.

Specifies the directory name of a ".BIN" library wherethe new binary-format boot (lx0boot_nlb) and objectfiles (others _nlb files) are to be stored.

If not specified, the value is H_ORACLE_MSGDIR.

SYSDIR=dirname [INPUT-Parameter]

Specifies the directory name of a ".BIN" library whereto find the system boot-file (lx1boot_nlb). If the boot-file is missing the installation boot-file will be used.

If not specified the value is same as ORANLS.

DESTDIR=dirname [OUTPUT-Parameter]

Specifies the directory name of a ".BIN" library whereto put the new (merged) system boot-file(lx1boot_nlb). Any system boot file already existing inthe library will be overwritten.

If not specified the value is same as ORANLS.

HELP=YES|NO If "YES" a help message describing the syntax isprinted (default "NO").

Page 93: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The LXINST Utility

47 A2 12UR Rev04 11-3

11.3 Usage

Prerequisite:

Check that H_ORACLE_MSGDIR.NLS_LXI_US_MSG exists.

Do not modify or rename the "_nlb" and non boot "_nlt" files. They are specific toGCOS 7.

Input:

An installation boot file (lx0boot_nlt) containing the NLS characteristics you wantto use.

As example some installation boot files are delivered in the ".SL" library:

lx0boot_nlt = American + French (same as lx0bootfr_nlt)lx0bootora_nlt = ALLlx0bootus_nlt = Americanlx0bootfr_nlt = American + Frenchlx0bootgr_nlt = American + Greeklx0bootdemo_nlt = American + French +-syntax-semantic infos

You can edit or rename these boot files to build a lx0boot_nlt specific to yourinstance.

Output:

System boot file (lx1boot_nlb) and binary object files that will be used by modulesto identify and locate NLS data.

Processing:

It is necessary to stop and restart instance after LXINST execution to validate theNLS update:

svrmgrl;connect internal;shutdown;exit;SOR C;

Page 94: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

11-4 47 A2 12UR Rev04

*If destdir is not equal to oranls you must move all non boot "_nlb" files fromoranls to destdir with replace option.

*Set in your instancedir.sl..init_env ORA_NLS32 to destdir value.

*WARNING: you can get code exceptions if the non boot "_nlb" files are not in the$ORA_NLS32.bin library.

SOR W;svrmgrl;connect internal;startup openselect * from V$NLS_VALID_VALUES;exit;

Update of NLS characteristics after installation:

You can call LXINST to generate new binary objects files. This will generate, inaddition a new system boot file. The entries in the system boot file there willmerged into the new system boot file that is generated.

EXAMPLE:

phase1 (installation):

$oranls.sl..lx0boot_nlt=lx0bootfr_nlt (us+fr)lxinst oranls=ora.O7340A sysdir=ora.O7340A destdir=ora.O7340A>>>10:14 LXINST 7340ANLS Data Installation Utility: Version 3.2.2.0.0 - ProductionCopyright © Oracle Corporation 1993, 1995. All rights reserved.CORE Version 3.5.2.0.0 - ProductionGenerating binary object and installation boot files...Merging installation and system boot files...LXI-00030: System boot file not found, new file createdsuccessfullyNLSRTL Object installation successfully completed<<<10:15

Page 95: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The LXINST Utility

47 A2 12UR Rev04 11-5

• $oranls.bin..lx0boot_nlb (us+fr) $oranls.bin..lx(NONBOOT)_nlb [depends on$destdir.bin..lx1boot_nlb] $destdir.bin..lx1boot_nlb (us+fr)

phase2: (processing)

phase3 (update to us + gr):

$oranls.sl..lx0boot_nlt=lx0bootgr_nlt (us+gr)lxinst oranls=ora.O7340A sysdir=ora.O7340A destdir=ora.test>>>10:17 LXINST 7340ANLS Data Installation Utility: Version 3.2.2.0.0 - ProductionCopyright © Oracle Corporation 1993, 1995. All rights reserved.CORE Version 3.5.2.0.0 - ProductionGenerating binary object and installation boot files...Merging installation and system boot files...NLSRTL Object installation successfully completed<<<10:18

• $oranls.bin..lx0boot_nlb (us+gr) $oranls.bin..lx1boot_nlb (us+fr) [not modified,result of phase1] $oranls.bin..lx(NONBOOT)_nlb [depends on$destdir.bin..lx1boot_nlb] $destdir.bin..lx1boot_nlb (us+fr+gr)

phase4: (processing)

Page 96: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

11-6 47 A2 12UR Rev04

11.4 The init_env File

A new GCOS 7 NLS parameters file is available with O7340A: the init_env file.

It must stays in the working directory of the client module.

Specifications in the init_env file overrides.Specifications set in the command line that overrides.Specifications set in the init_ora file.

Example of init_env file:

#nls_lang = ‘AMERICAN_AMERICA.WE8GCOS7’#nls_lang absent : h_oracle_lang (for client and server)#nls_lang = “ : default for client and init_ora parameter for server#nls_lang = ‘ ‘ : all defaults#nls_lang = ‘AMERICAN’ : defaults related to territory and charset#nls_lang = ‘_AMERICA’ : defaults related to langage and charset#nls_lang = ‘.WE8GCOS7’ : defaults related to langage and territory#nls_lang = ‘UNKNOWN’ : invalid, langage error#nls_lang = ‘_UNKNOWN’ : invalid, territory error#nls_lang = ‘.UNKNOWN’ : invalid, charset error#nls_date_format = ‘DD-MON-YY’#nls_date_language=frenchora_nls32 = ORA.O7340A # location of the system boot file (lx1boot_nlb)ora_nls_profile32 = ORA.O7340A # must be the same as ora_nls32#oracle_home#nls_currency#nls_iso_currency#nls_numeric_characte#nls_monetary_charact#nls_list_separator#nls_debit#nls_credit#nls_sort#nls_calendar#nls_storage_order#nls_displaymyhost = bc09op7_fddi

Page 97: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The LXINST Utility

47 A2 12UR Rev04 11-7

11.5 Conclusion

At installation time: set oranls, sysdir and destdir with H_ORACLE_MSGDIRvalue.

At exploitation time: set destdir with instance directory name or keep installationenvironment.

In all cases set ORA_NLS32 of init_env in the instancedir.sl to the value of destdir.

If ORA_NLS32 is missing Oracle will use H_ORACLE_MSGDIR value.

Page 98: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

11-8 47 A2 12UR Rev04

Page 99: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 12-1

12. The SVRMGRL Processor

Server Manager is the ORACLE7 new database administration utility. It willreplace SQLDBA with quite the same external visibility.

To activate it you must enter SVRMGRL with same parameters as SQLDBA.

Refer to:

• Server Manager User’s Guide.

• SQLDBA to Oracle Server Manager Migration Guide.

Page 100: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

12-2 47 A2 12UR Rev04

Page 101: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 13-1

13. The TNSPING Utility

SQLnet includes the TNSPING utility that allows client to test connections to theservers.

TNSPING ADDRESS=address COUNT=value

ADDRESS Address(ADDRESS=) or Service name stringThe<address> argument can either be a name (resolved intnsnames.ora) or an explicit NVstring address.

Ex:ADDRESS=(PROTOCOL=TCP)(HOST=bc9op7_fddi)(PORT=2065)

COUNT Number of attempts to reach the server

EXAMPLE:

tnsping address=’(ADDRESS=(PROTOCOL=TCP)(HOST=bc9op7_fddi)(PORT=2066))’ count=3

Page 102: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

13-2 47 A2 12UR Rev04

Page 103: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 14-1

14. The TRCROUTE Utility

TRCROUTE enables administrators to discover which path or route a connection istaking from a client to a server.

Refer to: Oracle Network Products Troubleshooting Guide.

TRCROUTE ADDRESS=address

ADDRESS Service name string The <address> argument is a name(resolved in tnsnames.ora)

EXAMPLE:

tnsnames_ora:BC09S_FR=(DESCRIPTION=(ADDRESS=

(PROTOCOL=TCP)(HOST=bc09op7_fddi)(PORT=2066))(CONNECT_DATA=(SID=ORA.FR)(SERVER=dedicated)))trcroute address=BC09S_FR ;

Page 104: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

14-2 47 A2 12UR Rev04

Page 105: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 15-1

15. The DBV Utility

DBV is an external command line utility that performs a physical data structureintegrity check on an offline database.

It can be used against backup files and online files (or piece of files).

You use DBV primarily when you need to insure that a backup database (ordatafile) is valid before it is restored or as a diagnostic aid when you haveencountered data corruption problems.

Refer to: Oracle7 Server Utilities User’s Guide.

EXAMPLE:

S:dbv help=yes;

Keyword Description (Default)

------------------------------------------------------------------

FILE File to Verify (NONE)

START Start Block (First Block of File)

END End Block (Last Block of File)

BLOCKSIZE Logical Block Size (4096)

LOGFILE Output Log (NONE)

FEEDBACK Display Progress (0)

S: dbv orang.v7db.dbs;

>>>19:23 DBV 7340A

DBVERIFY: Release 7.3.2.0.0 - Production on Fri Feb 14 19:23:14 1997

Copyright © Oracle Corporation 1979, 1994. All rights reserved.

DBVERIFY - Verification starting : FILE = ORANG.V7DB.DBS

DBVERIFY - Verification complete

Total Pages Examined : 7680

Total Pages Processed (Data) : 2241

Total Pages Failing (Data) : 0

Total Pages Processed (Index) : 686

Total Pages Failing (Index) : 0

Total Pages Empty : 4346

Total Pages Marked Corrupt : 0

Total Pages Influx : 0

<<<19:25

Page 106: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

15-2 47 A2 12UR Rev04

Page 107: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 16-1

16. The Migrate Utility

16.1 Introduction

You use the Migrate Utility to execute the first stage of your ORACLE V6 databasemigration. It must be executed under an ORACLE-V6 environment.

The second stage of this migration will be then executed by the ALTERDATABASE CONVERT command launched from the ORACLE7 SQL*DBAprocessor.

The migration rules and process from an ORACLE V6 database format to anORACLE7 database format is fully described in theORACLE7 Server Migration Guide.

Page 108: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

16-2 47 A2 12UR Rev04

16.2 Migrate Syntax

MIGRATE

[ ALLOW_OFFLINE = { 0 } ] [ { 1 } ]

[ CFILE = <control-file> ]

[ CHECK_ONLY = { 0 } ] [ { 1 } ]

[ CNVFILE = <convert-file> ]

[ DBNAME = <name-8> ]

[ DUMPCF = { 0 } ] [ { 1 } ]

[ ECHO = { 0 } ] [ { 1 } ]

[ MIGFILE = <migrate-file> ]

[ NEW_DBNAME = <name-8> ]

[ MAXLOGMEMBERS = <dec-1> ]

[ MULTIPLIERS = <dec-3> ]

[ NO_SPACE_CHECK = { 0 } ] [ { 1 } ]

[ PFILE = <init-ora-file> ]

[ SPOOL = <spool-file> ]

[ HELP = { 0 } ] [ { 1 } ]

[ <standard-parameter-set> ]

Page 109: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Migrate Utility

47 A2 12UR Rev04 16-3

16.3 Migrate Parameters

ALLOW_OFFLINE When this boolean parameter is set to 1, it indicatesthat the processing can be made even is sometablespaces are offline. The default is 0.

Also refer to chapter 2 of the ORACLE7 ServerMigration Guide (step 6 Shut Down the V6 database).

CFILE <control-file>, specifies the control file to be used.When not specified, the control file associated with thedatabase to be migrated is used. The default name isbuilt according to the current #WD value suffixed by.DCF (#WD.DCF)

CHECK_ONLY When this boolean parameter is set to 1, it indicatesthat only space calculations (without migration) is tobe made. The database must have been started (SORW then STARTUP OPEN under the ORACLE V6environment) before executing this option. Thedefault is 0.

CNVFILE <convert-file>, specifies the name of the CONVERTfile to be used. When not specified, the generated filename is under the form #WD.CONVERT_ORA. Theformat and organization of this catalogued file isNONE. When the migration is performed(CHECK_ONLY = 0 and DUMPCF = 0), the defaultname must not be changed. This file is automaticallyallocated by the MIGRATE utility.

DBNAME specifies the name of the database to migrate.

DUMPCF When this boolean parameter is set to 1, it indicatesthat the contents of the ORACLE V6 control file(.DCF) must be dumped.

Output of this command will be written in the filereferenced by CNVFILE parameter. The default is 0.

ECHO When this boolean parameter is set to 1, it indicatesthat an echo of the MIGRATE_BSQ script contentsmust be made. The default is 1.

MIGFILE <migrate-file>, specifies the name of the script file tobe used for the migration process. When not specified,the MIGRATE_BSQ member located in the #WD.SLlibrary is used.

Page 110: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

16-4 47 A2 12UR Rev04

NEW_DBNAME specifies the name to be given to the database after themigration process has been made. When not specified,the database name is left unchanged.

MAXLOGMEMBERS Specifies the maximum number of members, or copies,for a redo log file group. This value is used todetermine how much space in the control file toallocate for the names of redo log files.

You can enter a value between 1 and 5.

The default value is determined as shown below:

− if the database is in ARCHIVELOG mode, thedefault value is 2,

− otherwise, the default value is 1.

MULTIPLIERS Specifies the incrementation factor to determine thesize of the cluster index I_FILE#BLOCK# (e.g., 15means 1.5 times the V6 size).

You can enter a value between 2 and 999.

The default value is 15.

NO_SPACE_CHECK When this boolean parameter is set to 1, it indicatesthat no control about the space calculations is to bedone before the migration process occurs. The defaultis 0.

PFILE <init-ora-file>, specifies the name of the INIT_ORAparameter file to be used for the migration process.When not specified, the INIT_ORA member located inthe #WD.SL library is used.

SPOOL <spool-file>, specifies the name of the output file to beused to redirect messages displayed by this command.When not specified, output is displayed on the userconsole (or the SYSOUT for an absentee processingmode). You are recommended to specify a SPOOLfile in order to have a trace of the MIGRATE executionand status messages.

HELP When this boolean parameter is set to 1, it indicatesthat an online help must be displayed. The default is 0.

standard-parameter-set Refer to Section 1.

You must not specify USERID, INSTANCE, orNLS_LANG.

Page 111: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Migrate Utility

47 A2 12UR Rev04 16-5

16.4 Migrate Execution Notes

MIGRATE can only be used to perform a migration of an ORACLE V6 databaseformat to an ORACLE7 one. Furthermore, only databases handled by an OR6016or OR6018 version can be migrated using MIGRATE.

If you plan to use MIGRATE and your current ORACLE V6 version is an earlierversion (e.g., OR6013), you must first update your ORACLE V6 version toOR6016 at least. Also refer to your ORACLE7 Delivery Bulletin before anyattempt to use MIGRATE (some ORACLE V6 environments require a specificpatch to be able to use MIGRATE).

Earlier ORACLE database formats (e.g., ORACLE V5 format) are not supportedand the migration process must be made with the EXPORT/IMPORT utilities.The migration process must be made in two stages:

• the first one (made under an ORACLE V6 environment) prepares the migrationprocess and generates a CONVERT file which will be used during the secondstage. This first stage is launched by invoking the MIGRATE command.

• the second one (made under an ORACLE7 environment) effectively performsthe migration process and takes as an input the CONVERT file generated duringthe first stage. This second stage is launched by invoking the ALTERDATABASE CONVERT command of the ORACLE7 SQL*DBA processor.

To get more information about operations executed during these two stages refer tothe ORACLE7 Server Migration Guide.

NOTE:Before running a migration process on your ORACLE V6 database, execute awhole save of all your ORACLE V6 files (.SL, .DBS, .CTL, .LOG, .. files) tokeep a safe image of your ORACLE V6 database. To do that, stop yourORACLE V6 database server then you use the standard GCOS 7 save utilities(SAVE_FILE, SAVE_DISK or SAVE_FILESET) to make a safe copy of yourORACLE V6 database.

Example:

To perform the migration process of an ORACLE V6 database handled by anOR6018 version (ORACLE V6.0.34), the two migration stages are executed asdescribed below.

Assumes that the ORACLE V6 environment is located under the OR6018directory, the ORACLE7 one under the O7013B directory and the database to bemigrated under the MYDB directory.

Page 112: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

16-6 47 A2 12UR Rev04

To perform the first migration process stage, do the following:

• be sure to have executed, as noted in the preceding page, a whole save of yourORACLE V6 file.

• then, it is necessary to install the MIGRATE components (MIGRATE load-module, MIGRATE_BSQ script, and error message file) under the ORACLE V6environment. For that, use the MIGRINS command according to the followingprocedure:

S: MODIFY_PROFILE OR6018; S: MWINLIB BIN (.BIN, O7013B.BIN); S: ORACLE LIST; H_ORACLE_SMLIB : OR6018.SL H_ORACLE_LMLIB : OR6018.LM H_ORACLE_SMLIB : OR6018.SM H_ORACLE_STLIB : OR6018.ST H_ORACLE_MSGDIR : OR6018 H_ORACLE_LANG : AMERICAN S: MIGRINS MEDIA=<media>:<dvc> V7DIR=O7013B;

• a reference to the BINARY ORACLE7 library (O7013B.BIN) is required toaccess the MIGRINS GCL command.

• the <media>:<dvc> value specify the volume to be used to allocate theMIGRATE error message files (example FSD12:MS/D500).

• deallocate any obsolete CONVERT FILE (allocation of this file must beexecuted by the MIGRATE utility).

• set the ORACLE V6 environment (with a reference to the BINARY ORACLE7library to be able to use the MIGRATE GCL command):

S: MODIFY_PROFILE OR6018; S: MWINLIB BIN (.BIN, O7013B.BIN); S: ORACLE LIST; H_ORACLE_SMLIB : OR6018.SL H_ORACLE_LMLIB : OR6018.LM H_ORACLE_SMLIB : OR6018.SM H_ORACLE_STLIB : OR6018.ST H_ORACLE_MSGDIR : OR6018 H_ORACLE_LANG : AMERICAN S: MODIFY_PROFILE MYDB;

NOTE:You must not change the #WD set by this MODIFY_PROFILE commandbetween the "SOR W" and the "MIGRATE" commands.

Page 113: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Migrate Utility

47 A2 12UR Rev04 16-7

• place the ORACLE7 MIGRATE_BSQ script in MYDB.SL library (this scriptmust not be modified in any way):

S: MNLIB SL MYDB.SL; C: INLIB1 O7013B.SL; C: MOVE IL1:MIGRATE_BSQ;

• start the ORACLE V6 database server (without opening your database):

S: SOR W NAME = MYSERVER HOLDOUT = 1; ..... --> ORACLE instance server MYDB initialized

• perform the first migration stage:

Note that a user named MIGRATE will be created and used by the MIGRATEutility. Check that no user with the same name already exists in your databaseexploitation.

S: MIGRATE; ...

• Before launching the MIGRATE utility, you are recommended to execute a"MDP PAGEMODE=0;" command (to avoid tedious and repetitiveTRANSMITs) and to specify a report file using the SPOOL parameter (to beable to analyze the generated output and to have the status messages describedbelow).

• At the end of this first stage, the cataloged file named MYDB.CONVERT_ORAhas been created and loaded by the MIGRATE utility and the following messageis displayed "CONVERT-FILE-OK-SFCCF". Then stop the ORACLE V6database server:

S: SOR S;

• From that point, the ORACLE V6 database is ready to execute the second stageof the migration process.

IMPORTANT:After the migrate utility has been used against an ORACLE V6 database toperform the first stage of the migration, you must not try to re-open it underthe oldest ORACLE V6 database server. To work again with this databaseand an ORACLE V6 database server you must first restore the safe image keptbefore the migration process occurs.

13

3

Page 114: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

16-8 47 A2 12UR Rev04

IMPORTANT:If any "CONVERT-FILE-ERROR-SFCCF" or "CONVERT-FILE-ERROR{1|2}" message has been produced or if any other abort occurs duringthe first stage of the MIGRATE utility, YOU MUST DELETE the CONVERTFILE and RESTORE the whole ORACLE V6 database before any attempt tore-execute the MIGRATE utility.

Under some circumstances, it may be necessary to manually shutdown theORACLE V6 database server before restoring the ORACLE V6 database

To perform the second migration process stage, do the following:

• set the ORACLE7 environment:

S: MODIFY_PROFILE O7013B; S: MWINLIB BIN .BIN; S: ORACLE LIST; H_ORACLE_SMLIB : O7013B.SL H_ORACLE_LMLIB : O7013B.LM H_ORACLE_SMLIB : O7013B.SM H_ORACLE_STLIB : O7013B.ST H_ORACLE_MSGDIR : O7013B H_ORACLE_LANG : AMERICAN S: MODIFY_PROFILE MYDB;

• update your INIT_ORA parameter in order to be able to use it under ORACLE7(remove obsolete parameters, ...). Also refer to Appendix A of the ORACLE7Installation Guide.

• remove or rename your ORACLE V6 control files. When you execute theALTER DATABASE CONVERT command the new ORACLE7 control fileswill be allocated automatically.

• place the ORACLE7 SQL script in MYDB.SL library

S: MNLIB SL MYDB.SL; C: INLIB1 O7013B.SL; C: MOVE IL1:*_SQL REPLACE; C: MOVE IL1:*_BSQ REPLACE; C: MOVE IL1:*_CTL REPLACE;

• start the ORACLE7 database server (without opening your database):

S: SOR W NAME = MYSERVER HOLDOUT = 1; ..... --> ORACLE instance server MYDB initialized

13

3

Page 115: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The Migrate Utility

47 A2 12UR Rev04 16-9

• perform the second migration stage:

S: SQLDBA; SQLDBA> connect internal; Connected SQLDBA> startup nomount; Statement processed SQLDBA> alter database convert; ... SQLDBA> alter database open resetlogs; ... SQLDBA> drop user migrate cascade; ... SQLDBA> @CATALOG SQLDBA> @<script-name> (other script depending on the installed options - Procedural, Distributed, ...) ...

NOTE:If your database is configured with the ARCHIVELOG mode, be sure to haveenough space on the archival volume (ARCHIVE_LOG_DEST parametervalue) to receive the generated archive files before running the script.

• From that point, the ORACLE V6 database has been migrated to the ORACLE7database format.

• Note that due to the change of password encryption between ORACLE V6 andORACLE7 on GCOS 7, the password associated with each user (including theSYS and SYSTEM user) must be re-created manually:

S: SQLDBA; SQLDBA> connect internal; Connected SQLDBA> alter user sys 2> identified by change_on_install; Statement processed SQLDBA> alter user scott identified by tiger; ...

IMPORTANT:After an ORACLE V6 database has been migrated to the ORACLE7 format(execution of the 2nd stage of the migration process), you must not try to re-open it under the oldest ORACLE V6 database server. To work again withthis database and an ORACLE V6 database server you must first restore thesafe image kept before the migration process occurs.

13

3

Page 116: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

16-10 47 A2 12UR Rev04

Page 117: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 17-1

17. The PCC Processor

17.1 Introduction

You use the PreCompiler, Common (PCC) Processor to pre-compile a programthat contains SQL statements, written in C or COBOL 85 (COBOL and FORTRANare no longer supported). The output produced by PCC can then be compiled bythe GCOS 7 compiler for the programming language concerned.

This chapter intends to describe the specificities of the use of these Precompilerson GCOS 7; for all details concerning Precompilers, you may also refer toORACORP documentation "ORACLE Precompilers Programmer's Guide" forspecific use of Pro*C, please consult "Pro*C supplement to the ORACLEPrecompilers Guide" and for Pro*Cobol, "Pro*Cobol supplement to the ORACLEPrecompilers Guide".

If you want to know more about precompiling, compiling and linking Pro*COBOLTPRs, you should refer to the ORACLE7/TDS User's Guide for informationspecific to ORACLE/TDS.

Note that the use Pro*COBOL may be slightly different for ORACLE/TDS thanfor ORACLE Batch. All differences will be documented in ORACLE7/TDS User'sGuide.

Page 118: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-2 47 A2 12UR Rev04

17.2 PCC Syntax

PCC INAME = <input-file>

HOST = {C} {COBOL}

[ ONAME = <output-file> ]

[ LNAME = <report-file> ]

[ IRECLEN = { 80 } ] [ { <dec3> } ]

[ ORECLEN = { 80 } ] [ { <dec3> } ]

[ LRECLEN = { 132 } ] [ { <dec3> } ]

[ PAGELEN = { 66 } ] [ { <dec3> } ]

[ DBMS = { V7 } ] [ { V6 } ]

[ ERRORS = { 0 } ] [ { 1 } ]

[ XREF = { 1 } ] [ { 0 } ]

[ MAXOPENCURSORS = <dec3> ]

[ HOLD_CURSOR = { 0 } ] [ { 1 } ]

[ RELEASE_CURSOR = { 0 } ] [ { 1 } ]

[ LTYPE = { LONG } ] [ { SHORT} ] [ { NONE } ]

[ INCLUDE = <include-libraries-list> ]

[ LITDELIM = { QUOTE } ] [ { APOST } ]

[ FORMAT = { ANSI } ] [ { TERMINAL } ]

[ DEFINE = <symbol> ]

Page 119: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-3

[ MODE = { ORACLE } ] [ { ANSI13 } ] [ { ANSI14 } ] [ { ANSI } ]

[ SQLCHECK = { SYNTAX/LIMITED } ] [ { FULL/SEMANTICS } ] [ { NONE } ]

[ ORACA = { 0 } ] [ { 1 } ]

[ FIPS = { 0 } ] [ { 1 } ]

[ LINES = { 0 } ] [ { 1 } ]

[ MAXLITERAL = { 256 } ] [ <dec3> ]

[ SELECT_ERROR] = { 0 } ] [ { 1 } ]

[ CODE = KR C ] [ ANSI_C ]

[ CONFIG = <file-78> ]

[ AUTO_CONNECT = { 0 } ] [ { 1 } ]

[ UNSAFE_NULL = { 0 } ] [ { 1 } ]

[ <standard-parameter-set> ]

Page 120: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-4 47 A2 12UR Rev04

17.3 PCC Parameters

INAME This parameter is mandatory.

<input file> specifies the input file which contains thesource program to be pre-compiled. The file can be anUFAS sequential file or a member of an SL library. Itsname follows the general rules for ORACLE filenames (see Section 1).

You must be aware that suffixing the input file is nolonger sufficient to determine in which language theprogram has been written. For this reason, the HOSTparameter is now mandatory (see description below).However, the suffixes previously used are stillallowed, even if they are no longer useful.

HOST Specifies the programming language of the programcontained in INAME. May be C or COBOL.

Note that FORTRAN and COBOL74 are no longersupported.

COBOLT and COB74T:

With ORACLE7, a new choice of implementation hasbeen made for the precompilation of programs usingORACLE under TDS: the Pro*Cobol precompiler nowgenerates the same code for such program as forprograms running under ORACLE Batch, whereas inORACLE-V6, the code generated was different.

The differences between the two, which of course stillexist, in particular for the CONNECT statement, arecarried over at SQL runtime execution, the code ofwhich is packaged in H_ORACLE SM for Batchprograms and in H_ORATDS SM for ORACLE/TDSprograms.

For this reason, it is no longer necessary to add a "T"to the HOST value (COBOLT, COB74T). COBOLTwill still be accepted and assumed to be COBOL.COB74T will be rejected because COB74 is no longersupported.

Please note that this parameter is now mandatory andthat the setting of the language parameter will not beaffected by the suffix of the name parameter, which isno longer significant.

Page 121: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-5

ONAME <output file>: specifies the output file which willcontain the pre-compiled program. Its name followsthe general rules for ORACLE file names (seeSection 1). The file concerned can be a UFASsequential file or a member of an SL library. PCC willcreate it with a default name if no value is specified.The default output file name is <iname>_PCC.

LNAME <report file>: specifies the report file in which theoutput listing will be placed. Its name follows thegeneral rules for ORACLE file names (see Section 1).The file concerned can be a UFAS sequential file ormember of an SL library. PCC will create it ifnecessary. If omitted, it defaults to <input-file>_LIS.

IRECLEN Specifies the input record length (of INAME). Youcan enter a value between 20 and 132 giving thenumber of characters in each input line. The defaultvalue is 80. The value of IRECLEN must be less thanor equal to the value of ORECLEN.

If your file has any line longer than 80 characters,ensure that you specify IRECLEN correctly;otherwise, PCC will ignore any character following the80th one and a warning message will be issued.

ORECLEN Specifies the maximum output record length (ofONAME). You can enter a value between 20 and 132giving the number of characters in each output line.The value of ORECLEN must be greater than or equalto the value of IRECLEN. The default is 80.

LRECLEN Specifies the maximum record length of the listing file.You can enter a value between 80 and 132 giving thenumber of characters in each report line. The value ofLRECLEN must be greater than or equal to the valueof ORECLEN. The default is 80.

PAGELEN PAGELEN specifies the page length of the outputreport (LNAME). You can enter a value between 20and 132 giving the number of lines per physical pageof the listing file. The default is 66.

Page 122: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-6 47 A2 12UR Rev04

DBMS Specifies whether the ORACLE DBMS observesversion 6 or version 7 practices. The default is V7.You must take care of the fact that some DBMS andMODE options are incompatible or not recommended.

See the ORACLE Precompilers Programmer's Guidefor a detailed description of parameter DBMS.

ERRORS If 1, any message placed in the report file (LNAME) isalso displayed on the terminal. If 0 (default) errormessages are sent only to the file (specified byLNAME).

XREF If 1, (default) the output report (LNAME) will containa cross-reference listing of variables. If 0, no cross-reference listing is produced.

MAXOPEN CURSORS Specifies the maximum number of cursors that can beopen simultaneously during execution of the programbeing pre-compiled; that is, the number of SQLstatements the processor can keep cached. The defaultvalues are 10 under IOF and 250 under TDS.

HOLD_CURSOR Specifies how the cursors for SQL statements andPL/SQL blocks are handled in the cursor cache.HOLD_CURSOR controls what happens to the linkbetween the cursor and the cursor cache.

You can use HOLD_CURSOR, RELEASE_CURSORand MAXOPENCURSORS to improve theperformance of your program.

Please also note that RELEASE_CURSOR = 1overrides HOLD_CURSOR = 1, and thatHOLD_CURSOR = 0 overrides RELEASE_CURSOR= 0.

RELEASE_CURSOR Specifies how the cursors for SQL statements andPL/SQL blocks are handled in the cursor cache.RELEASE_CURSOR controls what happens to thelink between the cursor and the private SQL area.

LTYPE Specifies the type of report to be produced. LONG(default) means a detailed report. SHORT means asummary report. NONE means no report. In this case,LNAME is meaningless.

Page 123: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-7

INCLUDE <include libraries list>: specifies up to 3 SL librarieswhich may contain include files such as the SQLCAfile (see "SQLCA Files"). Search rules depend on theorder of the list. For example, if INCLUDE =(MYLIB1, MYLIB2, MYLIB3) PCC will search firstin MYLIB1, then in MYLIB2 and finally in MYLIB3.

If you do not specify any INCLUDE library, thePrecompiler looks for the file to be included in thecurrent .SL library.

Remember that the precompiler looks for a file first inthe current .SL library, even if you specify anINCLUDE parameter. So, make sure no file with thesame name resides in this library.

Also, note that for SQLCA and ORACA files (andcontrary to the ORACORP description for theINCLUDE parameter), there is no search in any"standard" library. So, if your SQLCA or ORACA fileis in none of the .SL or <include libraries list>, an errormessage will be issued.

LITDELIM Specifies the character to be used to delimit non-numeric literals in the output, i.e., in the pre-compiledprogram specified via the ONAME parameter. Itapplies only to COBOL programs. QUOTE, thedefault, means use double quotes ("). APOST meansuse apostrophes or single quotes (').

FORMAT Specifies the format of COBOL input lines. Theoptions are ANSI (the default) or TERMINAL.

When TERMINAL is specified:

− The first column of the input file corresponds to theIndicator Area as described in the COBOLReference Format (see the COBOL 85 User'sGuide).

− In the output file generated by PCC, 6 blanks areadded at the beginning of each line read from theinput file. This addition also concerns the includefiles. Such a modification is required, because the Cruntime of the DPS 7000 does not allow a librarymember with the CBX format to be created.

DEFINE <symbol> defines a symbol which controls theconditional precompilation.

Page 124: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-8 47 A2 12UR Rev04

MODE Specifies the precompilation mode, i.e., whether yourprogram observes ORACLE practices or complieswith the current ANSI SQL standard. The defaultmode is ORACLE. In that case, precompiledprograms are handled as they were previously.

The MODE = ANSI13 setting is useful whenconverting DB2 applications. The MODE ANSI isfully compliant to ANSI SQL standard.

For more details on this option, please refer to theORACLE Precompilers Programmer's Guide.

SQLCHECK Specifies the type and extent of semantic and syntacticchecking. The default is SYNTAX = LIMITED.

For more details on controls that are done, please referto the ORACLE Precompilers Programmer's Guide.

USERID When SQLCHECK = SEMANTICS you must specifyUSERID if you want the precompiler to get necessaryinformation by connecting to ORACLE.

ORACA Specifies whether a program can use the ORACLECommunication Area (ORACA) or not.

In that case, the program must contain an "EXEC SQLINCLUDE ORACA END-EXEC" statement.

FIPS Specifies whether extensions to ANSI SQL are flagged(by the FIPS Flagger). An extension is any SQLstatement that violates ANSI format or syntax rules ; atexecution time, a warning (not an error) will be issued.

LINES Valid only for Pro*C precompiler. The lines optionhelps with debugging.

When LINES = YES, the Pro*C precompiler adds#line preprocessor directives to its output file, whichforces the C compiler to set its input line counter sothat lines of precompiler - generated code are notcounted.

MAXLITERAL Specifies the maximum length of string literalsgenerated by the precompiler, so that compiler limitsare not exceeded. This value is compiler-dependent.

Page 125: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-9

SELECT_ERROR Specifies whether your program generates an errorwhen a single-row SELECT statement returns morethan one row, or more than a host array canaccommodate.

CODE Specifies the format of C function prototypesgenerated by the Pro*C Precompiler.

When CODE = ANSI_C, the Pro*C Precompilergenerates full function prototypes, which conform tothe ANSI C standard, whereas with KR_C, theprecompiler comments out the argument lists ofgenerated function prototypes.

CONFIG Specifies the name of a user configuration file.

AUTO_CONNECT Specifies whether your program connectsautomatically to the default user account.

UNSAFE_NULL Prevents generation of ORA-1405 messages whenfetching NULL without using indicator variables.

It is allowed only when MODE = ORACLE andDBMS = V7.

Standard parameter-set Refer to Section 1.

Page 126: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-10 47 A2 12UR Rev04

17.4 Include Files

You include a file by using an EXEC SQL INCLUDE statement which specifiesthe name of the file you need. Unless otherwise specified, (by specifying thelibrary in the INCLUDE statement), PCC searches for the file first in the .SLlibrary, and then in the libraries of the INCLUDE parameter of the GCL command.

Note that some rules also exist on suffixes if you do not specify any in yourINCLUDE statement. PCC will first try to access <file> _ <language-suffix> andthen <file>.

SQLCA FILES

A program to be pre-compiled by PCC must include the appropriate SQLCA filefor the programming language concerned.

These SQLCA files are: SQLCA_C, SQLCA_CBL. However, if you precompileyour program with the MODE = ANSI option, the declaration of the SQLCAbecomes optional. But, you must declare a status variable named SQLCODE.

If you do not declare the SQLCA, the precompiler allocates an internal SQLCAand your program cannot access this internal SQLCA.

You include the file using an EXEC SQL INCLUDE statement which specifies thename of the SQLCA file you need.

The rules concerning suffixes and libraries apply as for any other file.

EXAMPLE:

To include a COBOL SQLCA file, you can specify:

EXEC SQL INCLUDE SQLCA_CBLorEXEC SQL INCLUDE .SL..SQLCA_CBL

In the first case, the file is searched for in the .SL library (for example,MYDIR.SL). You can specify other SL libraries as follow:

PCC....INCLUDE = (MYLIB1.SL,MYLIB2.SL,MYLIB3.SL)

In the second case, the library and member name are explicitly given.

Page 127: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-11

To summarize, "EXEC SQL INCLUDE SQLCA END-EXEC" will search

1. SQLCA_CBL in the .SL library

and if not found,

2. SQLCA in the .SL library

3. SQLCA_CBL in the MYLIB1.SL library

4. SQLCA in the MYLIB1.SL library

...

Page 128: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-12 47 A2 12UR Rev04

17.5 Configuration Files

Starting with precompiler version 1.6, configuration files can be used to specifyprecompilation options.

Two kinds of configuration files can be used:

• user configuration file:

the name of this file is given by means of the CONFIG parameter.

• system configuration file:

refers to a library member with a conventional name and located in the<msg_dir>.SL library. A try to use this library member is executed for eachprecompilation. If it does not exist, the warning message "PCC-I-0126: Couldnot find or open configuration file" will be printed.

The conventional name depends on the HOST parameter value:

C language: PCCC_CFG nameCOBOL language: PCCCOB_CFG name

Page 129: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-13

17.6 Using JCL to Precompile your Program

As a consequence of new design choices from ORACORP, you have to changeyour ORACLE-V6 JCL to make them run under ORACLE7.

Two separate load modules are now available depending on whether you usePro*Cobol or Pro*C precompiler:

• If you use Pro*Cobol, you must invoke H_OR_PC0

• If you use Pro*C, you must invoke H_OR_PC2.

In both cases, you no longer need to give a value to the "host" parameter, becausethe name of the load module implies that the language is already known.

But, to minimize the changes you have to make in JCL, the following values willstill be accepted as "host" values.

• COBOL while invoking H_OR_PC0

• C while invoking H_OR_PC2

In fact, these two values are the only ones accepted at GCL level.

Consequently, you will get a warning message PCC - 093: "Invalid or obsoleteoption - Ignored" if you specify any other "host" parameter value(COB74,COBOLT,COB74T...). In that case the default language for the given loadmodule will be assumed to be COBOL for H_OR_PC0 and C for H_OR_PC2.

If you want to have a valid syntax of a JCL step, you may add "JCL = 1" to yourGCL options on a valid GCL PCC command.

Page 130: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-14 47 A2 12UR Rev04

17.7 Compiling a Pre-Compiled Program

A program pre-compiled by PCC must subsequently be compiled by the GCOS 7compiler for the programming language concerned. Certain compiler options mustbe specified, and in the case of COBOL certain language restrictions apply. Theseare described below.

17.7.1 Compiling a C Program

You do not have to specify compiler options for C language programs.

EXAMPLE:

To compile using the GCOS 7 C compiler

C SOURCE = MY_PROG_C_PCC INLIB = .SL;

You only have to specify the source member name and the input library.

The SQLCA file must be included in all linked modules which compose a LoadModule. In order to incarnate the SQLCA structure, one and only one of thesemodules must include a "#define SQLCA_INIT " statement.

If you use the ORACA, the same remarks apply.

17.7.2 Compiling a COBOL Program

There are two special compilation options that you must specify when compiling aCOBOL-85 program via the GCOS 7 COBOL compiler:

LEVEL = NSTD, CARDID = 0

EXAMPLE:

To compile using the GCOS 7 COBOL-85 compiler:

CBL SOURCE = MY_PROG_CBL_PCC INLIB = .SL LEVEL = NSTD CARDID = 0;

Page 131: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-15

Language Restrictions

Certain COBOL language restrictions apply to programs to be pre-compiled byPCC. These restrictions mean that you must modify COBOL examples given inthe standard ORACLE documentation to be able to execute them under GCOS 7.These restrictions are described in the following paragraphs.

You can include a CONTROL DIVISION in each program to modify the defaults(assumed in the ORACLE manuals) to those assumed by GCOS 7:

• CONTROL DIVISION

• DEFAULT DIVISION

• DISPLAY IS TERMINAL

• ACCEPT IS TERMINAL

The low level of COBOL serial compilation is not supported; you must not putseveral programs one after another in a single member or file.

Host Variables

Host variables are variables used as interfaces between COBOL and ORACLE.

Variables declared between an:

EXEC SQL BEGIN DECLARE SECTION END-EXEC.

and an:

EXEC SQL END DECLARE SECTION END-EXEC.

are host variables.

PCC accepts only the following types of host variables.

Page 132: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-16 47 A2 12UR Rev04

Types of Host Variables

Variables Type

PIC S9(4) COMP-1 fixed binary (15)

PIC S9(9) COMP-2 fixed binary (31)

PIC S9[*9]V9[*9] COMP-3 packed decimal

PIC X(n) character (n)

COMP-9 floating point single precision

COMP-10 floating point single precision

COMP-1 fixed binary (15)

COMP-2 fixed binary (31)

Consequently, the following modifications must be made to the examples given inthe Pro*COBOL User's Guide.

You must change:

PIC S9(4) COMP to PIC S9(4) COMP-1PIC S9(9) COMP to PIC S9(9) COMP-2COMP-1 to COMP-9COMP-2 to COMP-10

Variables must be declared at one of the levels 01, 77 or 05.

Page 133: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-17

17.8 Linking a Pre-Compiled Program

A program pre-compiled by PCC and subsequently compiled by the appropriateGCOS 7 language compiler must also be linked with certain LINKER options.These options are in the member named ORACLE_LNK (of the SL librarydelivered with ORACLE).

EXAMPLE:

To link a pre-compiled program.

LINK_PG MY_PROG COMFILE = .SL..ORACLE_LNK;

In the example, ORACLE_LNK is contained in the .SL library. You can useanother library if necessary.

Page 134: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-18 47 A2 12UR Rev04

17.9 Executing a Pre-Compiled Program using OREXEC

When a program has been linked, a standard GCOS 7 Load Module (LM) isproduced. At execution time, the JOBLIB and OPTIONS parameters must beused. The ORACLE database being used must be started.

A GCL procedure called OREXEC is provided in the ORACLE delivery for callingthe load module. You use in the same way as ORACLE processors and utilities.

EXAMPLE:

To set the JOBLIB specifications and OPTIONS strings to the same default as forthe other ORACLE commands, enter:

OREXEC MY_PROG;

JOBLIB will be set to the contents of the H_ORACLE_SMLIB variable. You mayalso specify a specific JOBLIB using the SMLIB Keyword.

OPTIONS will be set to the correct format according to current #WD; it specifiesthe instance, the current directory, etc. Refer to Appendix A "JCL Specifics" formore information).

NOTE:You may also specify INSTANCE = <directory> in the OREXEC command.

Page 135: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The PCC Processor

47 A2 12UR Rev04 17-19

17.10 Accessing Monitored Files

If you have a pre-compiled program which accesses files under GAC (theGeneralized Access Control mechanism), the file sharing mode is SHARE =MONITOR.

NOTES:1. Log-on to ORACLE must take place after the file(s) have been opened.

2. Log-off from ORACLE must take place before the file is closed orcommitted.

3. A call to the H_OR_ICLN entry point of the ORACLE code must becoded twice, just after log-off from ORACLE and before closing orcommitting the file.

Page 136: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

17-20 47 A2 12UR Rev04

17.11 PCC Sample

In the source library delivered with an ORACLE kit, there are two programsCPCCDEM and COBPCCDEM which illustrate how SQL statements may beexecuted from a C program and from a COBOL program.

If your working directory has been set up correctly, you can run them by followingthese steps.

For C:

PCC INAME = CPCCDEM HOST = C IRECLEN = 132C CPCCDEM-PCC .SL OBSERV = 0 WARN = 0LK CPCCDEM-PCC COMFILE = 0 .SL..ORACLE-LINKOREXEC CPCCDEM-PCC

The demonstration programs add new employee records to the emp table.Checking is done to insure the integrity of the database.

The programs query the user for data as follows:

• Enter employee nam :

• Enter employee job:

• Enter employee salary:

• Enter employee dept:

Insertion terminates if <return> is entered when the employee name is requested.

The CPCCDEM program terminates when the insertion is completed whereas theCOBPCCDEM program queries the user for a department display as follows

• Do you wish to display all employees in a given department?

• Department number?

Answer y to the first question if you want to display employees of a department, or<return> if you want to terminate the program's execution.

Page 137: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 18-1

18. The TKPROF Utility

18.1 Introduction

The TKPROF utility enables you to analyze the contents of a previously generatedSQL trace file.

TKPROF reads a SQL trace file that contains internal description of SQLstatements executed during a SQL session. As an output it produces a readableoutput file containing statistics concerning these SQL statements

A trace of a SQL session can be asked either explicitly for a given session eitherfor the whole SQL statements executed by an ORACLE Database server.

The TKPROF utility is discussed in the appendix B of the ORACLE7 ApplicationDeveloper's Guide.

Page 138: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

18-2 47 A2 12UR Rev04

18.2 TKPROF Syntax

TKPROF

[ TRACEFILE = <trace-file> ]

[ OUTPUTFILE = <output-file> ]

[ SORT = { PRSCNT } ] [ { PRSCPU } ] [ { PRSELA } ] [ { PRSDSK } ] [ { PRSQRY } ] [ { PRSCU } ] [ { PRSMIS } ] [ { EXECNT } ] [ { EXECPU } ] [ { EXEELA } ] [ { EXEDSK } ] [ { EXEQRY } ] [ { EXECU } ] [ { EXEROW } ] [ { EXEMIS } ] [ { FCHCNT } ] [ { FCHCPU } ] [ { FCHELA } ] [ { FCHDSK } ] [ { FCHQRY } ] [ { FCHCU } ] : : [ { FCHROW } ] [ TABLE = <char40> ] [ INSERT = <file> ] [ SYS = { 1 } ] [ { 0 } ]

[ PRINT = { dec9 } ] : :

Page 139: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The TKPROF Utility

47 A2 12UR Rev04 18-3

18.3 TKPROF Parameters

TRACEFILE <trace-file> specifies the SQL trace file containing theSQL statement to be analyzed. The default fileextension is _TRC.

OUTPUTFILE <output-file> specifies the file which will contain theresult of the SQL statement analyzing. The default fileextension is _PRF.

SORT specifies the order of the displayed statistics to begenerated in the output file.

PRINT specifies the number of SQL statements to be analyzedfrom the TRACEFILE. By default, all the statementsfound in the TRACEFILE are analyzed.

EXPLAIN Specifies the <username> and the <password> to beused for the connection to the ORACLE databaseserver in order to execute an EXPLAIN PLANcommand for each SQL statements in the trace file.

More information on the EXPLAIN PLAN commandis found in Appendix B of the ORACLE7 ServerDeveloper's Guide.

TABLE Name of the table to be used to store the intermediateresults.

INSERT Name of the file where to store the generated SQLscript.

SYS If 1 (default), the recursive and SYS SQL statementswill be listed in the output of TKPROF. If 0, onlyUSER SQL statements will be traced.

standard-parameter-set Refer to Section 1.

USERID parameter could not be specified.

The ORACLE7 Server Application Developer's Guide, appendix B, provides all thenecessary information about these parameters description.

Page 140: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

18-4 47 A2 12UR Rev04

18.4 TKPROF Execution Notes

If you invoke TKPROF with no parameter, an online help text is displayed.

If a value is not given for the OUTPUTFILE file parameter:

• the name of the OUTPUTFILE will be asked interactively (I: prompt) if theABSENTEE standard parameter is not set (ABSENTEE = 0),

• the BATCH job will be aborted if the ABSENTEE standard parameter is set(ABSENTEE = 1).

A SQL trace file can be generated under two conditions:

• either during an SQL session stated that an "ALTER SESSION SETSQL_TRACE TRUE" command has been executed,

• either for all the statements executed by an ORACLE database server stated thatthe initialization parameter SQL_TRACE is set to TRUE (INIT_ORA parameterfile)....

SQL trace files are generated in library members named TSK_x_y_TRC located inthe #WD.SL library (#WD identifying the Working Directory currently set whenthe ORACLE database server has been launched (SOR W command). For acomplete discussion of SQL trace files, refer to Appendix B of the ORACLE7Installation Guide.

In order to produce the timing statistics offered by the TKPROF utility, it isnecessary to set to TRUE the initialization parameter TIMED_STATISTICS(INIT_ORA parameter file).

Depending on the EXPLAIN value (specified or not specified), the analyzing willbe made with or without a connection to the ORACLE database server.

Refer to the appendix B of the ORACLE7 Application Developer's Guide,ORACLE7 Server Utilities User's Guide for more details on the parameters andresult of the TKPROF utility.

Page 141: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 19-1

19. The ORACLE Call Interfaces

19.1 Introduction

OCI or Pro*SQL (as named in previous versions) is a set of entry points in theH_ORACLE sharable module, that can be called by user programs written in C orCOBOL.

With ORACLE version7, programs written in FORTRAN using the ORACLE CallInterfaces are no longer supported on the DPS 7000.

Programs using OCI are not pre-compiled via PCC.

OCI routines are described in the "ORACLE Call Interfaces Programmer's Guide".Chapters dealing with OCI routines for FORTRAN are not applicable on theDPS 7000.

Only the operating system dependencies relating to OCI are described hereafter.

Page 142: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

19-2 47 A2 12UR Rev04

19.2 Compiling an OCI Program

In the .SL library delivered with an ORACLE kit, there are two programs,COCIDEM_C and CBOCIDEM_COB which illustrate how OCI routines may becalled from a C program and from a COBOL program.

19.2.1 Compiling a C Program using OCI Routines

The C compiler must be used to compile COCIDEM_C.

The WARN et OBSERV options are reset, so as not to display some warnings dueto conversions or compiler optimizations.

C COCIDEM_C .SL WARN = 0 OBSERV = 0;

19.2.2 Compiling a COBOL Program using OCI Routines

The COBOL compiler must be used to compile CBOCIDEM_COB.

The LEVEL and CARDID parameters must be specified as shown.

Because the COBOL compiler issues a warning when an entry point is calledseveral times with a different number of parameters, the WARN option has been setto NO when compiling CBOCIDEM_COB.

CBL CBOCIDEM_COB .SL LEVEL = NSTD CARDID = 0 WARN = NO;

Page 143: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

The ORACLE Call Interfaces

47 A2 12UR Rev04 19-3

19.3 Linking an OCI Program

On a DPS 7000 machine, OCI routines are packaged in the H_ORACLE sharablemodule. Note that, unlike other machines, the concept of OCI library doesn't existon the DPS 7000.

Chapter 2 and Appendix G of the "ORACLE Call Interfaces Programmer's Guide"deal with the linking of OCI programs and refer to the "Deferred or Non-deferredMode Linking".

On DPS 7000 you have no way to specify Deferred or Non-Deferred mode at linktime. When using a H_ORACLE version7 sharable module, the execution of OCIbind and define calls: OBNDRA, OBNDRN, OBNDRV, and ODEFIN are alwaysdeferred.

You can also optionally defer parsing the statement using the new OPARSE call, bysetting the DEFFLG parameter of this routine to a non-zero value.

To link an OCI program on DPS 7000, special LINKER options are needed. Theseare contained in the member ORACLE_LNK delivered in the .SL library of anORACLE kit.

To build executable load modules, the two demonstration programs may be linkedas follows:

LINK_PG COCIDEM_C COMFILE = .SL..ORACLE_LNK;

LINK_PG CBOCIDEM COMFILE = .SL..ORACLE_LNK;

Page 144: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

19-4 47 A2 12UR Rev04

19.4 Executing an OCI Program

To execute your OCI program, you can use the standard GCOS 7 commandEXEC_PG or the OREXEC command (if it has been installed) delivered with theORACLE kit.

When using the EXEC_PG command, you must specify the JOBLIB parameter toreference the private system file which contains the H_ORACLE sharable module.The OPTIONS parameter specifies the instance, the current directory, and so on(refer to appendix A JCL specifics for more information).

With EXEC_PG, you can execute the two demonstration programs as follows:

EXEC_PG COCIDEM_C JOBLIB = ORADIR.SM -OPTIONS = '<instance>/<current-dir>/<msg-dir>/<lang>' ;

EXEC_PG CBOCIDEM JOBLIB = ORADIR.SM -OPTIONS = '<instance>/<current-dir>/<msg-dir>/<lang>' ;

When using the OREXEC command, you reference the private system file whichcontains the H_ORACLE sharable module through the GCL global variableH_ORACLE_SMLIB or through the SMLIB keyword.

With OREXEC, you can execute the two demonstration programs as follows:

OREXEC COCIDEM_C SMLIB = ORADIR.SM;

OREXEC CBOCIDEM SMLIB = ORADIR.SM;

The demonstration programs add new employee records to the emp table.Checking is done to ensure the integrity of the database.

The programs query the user for data as follows:

Enter employee name:Enter employee job:Enter employee salary:Enter employee dept:

The programs terminate if <return> is entered when the employee name isrequested.

If the record is successfully inserted, the following message is printed:

<ename> added to department <dname> as employee <empno>

19.5 OBREAK Function

The OBREAK function is not supported on GCOS 7.

Page 145: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 20-1

20. SQL*Report: RPT and RPF

20.1 The RPT Utility

You use the Report Generator Utility (RPT) to create reports and letters whichinclude database information derived from an ORACLE database via SQLstatements.

RPT accepts as input a control file containing RPT report writer statements, usertext, and RPF text formatting commands. Its output is an interim file containingdata (extracted from an ORACLE database), user text, and RPF commands (notprocessed by RPT). To obtain the final output report or document, this interim filemust be processed by the RPF processor (see Section 14.2).

RPT is described in the SQL*Report User's Guide.

20.1.1 RPT Syntax

RPT [ IN = ] <input-file-name>

[ OUT = ] <output-file-name>

[ CONTEXT = <dec3> ]

[ <standard-parameter-set> ]

Page 146: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

20-2 47 A2 12UR Rev04

20.1.2 RPT Parameters

IN <input-file-name>, mandatory, specifies the input filethat contains the RPT statements, user text, and RPFcommands. Its name follows the general rules forORACLE file names (see Section 1). The fileconcerned must be a UFAS sequential file or a memberof an SL library. In the latter case, you can create andload it into the library using EDIT or FSE.

OUT <output-file-name>, mandatory, specifies the outputfile produced by RPT. It will contain data (extractedfrom an ORACLE database), user text, and RPFcommands. The OUT file name follows the generalrules for ORACLE file names (see Section 1).

The RPF commands are not processed by RPT. OUTis an interim file that must subsequently be input toRPF to produce a usable report. The file concernedmust be a UFAS sequential file or a member of an SLlibrary. If it does not exist, RPT will create it (but RPTwill not create the SL library itself).

CONTEXT Optional, specifies the size of the contexts needed toexecute the SQL queries (used to extract data from theORACLE database). These SQL queries will bereferenced by the RPT statements (in the IN file). Youenter a decimal value between 3 and 128 that gives thesize in Kbytes.

standard-parameter-set Refer to Section 1.You must not specify USERID and/or INSTANCE.

Page 147: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

SQL*Report: RPT and RPF

47 A2 12UR Rev04 20-3

20.1.3 RPT File Name Suffixes

RPT expects that the input-file name has the suffix _RPT. RPT generates anoutput-file whose name has the suffix _RPF. Refer to Section 1 for the generalrules covering ORACLE file names.

EXAMPLE:

An input file called EX1_RPT exists in the source library associated with thecurrent working directory (MYDIR). Enter:

RPT SCOTT/TIGER IN=EX1 OUT=EX1

This requests RPT to fetch the input source from the memberMYDIR.SL..EX1_RPT, and to place the output source in the memberMYDIR.SL..EX1_RPF (for further input to the RPF processor).

Page 148: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

20-4 47 A2 12UR Rev04

20.2 The RPF Processor

The Report Text Formatter (RPF) processor is used to control the formatting ofthe information contained in the interim file created by RPT (see Section 14.1), andto produce the final report or document for printing.

The interim file produced by RPT contains data, user text, and RPF commands.RPF processes the RPF commands (which specify the text format) in the input fileand produces an output file containing the report or letter in its final form. RPF isdescribed in the SQL*Report User's Guide.

20.2.1 RPF Syntax

RPF [ IN = ] <input-file-name>

[ OUT = ] <output-file-name>

[ SWITCHES = <RPF-option-string> ]

[ <standard-parameter-set> ]

20.2.2 RPF Parameters

IN <input-file-name>, mandatory, specifies the input filewhich contains data, user text, and RPF commands.This file is usually the OUT file from the RPT utility.You may, however, use RPF independently fromORACLE (it is a commonly used processor). Thename follows the general rules for ORACLE filenames (see Section 1). The file concerned can be aUFAS sequential file or a member of an SL library.

OUT <output-file-name>, mandatory, specifies the outputfile which will contain the final report or letterproduced by the RPF processor. Its name follows thegeneral rules for ORACLE file names (see Section 1).The file concerned must be a UFAS sequential file, ora member of an SL library. If the file does not exist,RPF will create it (but, in the case of an SL library,RPF will create the member but will not create thelibrary itself).

Page 149: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

SQL*Report: RPT and RPF

47 A2 12UR Rev04 20-5

SWITCHES <RPF-option-string>, optional, specifies a string ofoptions to be passed to RPF. Among the standard RPFoptions, only the values P, S and U are meaningfulwith GCOS 7. The string must be preceded by ahyphen (-).

The meaning of these values is as follows:

P specifies the pages to be processed. The format isP:n:m where n is the number of the first page to beprocessed, and m is the number of the last page to beprocessed. By default, the entire file is processed.

S specifies that a copy of the output report is to beplaced in the SYS.OUT file (from which it willautomatically be printed by the GCOS 7 OutputWriter).

U specifies that lower case alphabetical characters inthe report text are to be converted to upper case.If you omit SWITCHES, the S and U options areignored, and the entire file is processed.

NOTE:The following options which are valid for ORACLE are meaningless for GCOS7 and must not be specified: A, B, D, F, I, R, and W.

standard-parameter-set Refer to Section 1.

EXAMPLE:

To execute RPF, specifying the S and U options, and to process the file from thesecond page to the fifth page, enter:

RPF MY_RPT MY_OUT SWITCHES = -SUP:2:5

Page 150: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

20-6 47 A2 12UR Rev04

20.2.3 RPF File Name Suffixes

RPF expects that the input-file name has the suffix _RPF. RPF generates anoutput-file whose name has the suffix _LIS. Refer to Section 1 for the generalrules covering ORACLE file names.

EXAMPLE:

An input file called EX1_RPF exists in the source library associated with thecurrent working directory (MYDIR). Enter:

RPF EX1 EX1

This requests RPF to fetch the input source from the memberMYDIR.SL..EX1_RPF, and to place the output source in the memberMYDIR.SL..EX1_LIS.

Page 151: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 A-1

A. JCL Specifics

All ORACLE processors and utilities can be invoked in the Job Control Language(JCL) at STEP statement level. Processor-specific commands must be put in theOPTIONS string. See the examples at the end of this Appendix.

For more information on the Job Control Language, refer to the JCL User's Guideand to the JCL Reference Manual.

The set of JCL statements (and the OPTIONS keyword) are described below.

It must be noted that each ORACLE GCL command has a specific parameternamed JCL (boolean type) which can be used to display to the user console theJCL commands equivalent to a GCL invocation.

EXAMPLE: To list JCL commands equivalent to a SQL*Plus GCL execution

S: MP O7013B;S: MWINLIB BIN .BIN;S: ORACLE;S: MP MYDIR;S: SQLPLUS USERID=SCOTT/TIGER COMFILE=MY_COMFILE -:- INSTANCE=MY_INST JCL=1;

displays the following messages on user console:

JOBLIB SM O7013B.SM;STEP H_OR_AFI (O7013B.LM) DUMP=NO OPTIONS='MY_INST/MYDIR/O7013B/AMERICAN/* @MY_COMFILE

';SIZE 130;ENDSTEP;

Page 152: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

A-2 47 A2 12UR Rev04

JOBLIB SM

This names the Sharable Module Library (SM) to be used.

STEP

Introduces a JCL step which contains JCL statements concerning file assignments,memory size and so on. STEP names the load module to be loaded. The name takesthe form H_OR_<name> where <name> is the utility or processor. For example,H_OR_SOR or H_OR_AFI. The load module library is also named.

OPTIONS

Specifies the Instance, the current directory, the message directory, and anyrequired user-data (sometimes called the processor-specific-string). The format ofthe OPTIONS string is as follows:

OPTIONS='<instance>/<cur-dir>/<msg-dir>/<lang>/* <user data> ';

<instance> references the instance name (formerly the ORACLE workingdirectory). This denotes the ORACLE server to be connected. This value is thenpassed to the processor or utility which is being called.

<cur-dir> gives the value of the current working directory (#WD). This can bedifferent from the instance name. It is used to get absolute file names from localfile names during the utility or processor execution.

<msg-dir> specifies the directory where the error-message files have beeninstalled.

<lang> specifies the NLS language to be used.

<user-data> must always start with an asterisk followed by a blank character. It canprovide direct commands such as INITIALIZE for the SOR processor. For theSQL*Plus processor, it can also specify an input command file whose name isprefixed by the @ character.

SIZE

Declares the amount of memory (in Kilobytes) to be made available for a processoror utility before it is executed. SIZE is usually declared explicitly only for the SORprocessor. Refer to Section 2, if required.

Page 153: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

JCL Specifics

47 A2 12UR Rev04 A-3

EXAMPLE 1: Calling the SQL*Plus processor

$JOB SQLPLUS CLASS=A HOLDOUT JOR=NORMAL;JOBLIB SM ORA7.SM;STEP H_OR_AFI (ORA7.LM) DUMP=NO OPTIONS='ORA70/MYDIR/ORA7/AMERICAN/* @DEMOINIT_DEMO ';SIZE 130;ENDSTEP;$ENDJOB;❑

In this example, SQL*Plus will run under the MYDIR directory, and will connectthe server running under the ORA70 directory. SQL*Plus then executes the fileMYDIR.SL..DEMOINIT_DEMO_SQL as specified in user-data part of theOPTIONS string. Note that H_OR_AFI is the load module name for the SQL*Plusprocessor.

EXAMPLE 2: Calling the SQL*Plus Processor using STDIN

$JOB SQLPLUS CLASS = A HOLDOUT JOR = NORMAL;JOBLIB SM ORA7.SM;STEP H_OR_AFI (ORA7.LM) DUMP = NO OPTIONS ='ORA70/ORA70/ORA7/AMERICAN/* SYSTEM/MANAGER ';SIZE 130;ASG STDIN, MYDIR.SL, SUBFILE = DEMOINIT_DEMO_SQL;ENDSTEP;$ENDJOB;❑

In this example, SQL*Plus will run under the same directory as the ORACLEinstance (ORA70). Instead of specifying the command file in the OPTIONS string(see Example 1), it is specified with STDIN. Connection to SQL*Plus is madeusing the SYSTEM/MANAGER login. Since the STDERR internal file name isnot assigned, any trace and error messages are sent to the terminal in IOF, or topublic SYSOUT in batch.

EXAMPLE 3: Calling the COR processor

$JOB COR CLASS=A HOLDOUT JOR=NORMAL;JOBLIB SM ORA7.SM;STEP H_OR_COR (ORA7.LM) DUMP=NO OPTIONS='ORA7/ORA7/ORA7/AMERICAN/* I ';SIZE 640;ENDSTEP;$ENDJOB;❑

In the above example, the COR processor is called with the INITIALIZE option.

Page 154: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

A-4 47 A2 12UR Rev04

EXAMPLE 4: Calling the SOR processor

JOBLIB SM ORA7.SM;STEP H_OR_SORW (ORA7.LM) DUMP=NO OPTIONS='ORA70/ORA70/ORA7/AMERICAN/* W ';SIZE 2000;ENDSTEP;

In the above example, the SOR processor is called with the WARMSTART option.For SOR, the value for SIZE depends on the number of buffers specified inINIT_ORA (see Section 2). Note that the instance and current working directorymust always be the same when calling SOR.

EXAMPLE 5: Calling the Import utility

$JOB IMPORT CLASS=A HOLDOUT JOR=NORMALJOBLIB SM ORA7.SM;STEP H_OR_IMP (ORA7.LM) DUMP=NO OPTIONS='ORA70/ORA70/ORA7/AMERICAN/* system/manager buffer=10240file=ORA70.DEMO.EXPDAT full=y ';SIZE 130;ENDSTEP;

In the above example, IMPORT is called with a series of parameters in theOPTIONS string. The OPTIONS string can contain up to 4096 characters.

EXAMPLE 6: Calling PCC

JOBLIB SM ORA7.SM;STEP H_OR_PC0 (ORA7.LM) DUMP=NO OPTIONS='ORA70/ORA70/ORA7/AMERICAN/* iname=CONNECT host=COBOL ireclen=132dbms=V7 oreclen=132 pagelen=56 ';SIZE 100;ENDSTEP;

In the above example, PCC is called to precompile a COBOL-85 program calledCONNECT_CBL. The suffix is known because of the HOST-parameter value.

Page 155: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 g-1

Glossary

A

absentee modeGCL commands can be entered with the input coming from the file assigned to the STDIN internalfile name instead of prompting at the terminal. Commands are then executed as batch jobs.

C

cold startSee database creation.

command file (COMFILE)A series of prearranged tasks to be executed as soon as the SQL*Plus or the SQL*DBA Processorstarts.

connecting to ORACLEThe act of providing the right combination of username and password, in order to identify yourselfto ORACLE as a valid user (one who has been given privileges to access and use the database).

context areaA work are where ORACLE stores the current SQL statement, and if the statement is a query, theresult's column headings and one row of the result. Synonym for cursor.

CORA GCL command used to launch the ORACLE Communication process necessary to use SQL*Netand two-task connections.

creating a databaseThe process of making a database ready for initial use.

current working directoryThe current working directory is represented under GCOS 7 as the system variable #WD. It locatesthe ORACLE database files when the SOR processor starts. It is used to construct absolute filenames from local (abbreviated) file names.

cursorSynonym for context area. A storage area associated with a SQL command in a trigger. Cursorsmay be open or closed.

Page 156: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

g-2 47 A2 12UR Rev04

D

databaseA set of dictionary tables and user tables which are treated as a unit.

database fileA file used in a database. A database is made up of one or more tablespaces which in turn are madeup of one or more database files.

database nameA unique identifier used to name a database.

database serverAlso known an instance. The database server is implemented as the SOR processor under GCOS 7.It is usually run as a batch job by the DBA. When SOR is running and connected to an opendatabase, then the database system is available to users.

database systemA combination of an instance and a database. If the instance is started and connected to an opendatabase, then the database system is available for access by users.

E

entry pointsUsed to access or modify an ORACLE database. These entry points in the ORACLE sharablemodule can be called by user programs.

ExportAn ORACLE utility used to write database data to GCOS 7 files, which can later be restored viaImport.

F

fetchOne phase of query execution, where actual rows of data meeting all search criteria are retrievedfrom the database.

G

GCLSee GCOS 7 Command Language.

GCOS 7 Command LanguageThe set of commands used to manage the General Comprehensive Operating Supervisor on theDPS 7000.

Page 157: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

Glossary

47 A2 12UR Rev04 g-3

I

ImportAn ORACLE utility used to read GCOS 7 files containing database data previously written byExport, in order to restore the data to an ORACLE database.

INIT.ORA parameter fileAn ORACLE file containing a list of parameters that is read when an instance is started, toconfigure the instance. The parameters help identify the database and also affect the size of theSGA, and therefore the performance of the instance.Under GCOS 7, the default ORACLE INIT.ORA file is called INIT_ORA. It is located in thesource library associated with the current working directory in use when the SOR command islaunched.

instanceA running ORACLE. There is always a one to one correspondence between an ORACLE instanceand a system global area (SGA). An in stance usually consists of an SGA, several backgroundprocesses, and zero or more user processes.

J

JCLSee Job Control Language.

Job Control LanguageThe GCOS 7 language that controls the execution of jobs.

Job Occurrence ReportA printed report that contains all system information concerning the execution of any job step thatproduces output.

JORSee Job Occurrence Report.

L

LIST_SVRA GCL command used to list the ORACLE process-group running on GCOS 7.

Page 158: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

g-4 47 A2 12UR Rev04

M

MIGRATEAn ORACLE utility included with the ORACLE7 RDBMS used to perform the first stage of themigration of an ORACLE V6 database format to an ORACLE7 one.

MIGRATE.BSQ fileAlso see MIGRATE_BSQ. An ORACLE file containing a list of commands and parameters that isread during an execution of the MIGRATE utility.

MIGRATE_BSQ fileUnder GCOS 7, the default MIGRATE.BSQ file is called MIGRATE_BSQ. It is located in thesource library associated with the current working directory.

mounted databaseA database associated with an ORACLE instance. The database may be open or closed.

O

open databaseA database connected to an instance and available for access by users.

P

precompilerA program that reads a source program file and writes a modified source program file, which acompiler may then read. ORACLE supports a precompiler called PCC (Precompiler, Common)that processes SQL commands embedded in userexits and other programs.

R

RDBMSAcronym for Relational Database Management System.

S

sessionThe duration of time from one username connecting to and disconnecting from the database.

shutdownThe process of disconnecting an instance from a database and terminating the instance. Contrastwith start up.

SORA GCL command used to launch an ORACLE database server on GCOS 7.

Page 159: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

Glossary

47 A2 12UR Rev04 g-5

spoolingFrom Simultaneous Peripheral Operations On Line; spooling refers to storing the results of a queryin a file as well as displaying them on a screen.

SQLThe standard name for the Structured Query Language, pronounced "see kwill" or "S Q L."

SQLCA (SQL Communications Area)A storage area used by IAP functions which returns useful information to userexits that call them.

SQL*DBAAn ORACLE utility included with the ORACLE7 RDBMS, for use by DBAs while performingdatabase maintenance and monitoring.

SQL*LoaderAn ORACLE tool used to load data from operating system files into ORACLE database tables.

SQL*PlusAn ORACLE tool used to execute SQL command against an ORACLE database.

start upThe process of starting an instance, presumably with the intention of mounting and opening adatabase, in order to make a database system available for use.

system global areaMemory shared by all users of a database. Provides communication between the user and thebackground process.

T

tablespaceA logical portion of a database used in allocating storage for table data and table indexes.

TKPROFAn ORACLE utility included with the ORACLE7 RDBMS used for to analyze of a SQL trace file.

triggerA series of SQL commands and/or SQL*Forms commands that are executed when a certain eventoccurs.

Page 160: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

g-6 47 A2 12UR Rev04

U

user exitA function written in a procedural programming language that you may call from a trigger step.Under GCOS 7, user exits may be written in COBOL, C and FORTRAN. A user exit can displaymessages and perform many kinds of processing which are beyond the scope of SQL orSQL*Forms commands.

usernameThe name by which a user is known to the ORACLE database and to other users, as in the prefix toa table name (as in SCOTT, in table SCOTT.EMP). Every username is associated with a secretpassword, and both must be entered and verified by the data dictionary, in order to connect toORACLE.

V

validationA processing step to verify that some piece of information is (potentially) valid.

variable length recordA variable length record may have any length up to a user-specified maximum.

W

warmstartSee start up.

working directorySee current working directory.

WORA GCL command used to synchronize ORACLE jobs.

Page 161: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

47 A2 12UR Rev04 i-1

Index

#

#WD 1-7

$

$ character 1-8$$ identifier 8-3

:

: character 1-8

A

ABS (GCL) 1-5absentee mode 1-14ABSENTEE(GCL) 1-4ACTION (COR) 3-2ACTION (SOR) 2-2ADDTASKS (SOR) 2-2, 2-4ALLOW_OFFLINE (MIGRATE) 16-3ASMO (SOR) 2-3, 2-4

B

BAD (SQL*Loader) 9-3BINDSIZE (SQL*Loader) 9-4Break 1-10BUFFER (Export) 10-6BUFFER (Import) 10-3

C

C (COR) 3-2C (SOR) 2-2C language 17-14, 19-2CARDID 17-14CFILE (MIGRATE) 16-3CHECK_ONLY (MIGRATE) 16-3CLASS (GCL) 1-14CLEAR (COR) 3-2CLEAR (SOR) 2-2CNVFILE (MIGRATE) 16-3COBOL language 17-14, 19-2CODE (PCC) 17-9COMFILE (SQL*DBA) 6-2COMFILE (SQL*Plus) 8-2COMMIT (Import) 10-3Compilation 17-14COMPRESS (Export) 10-6CONNECT access 9-1CONSISTENT (Export) 10-7CONSTRAINTS (Export) 10-6CONTEXT (RPT) 20-2CONTROL (SQL*Loader) 9-3Conventional Path 9-6CONVERT file 16-3, 16-5CONVERT_ORA 16-3COR Processor Section 3: 3-1COUNT (WOR) 4-2CREATE USER (SQL command) 1-19current working directory 1-7

Page 162: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

i-2 47 A2 12UR Rev04

D

DATA (SQL*Loader) 9-3Data format, input 9-10Database, transferring between DPS 7000 sites

10-9DBMS (PCC) 17-6DBNAME (MIGRATE) 16-3DBV 15-1DEFINE (PCC) 17-7DESTROY (Import) 10-4DIRECT (SQL*Loader) 9-5Direct Path 9-6DISCARD (SQL*Loader) 9-3DISCARDMAX (SQL*Loader) 9-4DUMPCF (MIGRATE) 16-3

E

ECHO (MIGRATE) 16-3ED (SQL*Plus) 8-4EDIT (SQL*Plus) 8-4entry points 19-1EOS 1-23ERRFILE 1-2, 1-4ERRFILE (GCL) 1-13ERRORS (PCC) 17-6ERRORS (SQL*Loader) 9-4EXEC_PG 19-4Execution

absentee mode 1-4errors 1-13interactive mode 1-2interruption 1-10, 1-23

Execution See Running Jobs: 3-1EXP 10-1EXPLAIN (TKPROF) 18-3Export 10-1

F

FILE (Export) 10-6FILE (Import) 10-3File name

absolute 1-7

local 1-7rules 1-7suffixes 1-8suffixes for RPF 20-6suffixes for RPT 20-3

file read mode 9-7Files

monitored 17-19SQLCA 17-10

FIPS (PCC) 17-8FIXED <len> (SQL*Loader) 9-7FORMAT (PCC) 17-7FROMUSER (Import) 10-3FULL (Export) 10-6FULL (Import) 10-3

G

GCL Parameter Setstandard 1-11

GCL procedurepersonalized skeleton 1-6

GLOGIN_SQL 8-4GRANT (SQL command) 1-19GRANTS (Export) 10-6GRANTS (Import) 10-3

H

HELP (Export) 10-7HELP (Import) 10-4HELP (LXINST) 11-2HELP (MIGRATE) 16-4HOLD_CURSOR (PCC) 17-6HOLDOUT (GCL) 1-15HOST (PCC) 17-4HOST command 8-3, 8-7Host variables 17-15

I

I (COR) 3-2I (SOR) 2-2IGNORE (Import) 10-3IMP 10-1

Page 163: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

Index

47 A2 12UR Rev04 i-3

Import 10-1IN (RPF) 20-4IN (RPT) 20-2INAME (PCC) 17-4INCLUDE (PCC) 17-7INCTYPE (Export) 10-6INCTYPE (Import) 10-3INDEXES (Export) 10-6INDEXES (Import) 10-3INDEXFILE (Import) 10-4INFILE 1-2INFILE (GCL) 1-12INIT (COR) 3-2INIT (SOR) 2-2INIT.ORA file 1-10INIT_ENV FILE (LXINST) 11-6INIT_ORA 16-4INITIALIZE (COR) 3-2, 3-3INITIALIZE (SOR) 2-2, 2-4INPUT (LXINST) 11-2INPUT/OUTPUT (LXINST) 11-2INSERT access 9-1INSTANCE (GCL) 1-12interactive mode 1-14interim file 20-2INTERVAL (WOR) 4-2IRECLEN (PCC) 17-5

J

JCL parameter A-1JCL See Appendix A: A-1Job Control Language (JCL) Appendix A A-1

Job Occurrence Report 1-15JOBLIB SM (JCL) A-2

L

LEVEL = NSTD 17-14LINES (PCC) 17-8Linking 17-17, 19-3LIST_SVR Section 5: 5-1LITDELIM (PCC) 17-7LMLIB (GCL) 1-16

LNAME (PCC) 17-5LOAD (SQL*Loader) 9-4LOAD_FILESET 10-9Loading Data 9-7, 9-9LOG (SQL*Loader) 9-3Log on, automatic 1-19LOGIN_SQL 8-4LRECLEN (PCC) 17-5LTYPE (PCC) 17-6LXINST 11-1LXINST SYNTAX 11-2

M

MAXLITERAL (PCC) 17-8MAXLOGMEMBERS (MIGRATE) 16-4MAXOPEN CURSORS (PCC) 17-6MIGFILE (MIGRATE) 16-3Migrate Section 11: 16-1MIGRATE_BSQ 16-3MIGRINS command 16-6MODE (PCC) 17-8MSGDIR 1-16MULTIPLIERS (MIGRATE) 16-4

N

NAME (GCL) 1-14NEW_DBNAME (MIGRATE) 16-4NLS 11-1NO_SPACE_CHECK (MIGRATE) 16-4NOLOG (SQL*Plus) 8-2NUMTASKS (SOR) 2-2

O

OBREAK function 19-4OCI Section 14: 19-1ONAME (PCC) 17-5OPS$ 1-19OPTIONS (JCL) A-2ORACA (PCC) 17-8ORACLE Sharable Module 19-1ORECLEN (PCC) 17-5OREXEC 17-18, 19-4

Page 164: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

i-4 47 A2 12UR Rev04

OUT (RPF) 20-4OUT (RPT) 20-2OUTFILE 1-2OUTFILE (GCL) 1-12OUTPUT (LXINST) 11-2OUTPUTFILE (TKPROF) 18-3OWD 1-12OWNER (Export) 10-6

P

PAGELEN (PCC) 17-5Parameters, standard GCL 1-11PARFILE (Export) 10-7PARFILE (Import) 10-4PARFILE (SQL*Loader) 9-3Path a connection 14-1PCC 17-1PFILE (MIGRATE) 16-4Precompilation See Pre-Compiler: 17-1PreCompiler, Common (PCC) Section 12:

17-1PRINT (TKPROF) 18-3Pro*SQL Section 14: 19-1

R

RECORD (Export) 10-6RECORD (SQL*Loader) 9-7RELEASE_CURSOR (PCC) 17-6Report formatting 8-6Report Generator Utility 20-1Report Text Formatter 20-4RESTORE_FILESET 10-9Route a connection 14-1ROWS (Export) 10-6ROWS (Import) 10-3ROWS (SQL*Loader) 9-4RPF 20-4RPT 20-1

S

S (COR) 3-2S (SOR) 2-2

SAVE_FILESET 10-9SELECT_ERROR (PCC) 17-9severity-4 errors 1-18SHOW (Import) 10-3SHUT (COR) 3-2SHUT (SOR) 2-2SHUTDOWN (COR) 3-2, 3-3SHUTDOWN (SOR) 2-2, 2-4SILENT (SQL*Loader) 9-4SILENT (SQL*Plus) 8-2SITE (WOR) 4-2SIZE (GCL) 1-15SIZE (JCL) A-2SKIP (SQL*Loader) 9-4SLLIB (GCL) 1-16SMLIB (GCL) 1-16SOR Processor Section 2: 2-1SORT (TKPROF) 18-3SPOOL (MIGRATE) 16-4SPOOL (SQL*Plus) 8-5SPOOL Command

SPOOL <file-name> 8-5SPOOL OFF 8-5SPOOL OUT 8-5

SQL data language 8-1SQL*DBA Section 6: 6-1SQL*Loader Section 9: 9-1SQL*Plus Section 8: 8-1SQL_TRACE 18-4SQLCHECK (PCC) 17-8START (SQL*Plus) 8-3STARTUP FILES (SQL*Plus) 8-4STATISTICS (Export) 10-7STDERR 1-2STDIN 1-2STDOUT 1-2STEP (JCL) A-2STREAM (SQL*Loader) 9-7SVRMGRL 12-1SWITCHES

P 20-5S 20-5U 20-5

SWITCHES (RPF) 20-5synchronization

job with server 1-20

Page 165: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

Index

47 A2 12UR Rev04 i-5

T

TABLES (Export) 10-6TABLES (Import) 10-3Tape files, using 10-9TERMINATE_JOB 1-20test connection 13-1TIMED_STATISTICS 18-4TJ 1-20TKPROF Section 13: 18-1TNSPING 13-1TOUSER (Import) 10-3TRACEFILE (TKPROF) 18-3TRCROUTE 14-1TYPE (WOR) 4-2

U

UFAS file 9-9Usage (LXINST) 11-3USERID 1-19USERID (GCL) 1-11USERID (PCC) 17-8USERID (WOR) 4-2

V

VARIABLE [<len>] (SQL*Loader) 9-7

W

W (SOR) 2-2WARM (SOR) 2-2WARMSTART (SOR) 2-2WOR 1-20WOR Processor Section 4: 4-1

X

XREF (PCC) 17-6

Page 166: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

ORACLE7 Guide to Processors and Utilities

i-6 47 A2 12UR Rev04

Page 167: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

Technical publication remarks form

Title : DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and UtilitiesDatabase Products: ORACLE

Reference Nº : 47 A2 12UR 04 Date: March 2000

ERRORS IN PUBLICATION

SUGGESTIONS FOR IMPROVEMENT TO PUBLICATION

Your comments will be promptly investigated by qualified technical personnel and action will be taken as required.If you require a written reply, please include your complete mailing address below.

NAME : Date :

COMPANY :

ADDRESS :

Please give this technical publication remarks form to your BULL representative or mail to:

Bull - Documentation Dept.

1 Rue de ProvenceBP 20838432 ECHIROLLES [email protected]

Page 168: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

Technical publications ordering form

To order additional publications, please fill in a copy of this form and send it via mail to:

BULL CEDOC357 AVENUE PATTONB.P.2084549008 ANGERS CEDEX 01FRANCE

Phone: +33 (0) 2 41 73 72 66FAX: +33 (0) 2 41 73 70 66E-Mail: [email protected]

CEDOC Reference # Designation Qty

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

_ _ _ _ _ _ _ _ _ [ _ _ ]

[ _ _ ] : The latest revision will be provided if no revision number is given.

NAME: Date:

COMPANY:

ADDRESS:

PHONE: FAX:

E-MAIL:

For Bull Subsidiaries:

Identification:

For Bull Affiliated Customers:

Customer Code:

For Bull Internal Customers:

Budgetary Section:

For Others: Please ask your Bull representative.

Page 169: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:
Page 170: ORACLE 7 Guide to Processors and Utilitiessupport.bull.com/ols/product/system/gcos7/gcos7... · DPS7000/XTA NOVASCALE 7000 ORACLE 7 Guide to Processors and Utilities Database Products:

BULL CEDOC

357 AVENUE PATTON

B.P.20845

49008 ANGERS CEDEX 01

FRANCE

47 A2 12UR 04REFERENCE