HP NonStop SQL Supplement for H-Series RVUs Abstract This supplement provides information about HP NonStop™ SQL/MP and DataLoader/MX that is specific to H-series release version updates (RVUs). The currently published SQL/MP and DataLoader/MX manuals were written for G-series users. Before using the manuals, H-series users should review and understand the exceptions noted in this supplement.
Document History Part Number Product Version Published 529446-005 NonStop SQL/MP G06 and DataLoader/MX G10 February 2006 529446-004 NonStop SQL/MX H01 December 2005 529446-003 NonStop SQL/MX H01 November 2005 529446-002 NonStop SQL/MX H01 July 2005
HP NonStop SQL Supplement for H-Series RVUs Index Examples What’s New in This Manual iii Manual Information iii New and Changed Information Figures Tables iii About This Manual v Documentation Products Covered by This Supplement Audience v Organization v Related Documentation vi Notation Conventions vii v 1.
2. DataLoader/MX Reference Manual Contents 2. DataLoader/MX Reference Manual Index Examples Example 1-1. Sample SQL Compiler Listing of a COBOL Program 1-51 Figures Figure 1-1. Figure 1-2. Figure 1-3. Figure 1-4. Figure 1-5. Compiling a COBOL Program in TNS Mode 1-6 Compiling a COBOL Program in TNS/R Native Mode Compiling a COBOL Program in TNS/E Native Mode Accelerated SQL Program File 1-36 SQL Program File Format 1-50 1-8 1-10 Tables Table 1-1. Table 1-2. Table 1-3. Table 1-4.
What’s New in This Manual Manual Information HP NonStop SQL Supplement for H-Series RVUs Abstract This supplement provides information about HP NonStop™ SQL/MP and DataLoader/MX that is specific to H-series release version updates (RVUs). The currently published SQL/MP and DataLoader/MX manuals were written for G-series users. Before using the manuals, H-series users should review and understand the exceptions noted in this supplement.
What’s New in This Manual • • • • • • New and Changed Information SQL/MX Programming Manual for C and COBOL: C/C++ Program Compilation is now in the SQL/MX Programming Manual for C and COBOL. SQL/MX Programming Manual for C and COBOL: COBOL Program Compilation is now in the SQL/MX Programming Manual for C and COBOL. SQL/MX Guide to Stored Procedures in Java is now in the SQL/MX Guide to Stored Procedures in Java. Terms in the SQL/MX Glossary are incorporated in the NonStop SQL/MX Glossary.
About This Manual This supplement provides information about NonStop SQL/MP and DataLoader/MX that is specific to H-series RVUs. The HP Integrity NonStop NS-series server is the next generation NonStop server platform, which runs on the Intel® Itanium® processor. Integrity NonStop NS-series servers run H-series software. This supplement describes how H-series software changes affect NonStop SQL/MP and DataLoader/MX. For most purposes, the most recent SQL/MP and DataLoader/MX documentation is valid.
Related Documentation About This Manual Related Documentation This figure shows the SQL/MX library of manuals, which includes the DataLoader/MX Reference Manual: Introductory Guides SQL/MX Comparison Guide for SQL/MP Users SQL/MX Quick Start Reference Manuals SQL/MX Reference Manual SQL/MX Messages Manual Installation Guides SQL/MX Installation and Management Guide NSM/web Installation Guide Connectivity Manuals SQL/MX Connectivity Service Manual Migration Guides SQL/MX Database and Applicatio
Notation Conventions About This Manual This figure shows the documentation products in the SQL/MP library: Introductory Manuals NonStop SQL/MP Glossary Introductio n to NonStop SQL/MP Reference Manuals Guides NonStop SQL/MP Installation and Management Guide NonStop SQL/MP Version Management Guide NonStop SQL/MP Query Guide NonStop SQL/MP Report Writer Guide NonStop SQL/MP Reference Manual NonStop SQL/MP Messages Manual Programming Manuals NonStop SQL/MP Programming Manual for C NonStop SQL/MP
General Syntax Notation About This Manual lowercase italic letters. Lowercase italic letters indicate variable items that you supply. Items not enclosed in brackets are required. For example: file-name computer type. Computer type letters within text indicate C and Open System Services (OSS) keywords and reserved words. Type these items exactly as shown. Items not enclosed in brackets are required. For example: myfile.c italic computer type.
Notation for Messages About This Manual An ellipsis immediately following a single syntax item indicates that you can repeat that syntax item any number of times. For example: "s-char…" Punctuation. Parentheses, commas, semicolons, and other symbols not previously described must be typed as shown. For example: error := NEXTFILENAME ( file-name ) ; LISTOPENS SU $process-name.
Notation for Messages About This Manual lowercase italic letters. Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets. Brackets enclose items that are sometimes, but not always, displayed. For example: Event number = number [ Subject = first-subject-value ] A group of items enclosed in brackets is a list of all possible items that can be displayed, of which one or none might actually be displayed.
1 SQL/MP Programming Manual for COBOL This section describes changes to the SQL/MP Programming Manual for COBOL for TNS/E systems and includes updates to existing TNS and TNS/R content: • • • • • • • • Related Manuals on page 1-2 Program Compilation and Execution on page 1-3 COBOL in the Open System Services (OSS) Environment on page 1-4 Effect on Conformance to ISO/ANSI Standards on page 1-4 Explicit Program Compilation on page 1-5 Program Execution on page 1-59 Operations Performed on an SQL Program Fil
Related Manuals SQL/MP Programming Manual for COBOL Related Manuals The related manuals that an application programmer might find useful are: • • • • NonStop SQL/MP library Program development manuals Guardian system manuals Open System Services (OSS) manuals In addition to the NonStop SQL/MP library, the program development manuals described in Table 1-1 on page 1-2 can be useful to a COBOL programmer. Table 1-1.
SQL/MP Programming Manual for COBOL Program Compilation and Execution Table 1-1. Program Development Manuals (page 2 of 2) Accelerator Manual Describes how to use the Accelerator to optimize TNS object code to improve the performance of TNS HP COBOL programs running on TNS/R systems. Object Code Accelerator (OCA) Manual Describes how to use the OCA to optimize TNS object code to improve the performance of TNS HP COBOL programs running on TNS/E systems.
SQL/MP Programming Manual for COBOL COBOL in the Open System Services (OSS) Environment 6. Execute the SQL program file either interactively from a TACL or OSS prompt or programmatically by using the COBOL CREATEPROCESS or CLU_PROCESS_CREATE_ routine. SQL/MP software supports the development of COBOL programs containing embedded SQL statements in both the Guardian and OSS environments.
SQL/MP Programming Manual for COBOL Explicit Program Compilation Explicit Program Compilation This subsection describes the explicit compilation of an HP COBOL program containing embedded SQL statements and directives in the Guardian, OSS, and PC host environments using TNS, TNS/R, and TNS/E compilation tools.
Compilation Methods SQL/MP Programming Manual for COBOL TNS Mode Compilation A TNS-compiled program uses TNS process and memory architecture and consists of TNS object code (CISC instructions). Compiling an HP COBOL program in TNS mode enables you to execute the program on a TNS system. You can also execute TNS programs on TNS/R and TNS/E systems and boost the execution speed on those systems by generating accelerated object code after compilation.
SQL/MP Programming Manual for COBOL Compilation Methods To compile a COBOL program that contains embedded SQL statements and directives for execution on a TNS (or TNS/R or TNS/E) system: 1. Add any required class MAP or class CATALOG DEFINEs. 2. Run the COBOL85 compiler and specify a source file as input. Your compilation unit must include an SQLCODE variable declaration (either declared explicitly or implicitly with the INCLUDE SQLCA directive).
Compilation Methods SQL/MP Programming Manual for COBOL Native Mode Compilation for TNS/R Systems A native-compiled program for a TNS/R system uses native TNS/R process and memory architecture and consists of native object code (RISC instructions). Compiling an HP COBOL program in native TNS/R mode enables you to execute the program on a TNS/R system only. Figure 1-2 shows the steps you follow to explicitly SQL compile a COBOL program in TNS/R native mode. Figure 1-2.
SQL/MP Programming Manual for COBOL Compilation Methods To compile a COBOL program that contains embedded SQL statements and directives for execution on a TNS/R system: 1. Add any required class MAP or class CATALOG DEFINEs. 2. Run the NMCOBOL compiler and specify a source file as input. Your compilation unit must include an SQLCODE variable declaration (either declared explicitly or implicitly with the INCLUDE SQLCA directive). You must specify the SQL compiler directive on the compiler command line. 3.
Compilation Methods SQL/MP Programming Manual for COBOL Native Mode Compilation for TNS/E Systems A native-compiled program for a TNS/E system uses native TNS/E process and memory architecture and consists of native object code (Itanium instructions). Compiling an HP COBOL program in native TNS/E mode enables you to execute the program on a TNS/E system only. Figure 1-3 shows the steps you follow to explicitly SQL compile a COBOL program in TNS/E native mode. Figure 1-3.
SQL/MP Programming Manual for COBOL Compilation Methods To compile a COBOL program that contains embedded SQL statements and directives for execution on a TNS/E system: 1. Add any required class MAP or class CATALOG DEFINEs. 2. Run the ECOBOL compiler and specify a source file as input. Your compilation unit must include an SQLCODE variable declaration (either declared explicitly or implicitly with the INCLUDE SQLCA directive). You must specify the SQL compiler directive on the compiler command line. 3.
SQL/MP Programming Manual for COBOL Preparing for Compilation Preparing for Compilation Before compiling an embedded SQL/MP program, verify that the source code is ready for compilation and configure the compilation environment.
SQL/MP Programming Manual for COBOL Preparing for Compilation Feature or Option Guidelines and Descriptions SQL statement placement COBOL statements and embedded SQL statements can be on the same line, except that a COBOL statement must follow the SQL statement terminator, cannot precede an SQL statement, and cannot be a COPY or REPLACE statement. Library files Optional. Use the COBOL SOURCE directive to enable the compiler to accept source text from a different EDIT file.
SQL/MP Programming Manual for COBOL Preparing for Compilation SQL Compiler Directive The SQL compiler directive indicates to the HP COBOL compiler that a program contains embedded SQL statements or directives and specifies various options for processing the SQL statements or directives. Use this syntax for the SQL directive: SQL [ sql-option-list | ( sql-option-list )] sql-option-list is: sql-option[, sql-option]...
SQL/MP Programming Manual for COBOL Preparing for Compilation The default is not to write the WHENEVER options. RELEASE1 or RELEASE2 specifies the version of the SQL/MP features in the program (including the SQL data structures) and the version of SQL/MP software on which the program file can run as follows: RELEASE1 specifies version 1 features. A program that uses the RELEASE1 option is compatible with SQL/MP version 1, 2, or 300 (or later) software.
SQL/MP Programming Manual for COBOL Preparing for Compilation Setting DEFINEs You can use DEFINE names in an SQL program to specify the names of SQL catalogs and objects (tables, views, indexes, partitions, and collations). You must set all DEFINE names used in SQL statements before SQL load time (the time when an SQL program executes its first statement) unless your program uses execution-time name resolution.
SQL/MP Programming Manual for COBOL • Preparing for Compilation When you run the SQL compiler, you can specify a CLASS SPOOL DEFINE for the OUT file and a class CATALOG DEFINE for the catalog option. If you use these DEFINEs, add them before you enter the SQLCOMP command: 30> ADD DEFINE =persnl, CLASS CATALOG, SUBVOL persnl 31> ADD DEFINE =sqlist, CLASS SPOOL, LOC $S.
Preparing for Compilation SQL/MP Programming Manual for COBOL add_define commands create a class MAP DEFINE and a class CATALOG DEFINE: add_define =emptab class=map file=\\ny.\$disk2.fy94.empfile add_define =sqlcat class=catalog subvol=\$sql.sqlcat • • Use seven characters or fewer for system names or the names of volumes where OSS objects reside. To alter an existing DEFINE, use the add_define utility and specify all DEFINE attributes and their new values.
Running the HP COBOL Compilers SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers The type of HP COBOL compiler that you can use to compile an embedded SQL/MP program depends on your operating environment and platform. Table 1-2 lists the HP COBOL compilers, their compilation modes, and the environments in which you can run the compilers. Table 1-2.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers Before compiling an embedded SQL/MP program, verify that the source code is ready for compilation and configure the compilation environment. For more information, see Preparing for Compilation on page 1-12.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers To compile an embedded SQL program, you must specify the SQL directive, which tells the compiler to expect SQL statements in the compilation unit. If you do not specify the SQL directive before the first Identification Division in the source program, you must specify it on the compiler command line.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers Running the NMCOBOL Compiler in the Guardian Environment To run the NMCOBOL compiler in the Guardian environment, enter the NMCOBOL command at the TACL prompt or from a TACL OBEY command file using this syntax: NMCOBOL /IN source-file [, OUT [list-file]][, run-option].../ [ target-file ] [, copy-library ] [; compiler-directive ] ... For more information about the syntax, see the COBOL Manual for TNS and TNS/R Programs. Note.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers If you do not specify the RUNNABLE directive when compiling the source program, you must invoke the linker directly to link the object files. For more information, see The nld or ld Utility on page 1-34. Note. Run the linker before SQL compiling the program. Lastly, you must run the SQL compiler to generate SQL object code in the program file. For more information, see Running the SQL Compiler in the Guardian Environment on page 1-39.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers If you do not specify the RUNNABLE directive when compiling the source program, you must invoke the linker directly to link the object files. For more information, see The eld Utility on page 1-35. Note. Run the linker before SQL compiling the program. Lastly, you must run the SQL compiler to generate SQL object code in the program file. For more information, see Running the SQL Compiler in the Guardian Environment on page 1-39.
Running the HP COBOL Compilers SQL/MP Programming Manual for COBOL Table 1-4.
Running the HP COBOL Compilers SQL/MP Programming Manual for COBOL Running the cobol Utility in the OSS Environment The OSS utility cobol generates COBOL programs that run in the OSS environment of TNS or TNS/R systems. The cobol utility invokes the HP COBOL compiler, COBOL85, optionally followed by the Binder, Accelerator, and SQL compiler. The flags and the types of files in the operands determine which processes operate on the files in the operands. Note.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers COBOL85 compiler to expect embedded SQL in the source file. The SQL directive is required either in the source code or on the compiler command line. For more information, see the SQL Compiler Directive on page 1-14. ° The -Wsql flag directs the cobol utility to invoke the SQL/MP compiler (SQLCOMP), passing the specified arguments to the SQL/MP compiler. In this case, a catalog, $vol.subvol, is passed to the SQL/MP compiler. Note.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers Running the nmcobol Utility in the OSS Environment The OSS utility nmcobol generates native COBOL programs that run in the OSS environment of TNS/R systems. The nmcobol utility invokes the native HP COBOL compiler, NMCOBOL, optionally followed by the linker and SQL compiler. The flags and the types of files in the operands determine which processes operate on the files in the operands.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers the SQL Compiler Directive on page 1-14. The -Wsql flag also invokes the -Wsqlcomp flag if you do not specify it on the command line. Note. Do not use the -Wsql and -s flags in the same invocation of the nmcobol utility. The -s option strips symbols information from the object file. The SQL compiler requires the symbols region to be present for SQL compilation to succeed.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers Running the ecobol Utility in the OSS Environment The OSS utility ecobol generates native COBOL programs that run in the OSS environment of TNS/E systems. The ecobol utility invokes the native HP COBOL compiler, ECOBOL, optionally followed by the linker and SQL compiler. The flags and the types of files in the operands determine which processes operate on the files in the operands.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers the SQL Compiler Directive on page 1-14. The -Wsql flag also invokes the -Wsqlcomp flag if you do not specify it on the command line. Note. Do not use the -Wsql and -s flags in the same invocation of the ecobol utility. The -s option strips symbols information from the object file. The SQL compiler requires the symbols region to be present for SQL compilation to succeed.
SQL/MP Programming Manual for COBOL Running the HP COBOL Compilers Running the Native COBOL Cross Compilers in a PC Host Environment By using these tools, you can use native COBOL cross compilers to build embedded SQL/MP applications on a PC: • • • HP Enterprise Toolkit—NonStop Edition (ETK), which provides a graphical user interface (GUI) Command-line interface in Windows Tandem Development Suite (TDS) on D-series systems After building applications on a PC, you transfer them to the Guardian or OSS en
SQL/MP Programming Manual for COBOL Binding and Linking Binding and Linking Binding TNS object files or linking native object files involves validating and resolving references to other programs or routines and collecting and modifying code and data blocks from one or more object files to produce a single object file. The Binder or linker is a tool that you can use to read, link, modify, and build executable object files.
SQL/MP Programming Manual for COBOL Binding and Linking @BUILD progfile @EXIT Caution. The Binder STRIP command without the SYMBOLS or AXCEL option removes the Binder table from an object file. Without the Binder table, the SQL compiler cannot compile the program file, and the SQL executor cannot execute it. For more information about the Binder program, see the Binder Manual. For more information about binding HP COBOL programs, see the COBOL Manual for TNS and TNS/R Programs.
SQL/MP Programming Manual for COBOL Binding and Linking The eld Utility The process of linking by the eld utility applies only to native TNS/E objects created by the ECOBOL compiler (or by the ecobol utility in the OSS environment). If you specify the RUNNABLE directive when compiling a source program in the Guardian environment, the ECOBOL compiler uses the eld utility to validate and resolve internal and external references and produce an executable object file.
Acceleration of TNS HP COBOL Programs SQL/MP Programming Manual for COBOL Acceleration of TNS HP COBOL Programs The process of acceleration applies only to object files created in TNS mode by the COBOL85 compiler (or by the cobol utility in the OSS environment of a TNS/R system). Native-compiled programs cannot be accelerated. Accelerated object code improves the execution speed of TNS programs on TNS/R and TNS/E systems.
SQL/MP Programming Manual for COBOL Acceleration of TNS HP COBOL Programs The Accelerator The Accelerator enables you to optimize TNS programs to run faster on TNS/R systems. A TNS object file that has been accelerated for a TNS/R system has the original TNS code plus the logically equivalent optimized RISC instructions.
SQL/MP Programming Manual for COBOL Running the SQL Compiler Running the SQL Compiler The SQL compiler (SQLCOMP) generates SQL object code in the program file. SQLCOMP verifies SQL objects used in SQL statements and generates an optimized execution plan for each SQL statement. Optionally, you can invoke the EXPLAIN utility during compilation to generate a report on the execution plans for SQL DML statements and DEFINEs used by the program. Caution.
Running the SQL Compiler SQL/MP Programming Manual for COBOL For example, if a program refers to a collation, SQLCOMP generates a row in the USAGES table showing that the program depends on the collation and sets USAGES.USEDOBJTYPE to CP. • • Generates a listing of the SQL statements in the program file, including warning or error messages that occur. Sets the SQL SENSITIVE and SQL VALID flags in the program file label if the compilation is successful.
SQL/MP Programming Manual for COBOL Running the SQL Compiler object-file is a Guardian disk file name. This file cannot be part of a user library, a system library, or a DLL. The object file can be generated by these programs: • • • • HP COBOL compiler Binder program or linker Accelerator or OCA SQL compiler You must run the SQL compiler on the same system where object-file exists. If you do not specify a system or volume name, the SQL compiler uses current default values.
SQL/MP Programming Manual for COBOL Running the SQL Compiler SQL Compiler Options CATALOG catalog-name is the name of the catalog to hold a description of the program. catalog-name is a subvolume name. If you partially qualify the catalog name, the system expands the name by using your current default values. The SQL compiler, the object file, and the catalog must reside on the same system. You can also specify a CLASS catalog DEFINE name for catalog-name.
SQL/MP Programming Manual for COBOL Running the SQL Compiler file-name is the destination to which the DEFINE listing is written in addition to the compiler listing. See list-file for a description. OBEYFORM directs the SQL compiler to write the DEFINE listing in an OBEY command-file format so that you can use an OBEY command to set the DEFINEs. If you omit OBEYFORM, the SQL compiler uses the format displayed by the TACL INFO DEFINE command.
SQL/MP Programming Manual for COBOL Running the SQL Compiler RECOMPILE directs the SQL executor to automatically recompile a program whenever any of these conditions occur: • • • • The program file is SQL invalid. The DEFINEs used at SQL load time are different from the DEFINEs used during explicit SQL compilation. The timestamp check fails for an SQL object in an SQL statement. An access path (index) is unavailable. RECOMPILE is the default.
SQL/MP Programming Manual for COBOL Running the SQL Compiler ON directs the SQL compiler to register a program in the specified catalog without compiling the SQL statements in the program or creating a new program file. The SQL compiler marks the program’s file label as SQL sensitive and SQL valid. The program retains its existing execution plans. If the program was not previously SQL compiled, the operation fails with SQL error 2115.
SQL/MP Programming Manual for COBOL Running the SQL Compiler If you specify the CHECK INVALID PLANS or CHECK INOPERABLE PLANS option (which stores similarity information in the program file), the SQL compiler sets the program’s PFV and PCV to 310 (or later). To support these options, an SQL catalog must have a catalog version of 310 (or later).
SQL/MP Programming Manual for COBOL Running the SQL Compiler If the similarity check fails, the SQL executor considers the plan to be inoperable. The SQL executor then recompiles (in memory only) the SQL statement that generated the inoperable plan (if NORECOMPILE is not specified) and executes the recompiled statement.
SQL/MP Programming Manual for COBOL • Running the SQL Compiler Uncompiled SQL statements with empty sections. The SQL compiler generates an empty section if an SQL statement references a nonexistent DEFINE or SQL object. Other SQL statements retain their existing execution plans. The COMPILE INVALID PLANS option stores similarity information in the program file and updates the program’s dependencies on database objects in the USAGES tables.
SQL/MP Programming Manual for COBOL Running the SQL Compiler Using Current Statistics For the SQL compiler to generate the best execution plan, it must have current statistics for the referenced tables. SQL/MP does not automatically update these statistics. A program must execute the UPDATE STATISTICS statement to generate current statistics in a catalog.
SQL/MP Programming Manual for COBOL Running the SQL Compiler Dynamic SQL statements are not compiled during explicit SQL compilation. Errors in these statements are returned at run time after dynamic compilation by a PREPARE or EXECUTE IMMEDIATE statement. Warning Conditions A warning condition usually occurs when the SQL compiler has insufficient information available.
Running the SQL Compiler SQL/MP Programming Manual for COBOL SQL Program File Format The input program file to the SQL compiler can be a COBOL object file, a file generated by the Binder program (TNS programs) or linker (native programs), a file generated by the Accelerator or the OCA (TNS programs only), or a file previously compiled by the SQL compiler. Figure 1-5 shows the format of an SQL program file. For an SQL program file that has accelerated object code, see Figure 1-4 on page 1-36. Figure 1-5.
Running the SQL Compiler SQL/MP Programming Manual for COBOL SQL Compiler Listings The SQL compiler writes all SQL statements in the program file to the listing (or OUT) file. If an error or warning occurs, the compiler includes a message after the statement that caused the problem. For DML statements, the compiler also includes the estimated cost of processing the statement, which is a positive integer indicating the relative cost.
Running the SQL Compiler SQL/MP Programming Manual for COBOL Example 1-1. Sample SQL Compiler Listing of a COBOL Program (page 2 of 2) SQL - SLT Index 121 = 4, Run-Unit = NEWPART COMMIT WORK SQL - SLT Index = 5, Run-Unit = NEWPART 137 ROLLBACK WORK BINDER - OBJECT FILE BINDER - T9621D30 - (17JUL95) Copyright Tandem Computers Incorporated 1982-1995 SYSTEM \NEWYORK Object file \NEWYORK.$SQL.SQLPGMS.
SQL/MP Programming Manual for COBOL Running the SQL Compiler current default catalog. The SQL compiler uses the current set of DEFINEs and writes the output to the spooler location $S.#EXPLAIN: SQLCOMP / IN SQLPROG, OUT $S.#EXPLAIN / CATALOG $DISK2.
SQL/MP Programming Manual for COBOL FILE ... Using CONTROL Directives guardian-name ... In the next example, the SQL compiler writes an execution plan and DEFINEs to the spooler location $S.#EXPLAIN. The OBEYFORM option directs the compiler to write the DEFINEs in OBEY command file format to the file named SETDEFS for subsequent execution. The catalog name is not included in the SQLCOMP command because it is stored in the program file.
SQL/MP Programming Manual for COBOL Using CONTROL Directives Static SQL Statements Follow these guidelines when you use CONTROL directives with static SQL statements: • A CONTROL directive affects subsequent static DML statements in listing order, regardless of the execution order, until either of these conditions occur: ° ° Another CONTROL directive resets the CONTROL options. The program encounters the end of the run-time data unit (RTDU) that contains the CONTROL directive.
SQL/MP Programming Manual for COBOL Using CONTROL Directives This example varies the wait time for cursors that access the PARTS table. The default wait time (60 seconds) applies only to the first cursor (CURSOR1): PROCEDURE DIVISION. ... 200-DEFAULT-WAIT. EXEC SQL DECLARE CURSOR CURSOR1 FOR SELECT PARTNUM, PARTDESC, PRICE FROM SALES.PARTS WHERE (PARTNUM > :MIN-PARTNUM AND PARTNUM < :MAX-PARTNUM) ORDER BY PARTNUM END-EXEC. ... ... 500-SHORT-WAIT. EXEC SQL CONTROL TABLE SALES.PARTS TIMEOUT .
Using Compatible Components SQL/MP Programming Manual for COBOL Using Compatible Components Before you compile an SQL program file, you might need to determine the versions of the HP COBOL compiler, SQL compiler (SQLCOMP), and all SQL program files to ensure that all components and files are compatible. HP COBOL Compiler The host SQL version (HSV) identifies the SQL version of the HP COBOL compiler.
SQL/MP Programming Manual for COBOL Using Compatible Components This subsection describes the HOSV and its relationship to the HP COBOL compiler and SQL compiler. For more information about the PFV and PCV, see the SQL/MP Version Management Guide. The HP COBOL compiler generates the HOSV and stores the value in the object file. If multiple object files are bound together in a single target object file, the HOSV of the target object file is the newest (maximum) HOSV of the individual object files.
SQL/MP Programming Manual for COBOL Program Execution Program Execution You can execute a COBOL program containing embedded SQL statements in the Guardian or OSS environment of a TNS/E system.
SQL/MP Programming Manual for COBOL Operations Performed on an SQL Program File Operations Performed on an SQL Program File In Section 8, “Program Invalidation and Automatic Recompilation,” of the SQL/MP Programming Manual for COBOL, these bulleted items should refer to the native mode linkers and the OCA: • • Binding or linking a program file.
2 DataLoader/MX Reference Manual No user interface changes are needed for DataLoader/MX except for the names of compilers. Section 5 of the DataLoader/MX Reference Manual states: You can set the environment variable DL_COMP_OPTION to specify options that need to be passed to the c89 or nmcobol language compiler during source compilation. For example: $ export DL_COMP_OPTION="-Wsql=CHAR_AS_ARRAY" In the H-series RVUs, the native C compiler for OSS is c89 (generating TNS/E).
DataLoader/MX Reference Manual HP NonStop SQL Supplement for H-Series RVUs —529446-005 2 -2
Index A Binder program ADD command 1-33 BIND command 1-33 BUILD command 1-34 guidelines 1-33 OSS environment 1-27 SELECT command 1-33 SQL program file format 1-50 STRIP command 1-34 BUILD command, Binder program 1-34 COBOL compiler directives SOURCE 1-15 SQL 1-14 COBOL COPY statement 1-15 COBOL routines CLU_PROCESS_CREATE_ 1-4, 1-59 CREATEPROCESS 1-4 COBOL source code, copying into compilation unit 1-15 cobol utility, OSS environment DEFINEs 1-17 flag description 1-26 syntax 1-26 COBOL85 compiler Guardian
E Index DEFINEs TACL See TACL, DEFINES class CATALOG 1-3, 1-16 class MAP 1-3, 1-16 guidelines 1-16 SQL compiler options 1-41 =_DEFAULTS 1-53 DEFINES option EXPLAIN utility 1-41 DEFMODE attribute 1-17 DML statements effect of CONTROL directives 1-55 EXPLAIN PLAN report 1-52 E ECOBOL compiler Guardian environment 1-23 OSS environment 1-30 syntax 1-23 ecobol utility, OSS environment DEFINEs 1-17 flag description 1-30 syntax 1-30 eld utility guidelines 1-35 OSS environment 1-31 -strip option 1-35 Embedded SQ
N Index N P Native mode compilation 1-8, 1-10 Native objects 1-34, 1-35 nld utility guidelines 1-34 OSS environment 1-29 -strip option 1-34 NMCOBOL compiler Guardian environment 1-22 OSS environment 1-28 syntax 1-22 nmcobol utility, OSS environment DEFINEs 1-17 flag description 1-28 syntax 1-28 PCV See Program catalog version PFV See Program format version Program catalog version (PCV) HP COBOL compiler Program format version (PFV) SQL compiler O OBEY file format, EXPLAIN report 1-53 Object code accel
T Index SQL compiler (SQLCOMP) FORCE option 1-48 SQL program, file format 1-50 SQL statements dynamic, use of CONTROL directives 1-56 static, use of CONTROL directives 1-55 SQL table, updating statistics 1-48 SQLCOMP command syntax 1-39 SQL, COBOL compiler directive 1-14 SQL/MP statements UPDATE STATISTICS current statistics 1-48 Statistics SQL compilation 1-48 UPDATE STATISTICS statement 1-48 STOREDDEFINES option, SQLCOMP command 1-17 STRIP command, Binder 1-34 V Variable, environment See Environment va