MBF-UDALink User Reference Manual for Unix September 2004 Version 7.04.02 Head Office: 82 Main Street South Chesterville, Ontario K0C 1H0 Canada Telephone:1-800-ANSWERS or (613) 448-2333 Fax: (613) 448-2588 www.mbfoster.com www.1800answers.com NOTICE The information in this manual is subject to change without notice. LIMITATIONS ON WARRANTIES AND LIABILITY M.B. Foster Associates Limited makes no warranties, either express or implied, regarding this manual or the computer software package described in this manual, its merchantability or its fitness for any particular purpose. The exclusion of implied warranties is not permitted by some states. COPYRIGHT This manual is copyrighted by M.B. Foster Associates Limited, with all rights reserved. Under the copyright laws, this manual may not be copied, in whole or part, without the written consent of M.B. Foster Associates Limited. Under the law, copying includes translating to another language. PRODUCT REVISIONS M.B. Foster Associates Limited cannot guarantee that you will receive notice of a revision to the software described in this manual. You should periodically check with your sales representative. Version C.07.04.02 - September 2004 MBF-UDALink and MBF-Console are trademarks of M.B. Foster Associates Limited. All other trademarks and registered trademarks are marks of their respective holders. Simultaneously published in the Canada and the United States of America. All rights reserved. MBF-UDALink Table of Contents Introduction to MB Foster Products MBF-UDALink Overview- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 Applications- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 Benefits- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 MBF-UDALink Features - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 Input Specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 Computational Expressions- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 Online help - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 Customizable system profile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 JDBC Level 2 Driver- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 ODBC 3.5 Compliant Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 Views - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 Profiles - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 Secure Socket Layer (SSL)- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 Remote procedure calls - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 COM Component Builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 Two-phase Commit Protocol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 ReportDesigner for Reporter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -11 SQL interface for Reporter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -11 PowerHouse interface for MPE-IX Reporter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -11 Complementary products - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12 MBF-Console - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12 MBF-UDACentral - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12 MBF-Enterprise - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12 Reveal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12 Using Reporter What is the Reporter? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -13 Menus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -14 The parts of a menu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -14 The types of menus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -15 Menu Type 1 - Navigational - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -15 Menu Type 2 - Selection - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -15 Menu Type 3 - Specify - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -16 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 i MBF-UDALink Prompts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -17 Function keys - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -18 Configuration Menu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -19 Menu characteristics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -20 Procedure execution parameters- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -22 Display format parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -24 Output file characteristics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -25 PC interchange parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 Navigational commands - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -27 Reviewing reports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -28 Online help - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -29 Main Menu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -30 DISPLAY Procedure Catalog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -32 Procedure Catalog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -33 RUN an existing procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -35 Use SQL database definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -36 Runtime decision on output file format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -37 Specifying passwords- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -38 Downloading the output file- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -39 Saving the output file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -41 Creating a procedure Creating a Procedure Overview- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -43 Basic steps for procedures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -44 Creating a procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -46 Creating procedures from Eloquence- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -59 Linking from <file> to <file> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -69 Procedure Preparation Phase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -71 Specify the output file format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -73 Creating a special output format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -73 The SQL interface SQL Interface Overview - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -75 Creating a procedure with an SQL interface - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -75 The Allbase SQL interface - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -76 An SQL example - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -77 ii MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink FDGEN Creating FILE definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -81 ENTER your own file definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -81 Saving the file definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -84 Use File Definition (FD) file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -84 Tables in data base <name> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -85 Columns in <type of file> <name> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -85 Define output specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -86 Adding files for selection - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -87 Editing field definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -87 Maintaining and modifying procedures MAINTAIN an existing procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -88 REVIEW procedure definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -89 MODIFY procedure definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -92 Selecting what to modify- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -93 EDIT names and attributes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -94 Data Base Environment, userid and password - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -95 Table/Set names - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -95 FIELD names and definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -96 CHANGE procedure specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -98 ADD additional computational fields- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -99 CHANGE output file specifications- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -102 CHANGE output file format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -103 Saving a modified procedure- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -103 SAVE the procedure- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -104 DELETE an existing procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -105 Computational expressions Types of computationals- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -107 Substring and subfield manipulation- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -110 Conditional expressions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -111 Creating computational fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -112 Special features for computationals - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -115 Entry of value at runtime - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -115 Entry of a value from a file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -115 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 iii MBF-UDALink Convert dollar values to words - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -116 The ReportDesigner option Report Designer Overview - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -117 Designing a report - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -118 Entering Designer mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -119 Entering global format specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -122 Layout- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -123 Insert Text - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -124 Suppress or Show - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -125 Heading Justify - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -126 Field Spacing- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -126 Line Spacing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -126 Prompt Mode- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -126 Formatting individual fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -130 Move Field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -132 Align Field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -132 Adjust Field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -133 Insert Text - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -133 Field Justify - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -134 Heading Justify - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -134 Sort Edit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -134 Group Edit- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -134 Prompt Mode- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -135 Editing concepts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -138 Justification - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -138 Edit masks - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -140 Display formats - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -143 Page parts and multiple line formats - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -145 Sample page part format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -146 Default multiple-line format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -147 Creating group headers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -149 Common keys - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -151 Field edit keys - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -151 Report design without function keys- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -153 The JDBC1 driver iv MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink What is the JDBC1 driver? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -155 What is JDBC? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -155 Basic JDBC driver architecture - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -155 JDBC1 Installation and Setup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -157 Java Requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -157 Setup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -157 Using the JDBC1 driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -158 Preparing to compile and run Java- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -158 Checking the environment variables - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -158 Importing packages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -158 Loading the JDBC1 driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -159 Opening a JDBC1 Connection- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -159 Creating a Statement object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -159 Executing a query and returning a Result Set object - - - - - - - - - - - - - - - - - - - - - - - -160 Processing the Result Set- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -160 Closing the Result Set - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -160 Closing the Connection- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -161 Connection Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -161 Optional Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -161 URL Syntax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -162 JDBC1 Samples - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -163 JDBCLink-UX What is JDBCLink-UX? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -167 What is JDBC? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -167 Basic Driver Architecture - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -167 J2EE Background - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -168 JDBCLink-UX Installation and Setup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -172 Java Requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -172 Setup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -172 Connection Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -173 Optional Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -173 URL Syntax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -174 Using JDBCLink-UX- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -175 Loading JDBCLink-UX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -176 JDBCLink-UX Functionality- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -179 Connecting Through Data Sources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -179 Importing Packages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -179 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 v MBF-UDALink Calling a Data Source in an Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -180 Using Connection Pooling- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -181 Data source properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -182 Using SSL mode connections - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -183 Setting a com.mbf.jdbc.ssl Property - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -185 JDBCLink-UX Examples- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -187 Transaction Support in JDBCLink-UX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -191 Handling Transactions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -191 How XA Transaction Control Works - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -191 Tech Tips - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -192 Interface Support - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -194 Example of an XA transaction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -197 The ODBC driver ODBC Driver Overview- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -201 ODBC compliancy level - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -201 Client environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -202 Server environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -202 The connecting link - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -202 ODBC driver requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 Supported ODBC functions- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -205 Performance considerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -209 Using stored procedures- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -210 Turning AutoCommit on/off - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -210 Supported data types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -211 Notes on data types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -212 Notes on ODBC data types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -212 Determining the data type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -212 Notes on using BLOBs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -213 Isolation levels- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -214 ODBC Translator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -215 Select Translator Window - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -215 Extended features of the ODBC driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 Character set conversion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 Primary key name returned by SQLStatistics - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 Updating search and sort items in Eloquence Details - - - - - - - - - - - - - - - - - - - - - - -216 Date support and Year 2000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 Eloquence character fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 vi MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Eloquence subfielded fields- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Eloquence locking strategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Automatic masters in Eloquence not reported - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Viewing the access path of an Eloquence query - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Detection of keys on ALLBASE/SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Unsupported data types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Sending a file to the host - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -218 Reading or writing ALLBASE/SQL LongVarBinary items - - - - - - - - - - - - - - - - - - - - -218 Maximum number of statements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -218 Multiple serial connections - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -219 New SQLGetInfo types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -219 SQLGetDataCol- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 SQLPutData - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 SQLSetCursorName - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 Substitution parameter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 SQLForeignKey - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 SQLTablePrivileges - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 SQLColumnPrivileges - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -221 SQLProcedure- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -221 SQLProcedureColumns - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -221 ALLBASE/SQL restrictions on ODBC grammar- - - - - - - - - - - - - - - - - - - - - - - - - - - -221 ANSI character set - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -222 Unsupported ALLBASE/SQL statements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -223 ALLBASE/SQL statements that work with embedded SQL- - - - - - - - - - - - - - - - - - - -224 ALLBASE/SQL statements replaced by client functions - - - - - - - - - - - - - - - - - - - - - -224 Creating a DBEnvironment on the HP 9000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -225 Supported SQL syntax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 Eloquence - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 Fully supported SQL- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 Partially supported SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 Unsupported SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -227 Special supported features - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -227 Requirements for joins - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -228 Numeric and character expressions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -228 User-defined conversion functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -228 ODBC driver client configuration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -231 Data sources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -231 Using the native communication driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -236 Using ODBC driver with ODBC applications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -241 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 vii MBF-UDALink Data access - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -241 Updating data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -241 Sample ODBC application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -242 Visual Basic sample - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -246 VB TestServices.DLL project sample for MTS- - - - - - - - - - - - - - - - - - - - - - - - - - - - -250 Working with Third-Party Products Using Cognos Impromptu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -253 Special notes for users of Impromptu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -254 Changing the display format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -254 Creating joins using calculated columns - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -255 Using Lotus Approach - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -256 Using Microsoft Access - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -258 Using MS Query - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -261 Using Visual Basic (4.0 or higher) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -263 VB database controls - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -263 Dynaset variables - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -263 Calling ODBC functions directly- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -264 Calling ODBC functions programmatically - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -264 Connection examples- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -265 Connect using SQL API - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -265 Connect using SQL API in VB 4.0-6.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -265 Connecting with DAOs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -269 Connecting with RDOs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -270 Connecting with ADOs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -271 Using FDGEN dictionaries with the Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -272 Two-Phase Commit ODBC driver and distributed transactions- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -273 Two-Phase Commit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -276 The Microsoft Distributed Transaction Coordinator - - - - - - - - - - - - - - - - - - - - - - - - -276 Application model using the MS-DTC- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -277 Appropriateness of distributed transactions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -283 Transaction commit and abort - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -283 Limitations of the MS-DTC-compliant ODBC Driver - - - - - - - - - - - - - - - - - - - - - - - - -284 Remote procedure calls viii MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink RPC Overview- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -287 RPC Windows environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -288 UDALink3.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -288 RPC server pool - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -289 Configuration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -289 Pool expansion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -290 Pool contraction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -290 The COM Component Builder Com Component Overview - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -292 Running the COM Component Builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -294 Main Window- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -294 Naming requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -295 Parameter definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -295 Structure Maker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -296 Add New Method - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -297 Installing COM Component Builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -298 Supported Data Types Data types supported by Reporter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -301 Field storage length - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -303 Edit masks - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -304 Date formatting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -305 Built-in functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -305 Data types supported by ODBC driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -307 Notes on data types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -308 Notes on ODBC data types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -308 Determining data types- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -308 Notes on using BLOBs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -308 Error messages Common errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -311 User errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -311 System errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -330 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 ix MBF-UDALink Trap errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -355 Warning messages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -360 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 x MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 xi MBF-UDALink xii MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink MBF-UDALink Overview Introduction to MB Foster Products MBF-UDALink Overview MB Foster provides data access and delivery solutions for the HP e3000, HP 9000, Linux, Sun Solaris, Windows NT, Windows 2000 and Windows XP platforms. MBF-UDALink provides users with access to their data by extracting it from multiple files and/or data bases, updating values as required or instructed and reformatting for reports, for import into desktop applications, or direct update of spreadsheets or other desktop decision support tools via ODBC or JDBC. Applications Used extensively throughout the Manufacturing, HMO, Fortune 100 and government communities, MBF-UDALink is used to: • Provide Real-time Access To Data, allowing IT departments to write the framework of reports and let end users run them as required without submitting a project request to IT. • Populate web pages - Using the ODBC and JDBC driver web projects have been built and successfully deployed. This solution has provided employees with access to information such as claim status and account balances, or allowed suppliers to verify information and payment status. • Create Production Reports - one MB Foster customer estimates that there are 350 reports generated containing information about their operations, all written in MBF-UDALink. The reports cover things like sales commissions, sales order number by domestic and foreign markets, cash disbursements, open items to be returned to vendors and shortage reports for purchasing. • Create Cost Effective Solutions - by delivering a graphical interface to an HP e3000 data base, providing all of the information related to building permits, inspections, inspection schedules and business licenses in a web based client-server environment. • Provide sales reps and regional managers with a business solution to provide timely access to customer/product and commission rates while still maintaining security. This has been a high priority task for MIS departments since the advent of the personal computer. MBF-UDALink met this challenge and now the sales department is able to instantly see MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 1 MBF-UDALink Overview MBF-UDALink current information for order details, customers, products, commission rates and to manipulate the data based on their needs. • Deliver information to decision support systems. MBF-UDALink’s ability to deliver information ready for MS Excel and MS Access has lead to greater use of this solution on all of one customer’s 30+ installed platforms. • Access data in a ManMan database. As most IT staff know this is not an easy task. MBFUDAlink lives up to this task in many installations. In addition to its client-server capabilities, many ManMan sites discover the stellar ad hoc capabilities of MBF-UDALink in their environment. • 2 Provide return on Investment and Reduce cost. Using MBF-UDALink to implement a data mart solutions has enable quick report turn around, elimination of report requests that could not be filled, highlighting of trends not realized before and freeing up IT hardware and personnel resources. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink MBF-UDALink Overview Benefits By providing a solution that fits your existing business environment, MBF-UDALink enables you to: • Reduce operating costs by giving end users a web enabled data access solution • Output formats include: reports, self-describing files including PowerHouse subfiles and extracts in a number of desktop based formats such as XML, PDF, HTML, XLS, and RTF, and e-mail format for easy distribution. • Maintain control of security by restricting access by database, field, field value, extract file size or users. • Create "views" to reduce navigation and provide specific users access to the data required, including linkages and additional security. • Use MS-Windows based application front ends to gain access to your existing data sources through ODBC and JDBC. • Provide web access to internal enterprise data sources • Maintain data integrity and security • Provide privacy and data integrity between two communicating applications using the provided Secure Socket Layer support • Support remote procedures with the Remote Procedure Call and COM Builder features • Guarantee transactional integrity with Two-Phase Commit • Provide access to data from any platform (including servers) using JDBC The flexibility provided with the modular structure of MBF-UDALink helps customers to expand functionality when needs and business demands increase. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 3 MBF-UDALink Features MBF-UDALink MBF-UDALink Features The Reporter provides end-users with access to their data by: • extracting data from multiple files and/or data bases • manipulating it and creating temporary values as required • reformatting it for use in other application programs on PC’s, as an e-mail attachment or in other server based programs • reformatting it for reports, mailing labels and other printed outputs Options may be added to the Reporter to take advantage of other software on the server and perform other tasks • PowerHouse and SQL Interfaces allow you to use existing definitions of you data • ReportDesigner allows you to enhance the format of your printed reports • Views and Profiles allow the System Administrator to customize an end-user environment by building in convenience and security features and by controlling access to system resources. • Omnidex Interface on the HP e3000 only allows you exceptionally fast access to data bases that have been indexed with Omnidex and IMSAM. Access to data on the server is completely under the control of normal operating system security and therefore can be controlled by standard system management practices. 4 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink MBF-UDALink Features Input Specifications Table 1: Input Specifications HP e3000 HP 9000 TurboIMAGE root file Eloquence IMAGE/SQL Oracle KSAM and KSAM SD files bytestream MPE sequential files comma-delimited MPE self-describing (SD) files flat Allbase/SQL user-defined sequential files Suprtool MBF-Subfile PowerHouse PDL and Subfile MBF-Subfile When procedures using multiple sets and files are created, the order in which they are to be retrieved may be specified along with the specific fields to use in linking the files. Definitions of TurboIMAGE data bases can be retrieved directly from the "root" file or defined in a file definition file using the FDGEN utility. Definitions for Eloquence tables are retrieved directly or defined in a file definition file using the FDGEN utility. Definitions for bytestream, comma-delimited, flat, KSAM and MPE files may be entered dynamically or created using the FDGEN utility. Self describing (SD) files have their file definition contained in the file label and can be read directly. Definitions for Allbase and Oracle are retrieved dynamically. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 5 MBF-UDALink Features MBF-UDALink Computational Expressions Computational expressions may be declared to perform arithmetic operations on numeric fields and "string" operations (such as concatenation and extraction) on alphanumeric fields. The result is saved in a computed field, which is added to the list of fields available to the user. Supported operations Table 2: Operations Arithmetic String addition concatenation subtraction concatenation blanks multiplication division giving quotient with removal of extraction division giving remainder exponentiation percent ratio Sorting Fields selected for input may be sorted in ascending or descending sequence by many combination of input or computational fields. If the data is already in the correct order, a pre-sort flag can be set to suppress the sort, while allowing summaries to be taken at changes in the sort value. Summaries When sort fields are specified summaries may be produced on the non-sort fields. A summary record is written each time the value in a sort field changes. If there are alphanumeric fields included in the file, the first or the last value encountered within a control break may be written to the summary record. 6 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink MBF-UDALink Features Detail records may be suppressed in the output file, creating a "summary only" file at the lowest sort level. Built-In and Summary Functions Summary functions such as Average, Minimum, Maximum, Count and Total can be specified at control breaks or at the end of the output file. The summary functions of Percent and Ratio are specified using Computational Expressions. Several date and time functions are also available. Functions can prompt for values at runtime or read them from files set up by other applications. Numeric values can be converted to English text. On the HP e3000 access to system variables such as ACCOUNT, USER, GROUP and SESSION names and the system data are access through built-in functions ($ACCOUNT, $USER, etc.). Selection Criteria Input data may be limited to only what is needed by specifying fields for selection. The selection criteria for a field may be embedded in the procedure and can be "fixed" by the creator of the procedure, or prompted for each time the procedure is run. Complex ranges and "wild card" characters may be entered in response to this prompt. The prompt a user receives at run time may be defined when the procedure is created so the user is presented with a more meaningful and complete message than the internal name used in programming to identify a data item. Online help Online help can be requested by entering either a single question mark (for a short help message) or a double question mark (for a longer help message). Help is context-sensitive. Novice users can turn on an automatic display of the short help message for every prompt, to run in tutorial mode. Customizable system profile Customizable features include: • the terminal emulation mode to be used • when using Reflection terminal emulator, defining the default PC drive and subdirectory • printer display width and depth MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 7 MBF-UDALink Features MBF-UDALink • the maximum number of input records to be read • the maximum number of output records to be written • customized on a user by user basis when the Profiles option is installed JDBC Level 2 Driver Features include: • JNDI - Java Naming Directory Interface support • Secure Socket Layer (SSL) through JSSE - Java Secure Socket Extensions • Java Beans and Enterprise Java Beans (EJB) support • Connection Pooling • Distributed Transactions - two phase commit - through XA • Batch updates • Enhanced Result Set ODBC 3.5 Compliant Driver Our ODBC driver is a thin client. It allows the processing of data to take place on the server before moving the results to the client. It goes beyond the definition of the ODBC standard by providing access to user-defined sequential files, flat files, KSAM, MPE, PowerHouse PDL and sub-files, TurboIMAGE, TPI keys and MBF Views. Connection via winsock, internet and even dial-up (serial) are supported. Views Information systems staff can establish "views" of complex data structures so that end-users need not know about physical files and complex computed fields. Security rules that restrict users to certain field values can be built into "views" and data extraction specifications. A View is a list of data fields that can be accessed by end users and information systems personnel as the sources of field definitions in Reporter procedures or by the ODBC driver. The procedure is typically created by the information systems personnel and includes all the data base, data set/table and field information as well as computational fields and multi-file linkages. 8 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink MBF-UDALink Features The users of a View see only the menu of data fields that can be selected, sorted, downloaded to a desktop, saved on the server or listed on a printer. Views are an optional purchase. Profiles User Profiles can be created to • optimize the use of available resources • establish additional security levels for end users. • specify user capabilities that meet their needs, preferences, and data access privileges • configure the Reporter to stream reports • assigned default user parameters based on the current system-wide parameter settings, or parameters from another user profile • attach user files to a user class Profiles can be based on user name or custom names defined by the System Administrator. Profiles is an optional package. Secure Socket Layer (SSL) The SSL implementation in MBF-UDALink provides privacy and data integrity between two communicating applications. The SSL Protocol can negotiate an encryption algorithm and session key and authenticate a server before the application protocol transmits or receives its first byte of data. All of the application protocol data is transmitted encrypted, ensuring privacy. The advantage of SSL is that it is application protocol-independent. A certificate (using X.509) is originated by an issuer, usually a Certification Authority (CA). When a certificate is issued, it confirms something, the subject of which depends on the CA’s purpose. CAs for secure web servers, such as those used for shopping malls, usually only attest that the given public key belongs to the given domain name. Company-wide CAs might attest that you are an employee of the company, and that you have permissions to use a server or other corporate resources. The certificate is a block of data signed by the certificate issuer. The relevant fields are: • Unique identifier (name) of the certificate issuer MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 9 MBF-UDALink Features MBF-UDALink • Time range during which the certificate is valid • Unique identifier (name) of the certified subject • Public key of the certified subject • The issuer’s signature certifying all of the above For a certificate to be verified, the verifier must have a table of the names and public keys of trusted CAs. For simplicity, these tables are lists of certificates issued by the respective CAs for internal use (self-signed certificates). Remote procedure calls The RPC mechanism allows procedures on MPE, Unix and Linux platforms to be accessed by Windows platforms using COM components. The RPC mechanism supports transactional remote procedures, if they operate on an Allbase DBE. The driver can connect to a default Allbase DBE as specified by the environment variable. If this parameter is set, the RPC server connects to the DBE when it is started. RPC is an optional purchase. COM Component Builder A Component is the software implementation of business logic. It allows for the rapid deployment of solutions by re-using existing code. The COM Component Builder is a utility used to generate COM Components for calling remote procedures through the ODBC driver. This type of COM Component supports MFC, MTS, Visual Basic Script and Java Script and many others. The COM Component Builder increases the RPC functionality by making it more automated and easier to use. It creates a Typelib file that will describe the remote procedure. It also creates an OLE object that allows applications developers to easily access the Procedure. The object(s) will in turn call the RPC Functions in the ODBC driver. The COM Component Builder is purchased as part of the Remote Procedure Call option. Two-phase Commit Protocol Available with both ODBC and JDBC the two phase commit feature permits updating of multiple XA compliant data base, such as Allbase, simultaneously while guaranteeing the transaction ACID properties. Facilities such as logging and locking are examples of features provided by resource managers to guarantee the ACID properties. The process is relatively straightforward when only one resource manager is involved. When more than one resource manager is involved, guaranteeing the ACID properties is more complex and requires an additional protocol - the Two-phase Commit Protocol. 10 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink MBF-UDALink Features In the absence of a transaction manager, the application program must implement the Two-phase Commit Protocol within itself. ReportDesigner for Reporter The end user can customize report listing formats with an interactive design facility that shows design changes immediately. Separate formats can be defined for viewing on the screen and reporting on a printer. The report format can be a formatted subset of an extract file. SQL interface for Reporter The SQL interface is provided by default on the HP 9000 and by additional purchase on the HP e3000. This option allows end users to use Oracle SQL database environments as the data source. PowerHouse interface for MPE-IX Reporter Available as an additional purchase, the PowerHouse Interface provides access via a Qschema (HP e3000 only), and PDL, in addition to providing the ability to read and write PowerHouse sub-files. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 11 Complementary products MBF-UDALink Complementary products MBF-Console MBF-Console is a facility for monitoring and controlling the activities the ODBC driver or ODBCLink/SE. MBF-Console allows you to identify problems and terminate the process without bringing down the listener job or interfering with other users. Monitoring of transactions generated through RPC or Two-Phase-Commit is also a feature of MBF-Console. MBF-UDACentral MBF-UDACentral is a Java-based set of tools for exploring and administering multiple databases from a central application adding to the reporting and exploring capabilities available through MBF-UDALink. It is a useful solution in both planning and executing a migration from the HP 3000 Image and AllBase databases to Oracle, MS SQL and other database formats. MBF-Enterprise MBF-Enterprise is an invaluable tool for enterprise sites that need to integrate data of multiple types into business applications. Using a uniform standards-based interface, MBF-Enterprise runs identically across diverse platforms. End users will find it easier to access corporate data on a variety of platforms without having to understand the underlying complexities. Reveal Reveal is a highly-effective report and document warehouse -- a central repository of reports and documents accessible from standard Internet Web browsers such as Internet Explorer and Netscape. It captures, catalogues, indexes and maintains output from multiple sources -mainframes, midrange and network-based applications. It offers a uniform, universal means of information access and dissemination that can be configured for individuals or groups of users. 12 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink What is the Reporter? Using Reporter What is the Reporter? Reporter runs on Unix, providing end users with access to their data. Various options can be added to take advantage of other software on the Unix server and to perform other tasks: • The SQL interface allows you to use definitions of your data already in place. • The ReportDesigner option allows you to enhance the format of your output data. • The Views and Profiles options allow the System Administrator to customize an end user environment by building in convenience and security features, and by controlling access to system resources. • The ODBC driver implements Microsoft’s Open Database Connectivity (ODBC) Protocol. It enables Microsoft Windows-based applications and tools to access relational (SQL) databases through a Winsock connection. Access to data on the Unix host is completely under the control of normal Unix security and can therefore be controlled by standard system management practices. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 13 Menus MBF-UDALink Menus This section introduces you to the menu-driven user interface used by Reporter. It explains the menus and the prompts. The section also discusses special shortcut commands for navigating between menus and invoking special customizations, as well as how to get online help. The parts of a menu Reporter menus have the following general form: Some parts of a menu are always present, and some are optional. For example: MENU TITLE always appears to let you know where you are. It always tells you what option you selected on the previous menu. ITEM LIST may not appear if you are responding to prompts that require typing an answer rather than selecting from a list. EMULATOR/PROFILE indicates any terminal emulator being used and the profile controlling your session, if Profiles is installed. HELP message is displayed if a novice help level is configured. (It is also displayed beneath a prompt whenever help is specifically requested.) PROMPT always appears. In some cases, a series of prompts follow one another, keeping the same MENU TITLE and ITEM LIST on the screen. If you are using an HP terminal or an HP terminal emulator (PC), these prompt messages scroll underneath the last dashed line that appears on the screen. FUNCTION KEYS appear at the bottom of the screen. 14 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink The types of menus The types of menus The menu-driven interface prompts you for item numbers and occasionally prompts you for longer entries, such as names of databases and selection criteria. Menus take the following general form: Menu Type 1 - Navigational This type of menu is normally navigational. The items in the list are arranged vertically, separated by a blank line. By entering the selection number of an item on the list, you proceed to another menu, with the same title as the option you selected. Each function has a function key. Pressing the function key corresponding to the menu item is the same as entering the number of the item and pressing Return. Menu Type 2 - Selection This type of menu allows you to select items from the item list. Items in the item list are arranged vertically and horizontally. On some menus, you can select only one item. If the word “selection” appears in the prompt, you can select multiple items. This menu type may be followed by additional prompts for qualifying information. You can select more than one item by entering the numbers of the items, separated by commas. To select a series of items, enter the starting and ending numbers, separated by a “/”; for example, entering “2/5” is the same as entering “2,3,4,5”. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 15 The types of menus MBF-UDALink Menu Type 3 - Specify This type of menu allows you to specify information that can only be supplied by typing an entry. It does not have an item list. 16 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Prompts Prompts There are only a few types of prompts. You may be prompted for the following kinds of answers: To enter a single number corresponding to an item in a list: ENTER AN OPTION NUMBER[1 ] To enter one or more numbers corresponding to items in a list. Enter numbers separated by commas, as in “1,3,15”, or enter ranges of numbers by using a slash between them, as in “1,3,15/21”. ENTER DATA FIELD SELECTION[1,3,15/21 ] Note: To include all items in the list, enter “ALL”. To enter a short, single character or word reply to a specific question. In most cases, valid values are shown for these prompts, enclosed in parentheses. In some cases, only the current value for the item is shown in parentheses. In all cases, pressing Return causes the first entry shown to become the default answer. The default is normally shown in upper case, as in the first example below, where N is the default. ANY MORE FILES FOR SELECTION (N,y)? [n ] HELP LEVEL (EXPERT)[novice ] DECIMAL PLACES (0)[2 ] To enter a one-line reply to a specific request, such as the description for a procedure, a formula for a computational field, or criteria for selecting information for a specific data field. COMPUTATIONAL EXPRESSION[3 * 0.95 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 ] 17 Function keys MBF-UDALink Function keys Reporter supports function keys on terminals and desktops. Pressing a function key has the same effect as entering the corresponding value through the keyboard. There are some general rules for function keys: • The number of a menu item corresponds to its function key number. For example, CREATE a procedure is item three on the Main Menu and can be selected by pressing function key 3 or by entering the value 3 followed by Return. • Function key 8 normally returns you to the Main Menu. • Function key 7 normally returns you to the previous menu. • Function key 1 is the default when multiple choices are available (YES or NO, SAVE or DOWNLOAD, FORWARD/EXIT/BACK). If the terminal emulator on your PC has only 25 lines or supports only one line of user labels, the labels are designed so that the first line can be used by itself. To turn off the function key option, see the MENU FUNCTION LEVEL option of the MODIFIABLE Default User Parameters menu of the Maintenance program in the MBF-UDALink Administration Manual. 18 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Configuration Menu Configuration Menu To access the Set Configuration Options menu, enter an exclamation point (“!”) at any prompt or press the “CONFIG OPTIONS” function key, F7, while in the Main Menu. Note: Changes you make while in this set of menus are only in effect for the current session. 1: Menu characteristics Customize the way information is formatted for the terminal. 2: Procedure execution parameters Customize the way the output file is prepared. 3: Display format parameters Customize the screen display and printer page. 4: Output file characteristics Customize the format of the output file. 5: PC interchange parameters Configure your PC for file downloading. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 19 Menu characteristics MBF-UDALink Menu characteristics 1: HELP LEVEL (EXPERT) To automatically display short help messages for menus and prompts, enter NOVICE. Enter EXPERT to get help only when you ask for it with ? or ?? responses. 2: MENU COSMETIC LEVEL (2) To control the amount of data sent to the terminal and how it is formatted, enter a value from 0 through 3. The 0 setting is most useful for lower-speed communication lines. 0 - Text left justified and no dashed lines. 1 - Text centered and no dashed lines. 2 - Text centered with dashed lines. 3 - Text centered with continuous lines (requires line drawing set). 3: MENU FUNCTION LEVEL (3) This will inhibit the “home and clear” before menu titles are displayed, allowing all displayed lines to scroll up the screen. Non-HP terminals work this way regardless of the setting. 0 - Scroll mode 1 - Screen refresh 2 - Screen refresh and memory lock 3 - Screen refresh, memory lock, and function keys 4: LIST FIELD OCCURRENCES ON MENUS (YES) The YES setting allows fields in a table with multiple occurrences to display all occurrences as though they were separate fields. They appear as the same name as the original field, followed by the occurrence number. For example, a field BALANCE that occurs 12 times displays as BALANCE-1, BALANCE-2, ... BALANCE-12. 20 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Menu characteristics 5: LOGICAL MENU ITEM NAMES (NO) This determines whether names shown on the menus for files and elements are actual (physical) names or menu (logical) names. 6: MESSAGE CATALOG NUMBER (0) This allows you to specify which catalog to access in this session. The message catalog contains all of the text for menus, prompts, and messages. This prompt only appears if multiple catalogs are installed (i.e., the NO. OF ADDTNL. CATALOGS INSTALLED prompt of the installation parameters menu of Maintenance is greater than zero). Two additional message catalogs are available - 1 Spanish, 2 French. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 21 Procedure execution parameters MBF-UDALink Procedure execution parameters 1 : RECORD COUNT INTERVAL (100) [ ] When a procedure runs, it informs you of progress by displaying RECORDS READ, PREPARED, and WRITTEN. It updates this progress message every 100 records unless you change this setting. If you enter a 0 (zero), no messages are reported. 2: LIST COMPUTATIONAL ERRORS (NO) [ ] The YES setting causes computational errors to be reported as they occur. The NO setting summarizes all errors at the end of the procedure. 3: REMOVE DUPLICATE RECORDS (NO) [ ] Normally, duplicate records are allowed in an output file. To eliminate duplicate records, enter YES. Only identical records that are adjacent in a file are removed. 4: SUMMARIZE BY UNIQUE SORT FIELD VALUE (NO) [ ] This allows you to specify how the values of built-in functions are calculated. If this is set to NO, each value encountered in a control break is used in the calculation. If it is set to YES, only unique values are used. For example, if reporting all sales to a range of accounts, you may want to count the number of accounts. Set this value to YES so that the count reflects the number of unique account numbers. Otherwise, the count reflects the total number of detail lines. 5: TERMINAL PRINTER DEVICE NUMBER (4) [ ] Enter the device number of the printer for the user terminal or PC. 0 - none 4 - external printer Other device numbers may be valid. To retain the attached printer setting after a print operation, enter a minus sign before the device number. 6: TERMINAL PRINTER RESET CODE 22 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Procedure execution parameters Enter the control sequence to reset your printer. Consult your printer manual for the correct sequence. Non-printing codes must be entered as “[n]”, where n is the decimal value of the code. The reset code for HP printers is “EscE” (Esc has a code of 27), so you would enter “[27]E”. If you do not want a reset code to be sent to the terminal printer, enter “ ”. 7: RETURN Return to the Configuration Options menu. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 23 Display format parameters MBF-UDALink Display format parameters 1: TERMINAL DISPLAY WIDTH (80) For terminals with a line width other than 80 columns, enter the maximum number of columns. 2: TERMINAL DISPLAY DEPTH (24) For terminals that display less or more than 24 rows, enter the maximum number of rows. 3: PRINT PAGE WIDTH (132) Enter the maximum width of displays sent to a printer; i.e., the Display Catalog and Review Procedure printer listings. 4: PRINT PAGE DEPTH (59) Enter the number of lines per page that a printed listing contains. Note: Specify a print page depth of 0 lines to eliminate page skips on output such as mailing labels. If page heading and/or footing is specified, then only one per report is printed. 5: PRINTED REPORT SUMMARY PAGE (YES) To generate a procedure execution summary page at the start of any printed output report, enter YES. This summary page contains the name of the procedure, the time it was run, record counts, and any selection values. 24 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Output file characteristics Output file characteristics 1: EUROPEAN DECIMAL FORMAT (NO) To format numeric fields with decimal points in European format, enter YES. The European decimal point is a comma; the North American and British decimal point is a period. 2: DIF FILE QUOTATION MARK (“) Most applications expect strings enclosed in double quotation marks, for example, “a string”. 3: COLUMN HEADINGS ON SPREADSHEET FILES (YES) To generate column headings on spreadsheet output files (Lotus and Excel), enter YES; otherwise, enter NO. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 25 PC interchange parameters MBF-UDALink PC interchange parameters 1: DEFAULT TERMINAL EMULATOR (R Enter an identifier for the default PC terminal emulator. The identifier for Reflection is “R”. Enter: “R” - If Reflection is used and UNXLINK2 is to be used for transfers. “ ” - If Reflection is not used, leave this setting blank. Reporter loads more quickly without the Reflection status checks. 2: DEFAULT PC DRIVE ( ) Enter the letter for the PC disk drive to use as the default for downloaded files. This drive may be different from the PC’s default drive. For example, you can specify that downloaded files will go to drive B: by default even though your PC default drive may be C: . Enter a “ ” to use the PC default drive. 3: DEFAULT PC FILE DIRECTORY ( ) Enter the name of the PC file directory to be used as the default for downloaded files. This directory is added to any PC file names that do not include a directory. Enter “ ” to download files to the current directory. 4: PC FILE TERMINATION CODE (26) Enter the termination character required by your PC operating system to mark end of file. Windows uses code 26, which is equivalent to CONTROL/Z. Enter 0 (zero) if no termination character is needed. 5: PC FILE DOWNLOAD DELAY (2) Enter the number of seconds to wait before downloading data. This is normally used only on PCs that require manual intervention to download. Reflection does not require this delay. 26 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Navigational commands Navigational commands Special navigational commands help you quickly access menus. At any prompt you can enter: / to return to the previous prompt or menu // to return to the MAIN MENU CONTROL/Y the “Control” and “Y” keys pressed simultaneously to return to the Main Menu Function key 7 will often be labelled “ESCape”; pressing this key is the same as entering “/” Function key 8 will often be labelled MAIN MENU; pressing this key is the same as entering “//” Large lists of files or fields are divided into menu “pages”. The total number of pages is shown in the upper right corner of your screen. To jump from page to page, enter: /0 (zero) to skip the remaining pages in the menu. For example, 1,2,/0 /n to go to the specific menu page “n”. You can move forward or backward. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 27 Reviewing reports MBF-UDALink Reviewing reports Function keys help you navigate Reporter. A specific use of function keys is the on-screen processing of reports. The function keys work the same way for a data report or a catalog report: You can easily navigate through a report with function keys: F1 - FORWARD A PAGE - Move to the next page. Note: Does not appear if the current page is the last one. F2 - BACK A PAGE - Redisplay the previous page. Note: Appears if there is more than one page in the report and the current page number is greater than one. F3 - NUMBER OF PAGE - Press this key to be prompted for the page number you want to display. This can be used to look at the bottom line of a report before printing it. The last page number of the report appears in the top right corner of the screen. If page numbers are not shown, enter a very large number to display the last page. Note: You can enter the page number directly at the PAGE-FORWARD/EXIT/PAGE-BACK prompt. F4 - NEXT CHOICE- This allows forward navigation through the menu. Note: This key must be pressed before you select an entry. It causes F6 Select Entry to be displayed. Pressing F6 makes your selection. F5 - PREVIOUS CHOICE - This allows backward navigation through the document. F7 - PRINT - This key appears for reports like the Procedure Catalog Report and Procedure listings. Press this function key to print the report shown on the screen. Note: You are asked to select a printer. F8 - EXIT - Return to the previous menu. Note: If the PRINT function key is not available, after reviewing the report at your screen, EXIT from the review and enter “Y” when asked if you want to REUSE THE EXTRACT FILE. You are asked again if you want to print it and, if so, whether you want it on the terminal or printer. 28 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Online help Online help Introductory help messages are available at the Main Menu by pressing the INFO function key followed by the HELP function key. From any prompt, you can enter: ? Display a brief help message. ?? Display a more detailed help message. For help about items in a menu, prefix or follow the request with the item number, as in the following screen. The help message appears, followed by the original Option Selection prompt. There are two help modes: NOVICE: In NOVICE mode, the brief help message automatically appears for each prompt, and a single question mark displays full help. In this mode, the program acts like a tutorial. EXPERT: In EXPERT mode, shown in our example, the help messages appear only when you request them. The help mode may be configured for the entire system, for individual users if user profiles have been installed, or by the user, using the Set Configuration Options menu. You can also get information on file and field types. In response to any prompt that asks you to select from a list of files or fields, enter: n? or ?n where “n” is a file or field number. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 29 Main Menu MBF-UDALink Main Menu This is the top-level menu you see when you RUN the program. All menu sequences return here. 1: DISPLAY procedure catalog This option allows you to display the current procedures in a procedure catalog. This report can be printed on a printer or displayed to your terminal. You only see a list of procedures from catalogs you may access. 2: RUN an existing procedure This option allows you to run any procedure that you may access. 3: CREATE a new procedure This option allows you to specify the data extraction and formatting rules for a new procedure, and either run it or save it for future use. 4: MAINTAIN an existing procedure This option allows you to work with an existing procedure. You can REVIEW the specifications used to create the procedure, MODIFY the procedure, DELETE the procedure, or SAVE the procedure into any catalog you may access. 8: EXIT This option allows you to end the session. There are also three additional function keys available: F5 UTILITY OPTIONS - This key changes the function keys to the utility function key options. F6 INFO - This key changes the function keys to the INFO function key menu. F7 CONFIG OPTIONS - This key enters the Set Configuration Options menu, to customize Reporter for this session. You can also enter the Set Configuration Option menus by entering “!” at any prompt. 30 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Main Menu Pressing the F5 UTILITY OPTIONS function key changes the function keys to: F4 MBF-UDALink - Provides access to the ODBC driver function key menu, to allows users to run programs on their desktops. F5 FILE TRANSFER - Provides access to Reflection for file transfer from within Reporter. Labelled files can be uploaded or downloaded by adding “;L” to the HOST file name. Pressing the F6 INFO function key changes the function keys to: F4 INDEXED HELP - Enters the Indexed Help menu, which provides indexed access to information about Reporter. F5 SYSTEM OPTIONS - Displays the options and interfaces installed in your version of Reporter. It also indicates which user profile is controlling this session. F6 HELP - Displays introductory help messages and explain the navigational commands. F7 NEWS - Displays the latest changes and enhancements to Reporter. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 31 DISPLAY Procedure Catalog MBF-UDALink DISPLAY Procedure Catalog This menu allows you to display the contents of a procedure catalog. A listing can be printed on the system printer or displayed to your terminal. The listing may show all the procedures in the catalog that you may access, or may show only selected portions based on how you have responded to the prompts. You will only see procedures that you may access. You have access to any procedures that your user ID created, any that are open to everyone, and any for which you are the designated user. DISPLAY THE LOCAL CATALOG (Y/n)? [n ] Enter “Y” or Return to display the contents of the catalog in your logon directory. Enter “N” to receive the prompts for the location of the catalog you want to display. PROCEDURE NAME SELECTION [n* ] It is possible to limit the list of procedure names shown by matching on procedure name. Enter Return to see all procedures or a pattern match. DISPLAY SELECTED ENTRIES (Y/n)? [Y ] Enter “Y” or Return to display the Procedure Catalog Report at your terminal. Enter “N” to specify a new procedure name selection. 32 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Procedure Catalog Procedure Catalog You can RUN or REVIEW a procedure from this menu. If the procedure name you want is not on the screen, press BACK or FORWARD until you see it. Press the NEXT or PREVIOUS function key until the entry you want is highlighted. If you press the PRINT function key here, you will have the choice of printing the Procedure Catalog Report on your terminal printer or a system printer. The SELECT ENTRY key becomes available as soon as you start highlighting entries. When the entry you want is highlighted, press the SELECT ENTRY key. You are now given the choice of REVIEWING or RUNNING the highlighted procedure or ESCAPING back to the display to find another procedure. If you press the REVIEW function key, you will see the first page of the Procedure Review Report for the procedure you highlighted. You can print the procedure report by pressing the PRINT function key or scroll through it. If you press the RUN key, the highlighted procedure will be loaded and executed. You can choose to REVIEW or RUN the highlighted procedure or ESCape to the display to select another procedure. Press the REVIEW function key to see the first page of the Procedure Review Report for the highlighted procedure. To print the procedure report, press the PRINT function key or scroll through it. Press the RUN key, to load and execute the highlighted procedure, as described in the next section. You can scroll through this catalog report using the function keys, or press the PRINT function key to print it. The Procedure Catalog Report contains the following items: The names of the procedures. These are listed in alphabetical sequence. The column heading type of procedure. The letter following the name indicates what the procedure will do: D - Produces a data interchange file for use in another program. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 33 Procedure Catalog MBF-UDALink R - Produces a report listing. U - Has a runtime decision on format The user access for the procedure: A - This procedure is open to any user. U - Your user ID or class is the designated user for the procedure. blank -Only the creator can use the procedure. A “*” beside the A or U code indicates you are the creator. The date that each procedure was saved. The description entered when the procedure was saved. The group and account of the catalog being displayed. Your current user ID. The procedure name selection that you entered. If you did not enter a name match, this is “ALL”. If your terminal or desktop supports function keys, press the PRINT function key to print the catalog display. Reporter determines if function keys are not available and provides additional prompts to allow printing. 34 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink RUN an existing procedure RUN an existing procedure This menu allows you to specify a procedure to be run. Press ENTER to RUN procedure TEST If there is a procedure currently active, the name of that procedure and the directory where it has been saved will be displayed. You can run this procedure by pressing Return instead of entering a name at the RUN prompt. To run a different procedure, enter its name and the catalog in which it has been saved. RUN procedure name [TEST ] Enter the name of the procedure you want to run or Return to run the current procedure. RUN procedure from local catalog (Y/n)? [n ] Enter “Y” if the procedure you want to run exists in the local catalog. Enter “N” if the procedure is in a different catalog. Enter the path/directory information for the catalog. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 35 RUN an existing procedure MBF-UDALink Use SQL database definitions Enter 1 to access an ALLBASE/SQL database. Enter 2 to access an ORACLE/SQL database. Use HP Allbase SQL definitions SQL database environment name Enter the name of a database environment (DBE) to be accessed by the procedure that you are creating. This is required. 36 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink RUN an existing procedure Use ORACLE SQL definitions Oracle SID Enter the name of an Oracle database or press Return for the default. Oracle user name Enter a user name that allows access to the database specified above. This is required. If a password is included with the user name, you will be prompted for it as well. Runtime decision on output file format This menu appears if you are allowed to specify the output format or the procedure has been created to request an output format at runtime. Enter the menu number for your choice or ‘0’ to enter the menu to build your own format. If the procedure’s output file format is left to be determined at runtime, you can: • create a report • display it to your screen to ensure the information is correct •select an output type to a format for a desktop application • save the output on the HP 9000 server The system default format is “Report Listing”. This default can be changed if the Profiles option has been installed. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 37 RUN an existing procedure MBF-UDALink Specifying passwords PROCEDURE EXECUTION PHASE —————————————————————————————————————— PASSWORD for MEMBER [ ] If the executing procedure accesses one or more databases, you are asked to supply a password for each database, unless the passwords were embedded in the procedure when it was created. Enter a password that grants you read access to the database in the prompt line. Pressing Return generates a password of “;” which will open the database if you are its creator. The password does not appear on the terminal. 38 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Downloading the output file Downloading the output file PROCEDURE EXECUTION PHASE —————————————————————————————— 194 READ (150 ON PRIMARY FILE), 44 PREPARED, 49 WRITTEN DIF FILE TITLE [ INCLUDE SUMMARY LINE RECORDS (N/y)? [ ] DOWNLOAD/SAVE/APPEND/EMAIL file (D/s/a/e)? [ ] ] DOWNLOAD STARTED PC FILENAME: [ ] DOWNLOAD COMPLETED REUSE EXTRACT FILE (N/y)? [ ] REPEAT PROCEDURE RUN (N/y)? [ ] These are the prompts you would encounter when you are using Reporter to create an interchange file to download to your desktop. 194 READ (150 ON PRIMARY FILE), 44 PREPARED, 49 WRITTEN This message displays throughout the creation of the output file, and is updated periodically to keep you informed of the progress of the execution. The frequency with which this message is updated is based on the number of records read, and can be changed by your System Administrator. DIF FILE TITLE [May 22 run ] If the output file format for the procedure is a DIF file, you are asked to enter a file title. Although most programs will ignore the DIF title, this can be used to document the file. INCLUDE SUMMARY LINE RECORDS (N/y)? [ ] If you do not want the summary lines to be included in the download file, enter “N”. DOWNLOAD/ SAVE/APPEND/EMAIL file (D/s/a/e)? [d ] Note: To use the E-mail capability, the following setting variables have to be set before running Reporter. These variables can be set at any HP colon prompt or can be included in an install script: MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 39 Downloading the output file MBF-UDALink EXPORT DX_MAIL_SERVER “123.456.789” EXPORT DX_MAIL_SENDER “address@provider.com” DOWNLOAD STARTED PC FILENAME: [ ] DOWNLOAD COMPLETED If you are using Reflection as your terminal emulator, you are prompted for a name for the file on the PC. Reporter will automatically download the file to the disk drive and subdirectory indicated by the installation default or your user profile. The initial defaults are the current drive and the current directory. These defaults can be changed permanently with MBF-UDALink Manager or for the session with the “Set Configuration Options” menu. You can override these values by entering the drive and/or subdirectory at this prompt. An extension can automatically be added to the file name depending on the output type selected. Excel, for example, will add .xls or .slk, depending on which Excel format is selected. Example: c:\myfile would go to the C: drive in the root directory d:\admin\newfile would go to the D: drive in the \admin\ directory mywork.xyz would go to the default drive and subdirectory but would have an extension of XYZ If for any reason you want to abort the transmission, enter <CNTL/Y> or press the STOP function key. REUSE EXTRACT FILE (N/y)? [n ] Enter “Y” to return to the prompt “DOWNLOAD/SAVE/APPEND file”. You might choose to do this if a transmission problem caused incorrect data to be downloaded, or if you want to save the file on the HP 9000 server in addition to downloading it. 40 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Downloading the output file If the procedure you are running prompts for an output file format at runtime, the output menu prompt will be re-issued so that you can reformat this data without having to read the files again. Enter “N” or Return to continue to the next prompt. REPEAT PROCEDURE RUN (N/y)? [n ] Enter “N” or press Return if you are finished with this extract file. Enter “Y” to repeat the entire PROCEDURE EXECUTION PHASE. You may be reprompted for new selection values and asked if you want to change the output file format if this procedure asks for them at runtime. Saving the output file PROCEDURE EXECUTION PHASE —————————————————————————————— 194 READ (150 ON PRIMARY FILE), 44 PREPARED, 49 WRITTEN DIF FILE TITLE [ INCLUDE SUMMARY LINE RECORDS (N/y)? [ DOWNLOAD/SAVE/APPEND file(D/s/a)? [ ] NAME FOR GENERATED FILE [ ] ] ] CLOSING MYFILE PURGE EXISTING FILE (N/y)? [ ] REUSE EXTRACT FILE (N/y)? [ ] REPEAT PROCEDURE RUN (N/y)? [ ] This list shows the prompts you would encounter if you decide to save or append the output from a Reporter procedure to a file on the HP 9000 server. Select this option if: • you intend to use a file transfer program to copy the file to your desktop, to another HP 9000 server, or to a mainframe computer • the output file will be used by another HP 9000 server application 194 READ (150 ON PRIMARY FILE), 44 PREPARED, 49 WRITTEN This message displays throughout the creation of the output file, and is updated periodically to keep you informed of the progress of the execution. The frequency with which this message is updated is based on the number of records read, and can be changed by your System Administrator. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 41 Downloading the output file MBF-UDALink DIF FILE TITLE [May 22 run ] If the output file format for the procedure is a DIF file, you will be asked to enter a file title. Although most programs will ignore the DIF title, this can be used to document the file. INCLUDE SUMMARY LINE RECORDS (Y/n) [ ] Enter “Y” or press Return to display summary line records. If you do not want the summary lines to be included in the saved file, enter “N”. DOWNLOAD/SAVE/APPEND file (D/s/a)? [ ] Enter “S” to save the file on the HP 9000 server. Enter “A” to append the data to an existing file previously saved on the HP 9000 server. NAME FOR GENERATED FILE [ ] Enter the name of the file in which the output will be saved or appended. The name must be in a valid HP 9000 format. CLOSING <file name> PURGE EXISTING FILE (N/y)? [ ] If you attempt to save to a file name that currently exists, this message will display. Enter “Y” to overwrite the old file with the new file. Enter “N” or press Return to be prompted for a different file name. REUSE EXTRACT FILE (N/y)? [ ] Enter “Y” to be returned to the prompt “DOWNLOAD/SAVE/APPEND file”. You might choose to do this if you want to download the file to a desktop in addition to saving it on the HP 9000 server. If you choose to reuse the extract file, you will be prompted for the output file format (if the format is specified as runtime selection). This allows you to produce multiple formats for the same data without having to reread the files. Enter “N” or press Return to continue to the next prompt. REPEAT PROCEDURE RUN (N/y)? [n ] Enter “N” or press Return when finished. Enter “Y” to repeat the entire PROCEDURE EXECUTION PHASE. You may be re-prompted for new selection values and asked if you want to change the output file format if this procedure asks for them at runtime. 42 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a Procedure Overview Creating a procedure Creating a Procedure Overview All information needed to perform data extraction and formatting is specified as a procedure. Procedures contain information about: • files to access • data fields to use • computations to perform • fields to include in the output file • fields to use to sort the output file • the built-in functions to use at specific break points • whether summary totals should be taken • fields to use for selecting specific data • selection values or ranges to use for each selection field • how to link multiple data sets and files together • where the databases and files are located on the server • whether passwords for databases should be stored as part of the procedure • format to use when generating the output file This information is converted into a series of tables that are stored in the procedure. A procedure is not directly executable by the server hardware; it is used as input to the Reporter transaction processor. Procedures may be executed immediately or saved for later execution. When procedures are saved: • You give the procedure a name, a one-line description, a password and a user access level (who else can use this procedure). • The procedure is saved in a PROCEDURE catalog on the server. The entry also stores information about who saved the procedure, the date, and other control information. A procedure catalog can exist in any group in an account, but each group can have only one procedure catalog. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 43 Basic steps for procedures MBF-UDALink Basic steps for procedures Step 1 – Select the procedure creation option From the MBF-UDALink Main Menu select 3. – Create a New Procedure Step 2 – Select the data source Select the data source to be accessed or where the files are defined. For example, the sources of definition can include Views or PowerHouse PDL. Note: Data sources can be multiple and mixed types of dictionaries. The identity of each dictionary is kept in the procedure, to permit future modification of the file accesses. Procedure and View report listings show a sorted list of defined files and, if available, the definition of source for each file. Step 3 – Select the tables from the data source Select the data fields from the data source. These fields become the “working set” for the procedure. Step 4 – Define fields for calculations Define any fields for calculating intermediate or final results by entering computational expressions. These fields are also added to the working set of data fields. Step 5 – Define the output file Define the output file: ƒ Select the fields to write to the output file, in the order of appearance. ƒ Define the sort fields, ƒ Select the sort fields that will be used as control breaks, defining which of the functions should be calculated at each break. ƒ Define any selection fields, and optionally, the selection values or ranges which will limit the data in the output file. Step 6 – Define the linkages between multiple files If more than one file or data set is to be accessed, specify the order in which files are to be read and the fields used to link files. 44 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Basic steps for procedures Step 7 – The procedure preparation phase If runtime selection criteria were specified, specify any custom prompts that should be used at runtime instead of the field name. Step 8 – Specify the output file format Specify the output format this procedure creates or whether the user can specify the format when the procedure is run. If the Views option is used as the source of field definitions, steps 1 to 3 are reduced to selecting which View is to be used as the working set, and steps 5 to 7 are not required because this information is built into a View. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 45 Creating a procedure MBF-UDALink Creating a procedure Creating a procedure is a simple process. The challenge is knowing where the data source(s) are located, and understanding the structure of the data source(s) for linking purposes. The following is a step-by-step process for creating a procedure. Step 1 – Select the Procedures Creation option From the MBF-UDALink Main Menu – select option 3 – Create a New Procedure. Step 2 - Select the data source Depending on the options purchased, the following selections are displayed: Use Eloquence root file definitions The selection is available if you have purchased the MBF-UDALink Eloquence Interface option. Select this option to create a procedure using an Eloquence Root file. Use SQL definitions The selection is available if you have purchased the MBF-UDALink SQL Interface option. Select this option to create a procedure using an Allbase DBE file. Use FILE definitions This selection is available by default with MBF-UDALink. Select this option to create a procedure using files defined in an a file definition (FD) file. Enter the menu number corresponding to the selection at the Enter an Option Number prompt. NOTE: You will be given the opportunity, later during procedure creation, to specify additional data sources if you want to include data from more than one. The next screen will display the type of file you are accessing and prompt you for the name of the data source. For example: 46 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a procedure DATA BASE NAME [member ] Enter the name of the data source to be accessed. The next series of prompts are related to where the data source is physically located. Respond YES or NO to the “Base in local file group” prompt. If the data source is located in your current logon account or directory, respond Yes. No additional information will be requested regarding the data source location. If the data source is located in another directory, respond “N”. You will be prompted for the name for the directory where the data source is located. When MBF-UDALink has all of the information required to locate the data source, it will display the following prompt. PASSWORD [ ] MBF-UDALink must read the database to provide access to the data requested. You must enter a password which grants you at least read access to the database. Entering a blank generates a password of “;” which will open the database if you are its creator. The password is not displayed on the screen. To save the password as part of the procedure, respond “Y” to the INCLUDE THIS PASSWORD WITH THE PROCEDURE (Y/n)? prompt. To force the user to enter a password each time the procedure is run, respond “N” to this prompt. Step 3 – Select the tables from the data source A list of all tables defined in the database are displayed. You must select the specific tables from which you want to select data fields. Respond to the prompt “Enter Table selection” by entering the field numbers of the appropriate tables, separated by commas. You will be prompted to enter the fields from the selected tables are you are interested in retrieving data from. A series of screens will display the fields in each table individually. Select the fields in the same manner as you did for the tables by entering the menu numbers separated by commas at the “Enter Data Field Section” prompt. Once all data tables have been displayed and the desired fields have been selected you will be asked, ANY MORE FILES FOR SELECTION (N/ y)? Responding “Y” to this prompt will allow you to enter the name of an additional data source or file, and add more fields to the already defined selection. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 47 Creating a procedure MBF-UDALink Responding “N” to this prompt will display the EDIT FIELD DEFINITIONS (N/y)? prompt. Enter “Y” to change the data type and/or number of decimal places of one or more fields shown in the above menu. This feature allows for the specification of field attributes that may not be possible in the source dictionary. For example, special date types that cannot be defined outside of MBF-UDALink. Enter “n” or Return to go to the next prompt. Step 4 – Define fields for calculations MBF-UDALink does not require you to enter information at every prompt. If there is an uppercase letter in the choices given, this is the default. Press Return to accept the default. The three prompts ANY MORE FILES..., EDIT FIELD.... and ADD ANY COMPUTATIONAL... will be repeated until you answer “N” to each of them. ADD ANY COMPUTATIONAL FIELDS (N/y)?[ ] Responding “Y” to the above prompt will display a prompt (like the one below) requesting a new field name. Respond “N” to stop entering computational expressions. NEW FIELD NAME [FULL NAME ] If we were trying to create a new name field, we would call the new field FULL NAME. The next prompt is where you add the computational expression. COMPUTATIONAL EXPRESSION [2 + 3 ] The computational expression is created by using the menu numbers of the field involved in the expression. For example, if we were adding the 1: FIRST NAME and 2: LAST NAME together to create FULL NAME, our computational expression would be 2 + 3. If we wanted to maintain a blank space between the first and last name, the computational expression would be 2 + “ “ + 3. DATA TYPE (X) [ ] Next you are prompted to for the data type. MBF-UDALink will display in () the suggested data type. Default values are determined based on the computational expression entered and the characteristics of the field. You can enter any data type. A full list of supported data types can be 48 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a procedure found later in the manual. You can also get a list of data types by entering ?? in response to this prompt. Press Return to accept the suggested data type. FIELD STORAGE LENGTH (26) [18 ] You are prompted for the Field Storage Length. MBF-UDALink will suggest a length based on the combined length of the fields involved in the computational expression. You can enter any field length. Press Return to accept the suggested field length. You are prompted again for a NEW FIELD NAME. Enter a new field name to continue creating computational expressions. Enter “N” or press Return to stop entering computational expressions. Each computational field created will be displayed on the menu. Each new field will be assigned a field number of its own. Step 5 – Define the output file Selecting fields for the output file is done by listing the numbers of the desired fields in the prompt field, separated by commas, or by specifying a range by separating the beginning and ending field with a “/”. Enter ALL to include all fields in the output file. See example below. The fields appear in the output file in the order they are entered at this prompt. INCLUDE IN OUTPUT [1, 8, 4/7, 9 ] Once the fields have been selected, MBF-UDALink needs to know how to sort and summarize the output. At the SORT BY [1 ] prompt, enter the menu number of any fields you want the output file sorted by, in the order in which they should be sorted (from major to minor). These fields do not have to be included in the output file. To sort the file by a field in descending order, enter the field number followed by a “D” (for example “2D”). To use the summary functions at control breaks, specify the control breaks as sort fields. If the file is already in the right order, enter “S” following the fields at which summaries are required. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 49 Creating a procedure MBF-UDALink If only report summaries are required, enter a zero. To suppress the printing of a non-sort field, enter the field number followed by an “S”. For more information on sorting, enter ?? at the SORT BY prompt. SUMMARIZE BY [0, 1 ] Enter the numbers of the sort fields to use as control breaks. A control break is the point at which the value in a sort field changes. At each control break, you can specify that any of the summary functions should be calculated on specified fields. For example, if you sorted by REGION and specified that it should be a control break, the next prompt allows you to indicate that at each change in the REGION value you want the function of “total” to be calculated and printed beneath the BALANCE field. To specify that you want to use the built-in functions over the whole report (i.e., to have a grand total line), include a zero in the response to the SUMMARIZE BY prompt. When control breaks are specified at the SUMMARIZE BY prompt, you will be asked the following: ENTER SUMMARY FIELD SELECTION FOR: report [7 NUMBER [1C, 7 ] ] Enter field numbers followed by the built-in function code to be performed at the control breaks. Enter summaries required at the end of the report where prompted by “report”. The summary function codes are: 50 A Average * (or nothing specified) Sub-Total C Count L Low (minimum) value H High (maximum) value E End (last) value MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a procedure The function of COUNT can be set to accumulate in one of two ways: it can count all unique values encountered, or it can count all values. The default will count all values. This can be changed for the session with the Set Configuration Options menu or permanently with Maintenance. A computational field that computes percent or ratio can only be included at one control break. To compute ratios or percentages based on multiple breaks, create multiple computational fields. If the computational field that computes a percent or ratio is included in the output file (i.e., has been placed in the response to the INCLUDE IN OUTPUT prompt above) and has not been specified at a control break, it is assumed that the grand total value constitutes 100 percent. To obtain the last value for a field in a sorted group, use an input of “nE”. This provides a summarized breakpoint value for field “n” of the ending (last) value in the sorted group. This is useful when detail records are suppressed and the lowest summary level is explicitly defined. By default, a field without any summary function (count, average, etc.) will contain the first value of the sorted group. Now that you have told MBF-UDALink which files to put in the output file and how to sort and summaries those records, you need to express how you want the data displayed. Do you want just the summaries or all of the details. Enter “N” at the SUPPRESS DETAIL RECORDS (N/y)? prompt to produce detail records in the output file. Enter “Y” to add records to the output file only when the value in the lowest sort field changes. If the lowest level sort field is not included in the response to the SUMMARIZE BY prompt, numeric fields are automatically totalled and the first occurrence of an alphanumeric field for this sort value is written to the output file. This may result in calculations such as the summing of phone number, unit prices, or ZIPs. To turn off the automatic summarization of numeric fields, include the lowest level of sort at the SUMMARIZE BY prompt and specify which fields are to be summarized. The numeric fields that are not specifically summarized contain the first value encountered for the sort field. It is now necessary to specify which fields you want to select on. You can limit an output file by selecting only the records where certain fields have specific values, enter the numbers of those fields. SELECT BY [4P, 6 ] If you enter a “P” after a field number, you are prompted for the selection values for that field at runtime to determine which records are selected. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 51 Creating a procedure MBF-UDALink To compare two fields, enter one with pre-defined selection at the SELECT BY prompt. When prompted for selection values for this field, enter the second preceded by a “$“. Operators such as “>” or “LE” can also be used. Entering the same field number twice (once with “P” and once without) allows a certain range of values to be pre-specified and still allows the user to further limit the selection at runtime. At runtime, the values that the user enters must be a subset of the values pre-specified, or no records will be selected. When you enter values for selection, you can use upper- or lowercase because MBF-UDALink is not case-sensitive. The Fixed Selection capability provides an additional level of selection definition and is available through the optionally purchased Profiles option. The prompt shown below appears for all selection fields that are to have pre-defined selection values stored with the procedure. The rules for entering selection values are the same as those entered at runtime. In the SELECT BY prompt, the comma (,) represents an AND connector and the colon (: ) represents an OR connector. “4, 6” indicates that a record is selected only if the BALANCE and TRAN-DATE both contain one of the appropriate selection values. The colon (: ) represents an OR connector. “6:3” indicates that a record is selected if either the BALANCE or TRAN-DATE contain one of the appropriate selection values. Enter “Y” at the ARE THE SPECIFICATIONS CORRECT (Y/n)? prompt if all output specifications entered are correct. Entering “N” will repeat all prompts in the Define Output Specifications section, allowing you to re-enter the output specifications. If the database or files are not in the same “local” group that the user will log on to, specify where they are located by responding “Y” to the EDIT NAMES/LOCATIONS OF DATA BASES AND FILES (N/y)? Responding “N” will continue to the Defining Linkages stage of procedure creation. Step 6 – Define the linkages between multiple files Once you have responded that everything in the “Define output specifications” section is correct, you move to the “Multi-file access order” menu. 52 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a procedure FILE ACCESS AND LINKAGE ORDER [1,2,1:3 ] Enter the file numbers, separated by commas, in the order the files are to be accessed. The link field is assumed to be in the file immediately to the left of a file number. You can specify otherwise by entering the number of the file to use as the link, separated by a colon, immediately before you enter a file number. To use a computed field as a link to a file, enter just a colon before its file number. If more than one computational field exists, a menu of all computational fields is displayed. Indicate which computational field you want to use as the key. In a multi-file extract process, field values are set to null if no records exist for the key value. The entire record complex is suppressed if selection criteria are applied to any field in these records, because null values are not a valid match. To include the record complex when there is selection on the second or subsequent files and there are no records in these files, specify a plus sign (+) in front of the file number. This is referred to as the FORCE SELECTION IF MISSING feature. In a multi-file extract process, you may want to specify records from a file only where there are no records in a linked file for corresponding key values. To include the record complex, specify a minus sign (-) before the “link to” file. This is referred to as the SELECT IF MISSING feature. For example: • 1,2,3 defines the linkage order as: file 1 links to file 2; file 2 links to file 3. • 1,2,1:3 defines the linkage order as: file 1 links to file 2; file 1 also links to file 3. • 1,2,:3 defines the linkage order as: file 1 links to file 2; a computational field links to file 3. • 1,+2,3 defines linkage order as: file 1 links to file 2; file 2 links to file 3. A record complex is selected even if there are no records for file 2 for a specific key value and there is selection criteria on fields in file 2. • 1,-2 defines linkage order as: file 1 links to file 2. Where no records exist for corresponding keys in file 2, only records in file 1 are selected. After you have specified the file access order, you may be asked to select the fields that are used to link one file to another. • The field in the “from” file does not need to be a key and does not need to have the same MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 53 Creating a procedure MBF-UDALink name as the key field in the following file. For example, you can use a product-code from an invoice detail record to link to the product master, even if product-code is not the search item in the invoice detail set. • If a computational field is used in the linkage order, and multiple computations have been defined, you are shown a menu of all computations and asked to select one. If only one computational field exists, it is automatically used and no prompt is issued. IS THERE A DEFINED PATH BETWEEN TABLES (Y/n)? If both the “from” file and the “to” file are tables in the same database, MBF-UDALink can often automatically determine a path between the two tables. This path is often defined as part of the database structure, as in a master-detail relationship. Enter “Y” to use the defined path, or enter “N” to specify a custom linkage. If a defined path between two files does not exist, or if you specified that you did not want to use the defined path, you must choose a field from each file to use as the linkage between the files. Enter the number of the field to use to link the “from” file to the “to” file. SELECT THE KEY FIELD from “to” file [1 ] Enter the number of the field to be used as a key into this file. The values in this field are compared to the values from the link field in the previous file to determine matching entries (i.e. to form a path between the files). A runtime error will occur if the field you select is not a key. Step 7 - Procedure preparation phase The procedure preparation phase is the final phase of the procedure creations process. The following are all of the messages and prompts for the PROCEDURE PREPARATION PHASE menu. The screen is cleared for each prompt, which appears at the top of the display. Entering “Y” to any of these prompts invokes a new menu, which returns here for the next prompt in the series. ALTERNATE NAMES FOR SELECTION COLUMNS (n/Y)? [y ] EDIT NAMES/LOCATIONS OF DATA BASES AND FILES (N/y)? [y ] <Output file format options> 54 RUN THE PROCEDURE (Y/n)? [y ] SAVE CURRENT PROCEDURE (Y/n)? [y ] MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a procedure RETURN TO FIELD SELECTION MENU (N/y)? ALTERNATE NAMES FOR SELECTION FIELDS (n/Y)? [y ] [y ] If any selection fields were specified, you receive this prompt. Enter “Y” to customize the prompts for selection criteria that appear when the procedure is executed; you will enter the “Alternate names for selection criteria” menu, then return here for the next prompt. EXPIRY-DATE[Expire Date (YYMMDD) <selection field name>[ ] ] For each field specified as a selection field, you can enter a custom message to be displayed when prompting for selection criteria. Enter the message you want to use, or press Return to use the name of the field for the prompt message. To change this prompt later, use the “FIELD ENTRY PROMPT” of the “EDIT field names and definitions” menu, under MODIFY a procedure. For example, the default message for the EXPIRY-DATE field is: ENTER SELECTION CRITERIA FOR THE FOLLOWING FIELDS: EXPIRY-DATE[ ] If you entered the custom message shown above, the prompt you see at runtime is: ENTER SELECTION CRITERIA FOR THE FOLLOWING FIELDS: Expire Date (YYMMDD)[ ] EDIT NAMES/LOCATIONS OF DATA BASES AND FILES (N/y)? [y ] Enter “N” if all of the files to be accessed by the procedure are correctly qualified. Enter “Y” to enter the location for each file accessed. Each database or file used is shown, and you can change the location or keep the current setting. You will enter the “Edit names/locations” menu, then return here for the next prompt. Procedure using data base DATABASENAME Edit data base location (Y/n)? [y ] This prompt can also be used to change the location of a database to be used in running the procedure, in the case where a procedure is built from a test database, but will be run against a MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 55 Creating a procedure MBF-UDALink production database that is not currently available. The location can also be changed in MODIFY a procedure. Edit <type of file> location (Y/n)? [y ] The name and type of file appears (tables are not prompted for separately, only the database that contains them) and this is followed by a prompt asking if this particular file is correctly qualified. Enter “n” to receive prompts. 56 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a procedure Step 8 - Specify the output file format The output file format menu is controlled by the installation menu prompt OUTPUT FORMAT CATALOG in MBF-UDALink Manager. If set to YES, the application menu shown below is displayed at your terminal. Select a format and proceed as described in the previous section. ENTER AN OPTION NUMBER[ ] If you enter a value here, the procedure will always create an output file with the corresponding format. If you leave it blank, Reporter will ask at runtime which format you want for this execution of the procedure. This option is the most flexible: you can create a report listing to see if the correct data has been selected and then, without re-running the procedure, reformat the output as many times as you want and download it to your desktop and/or save it on the server. Note: Options surrounded by “[........]” are either not installed or are future enhancements. Creating a special output format If the list of formats does not contain the format you need, you can generate a custom format. Enter “0” to display the Output File Format Options menu. The following options are available from this menu. 1: No data field delimiter character 2: Data fields delimited by commas 3: Data fields delimited by tab codes MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 57 Creating a procedure 4: MBF-UDALink Specify a data field delimiter character ENTER AN OPTION NUMBER [ ] Depending on the delimiter chosen, several additional prompts are displayed to control the format of the output data file. NUMERICS LEFT JUSTIFIED (N/y)? [ ] With option 1, enter “N” if numeric fields are to be right justified with leading zeros (for example, for use in loading databases or graphic routines). Enter “Y” to left-justify them without leading zeros. ASCII OR EBCDIC CHARACTER SET (A/e)? [ ] With options 2, 3 and 4, enter “A” if the output file should be in the ASCII character set (HP-9000 compatible). Enter “E” for EBCDIC (IBM main-frame). TEXT FIELDS IN QUOTATION MARKS (N/y)? [ ] With all options, enter “Y” if quotation marks (“ “) should be placed around character strings in the output file. Enter ”N” if no quotation marks should appear. Quotation marks are required by certain desktop applications such as LOTUS, dBASE and WordPerfect. Enter ‘1’ to get CR/LF as the delimiter ENTER DELIMITER CHARACTER [ ] With option 4, enter the character to be used to delimit data fields in output file records. The character can be the character itself or its decimal equivalent ASCII code. ASCII must be used for non-printing characters (for example, tab code) or for ambiguous characters (for example, “?” which will invoke a help message; “/” which will step back a prompt; or a digit that will be interpreted as the decimal code rather than an ASCII character). Enter “1” to use a carriage return and line feed as the field delimiter. Once your output format has been determined you will be prompted to RUN THE PROCEDURE (Y/n)? Enter “Y” to run the procedure; you will enter the PROCEDURE EXECUTION PHASE menu, then return here for the next prompt. SAVE CURRENT PROCEDURE (Y/n)? [y ] Enter “Y” to save the new procedure; you will enter the “SAVE THE PROCEDURE” menu, then return here for the next prompt. 58 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating procedures from Eloquence Now that the procedure has been created and perhaps run once, you will be prompted to re-use the extract file, where you can specify a different file format from the output format menu without having to re-run the procedure. You will also be prompted to re-run the procedure. You can specify different selection criteria for the same procedure for a different result set. Creating procedures from Eloquence Select the source of file definition This example uses definitions from an Eloquence root file. Indicate what data base to use and where it is located. You must read the data base in order to access the root file; therefore, supply a password that grants read access. (The password is not displayed to the screen.) If you embed the password in the procedure, the user does not have to enter it when the procedure is run. Note: Not every screen title and banner will be shown, but this example covers all of the important aspects of creating a procedure. Use HP Eloquence DBMS definitions Select this option to access an Eloquence data base and use the definitions of the data sets and data items contained in the data base itself. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 59 Creating procedures from Eloquence Eloquence data base name [member MBF-UDALink ] Enter the name of the data base to access. Press <Enter> key to use default public user Change this if the database doesn’t allow the public user default. USER Password [ ] The password is not displayed on the screen. INCLUDE USER NAME AND PASSWORD (B/u/n)? [ ] “B” includes both, “u” includes just the user name, and “n” includes neither. In this example two data sets, MEMBERSHIP and ACCT-HISTORY from the MEMBER database will be accessed. A list of all data sets defined in the data base is displayed. You must select the specific data sets from which you want to select data fields. Select input fields from these data sets. 60 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating procedures from Eloquence Select what data fields to use: File 1 Enter the field numbers of the items you want to select from File 1. In this example, number, first and last name, and balance were selected. Select what data fields to use: File 2 Field 1: NUMBER is not chosen from file 2, because it has already been selected from the MEMBERSHIP data set. Fields can be selected using the range notation. All selected fields are displayed and you are asked if you want to access another file. You are prompted as follows: ANY MORE FILES FOR SELECTION (N/ y)? [ ] You may specify another data base. If all required fields have been selected, continue creating the procedure. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 61 Creating procedures from Eloquence MBF-UDALink EDIT FIELD DEFINITIONS (N/y)? [ ] Enter “y” to change the data type and/or number of decimal places of one or more fields shown in the above menu. This feature allows for the specification of field attributes that may not be possible in the source dictionary, for example: decimal places or unsigned Z/P data types are not available in IMAGE definitions or special date types that cannot be defined outside of Reporter. ADD ANY COMPUTATIONAL FIELDS (N/y)?[ ] Reporter does not require you to enter information at every prompt. If there is an upper case letter in the choices given, this is the default. By hitting ENTER you accept the default. The three prompts ANY MORE FILES..., EDIT FIELD.... and ADD ANY COMPUTATIONAL... will be repeated until you answer “N” to each of them. Editing field definitions In this example, answer “y” to EDIT FIELD DEFINITIONS so that you can add decimal place information to fields defined in IMAGE root files. You may also add date typing information. Note: For this example, the field definition of fields 4 and 7 were edited, giving them two decimal places. Field 6 was also edited. Its Data Type, Z, was changed to DY. When you have finished editing, you see the prompt ADD ANY COMPUTATIONAL FIELDS. 62 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating procedures from Eloquence Defining computational fields You receive the following prompt: ADD ANY COMPUTATIONAL FIELDS (N/y) [ Y ] Enter “Y”. The following screen is displayed. You are prompted for a new field name for any subsequent computational fields. Fill it in as below: NEW FIELD NAME [NAME COMPUTATIONAL EXPRESSION [2 + 3 DATA TYPE (X) [ FIELD STORAGE LENGTH (26) [18 ] ] ] ] The NEW FIELD NAME prompt is displayed. NEW FIELD NAME [ ] Note: To stop entering computational fields, press <RETURN> at the NEW FIELD NAME prompt. The new field “Name” is a 26-character string, formed by joining the FIRST-NAME and the LAST-NAME fields. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 63 Creating procedures from Eloquence MBF-UDALink The second computation field is Penalty. The new field “Penalty” is calculated by multiplying the contents of field 4 (BALANCE) by 0.1 (10%). Default values are calculated for all other prompts that follow. These suggested values are determined by the kind of computational expression you enter and by the characteristics of the fields involved. The screen is refreshed to show all input fields and all computational fields (each one has been assigned a field number of its own). Defining the data in the output file Select what you want to be written to the output file. Fields used in creating computational fields do not have to be written to the output file. The fields appear in the output file in the order they are entered at this prompt. INCLUDE IN OUTPUT [1, 8, 4/7, 9 ] Enter the numbers of the data fields you want written to the output file, separated by commas, or as a range separated by a slash. Enter “ALL” to include all data fields. SORT BY [1 ] Enter the menu number of any fields you want the output file sorted by, in the order in which they should be sorted (from major to minor). These fields do not have to be included in the output file. To sort the file by a field in descending order, enter the field number followed by a “D” (for example “2D”). To use the summary functions at control breaks, specify the control breaks as sort fields. If the file is already in the desired order, enter “S” following the fields at which summaries are required. If only report summaries are required, enter a zero. To suppress the printing of a non-sort field, enter the field number followed by an “S”. 64 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating procedures from Eloquence SUMMARIZE BY [0, 1 ] Enter the numbers of the sort fields to use as control breaks. A control break is the point at which the value in a sort field changes. At each control break, you can specify that any of the summary functions should be calculated on specified fields. For instance, if you sorted by REGION and specified that it should be a control break, the next prompt allows you to indicate that at each change in the REGION value you want the function of “total” to be calculated and printed beneath the BALANCE field. To specify that you want to use the built-in functions over the whole report (i.e., to have a “grand” total line), include a zero in the response to the “SUMMARIZE BY” prompt. ENTER SUMMARY FIELD SELECTION FOR: report [7 NUMBER [1C, 7 ] ] Enter field numbers followed by the built-in function code to be performed at the control breaks. Enter summaries required at the end of the report where prompted by “report”. The summary function codes are: A * (or nothing specified) C L H E Average Sub-Total Count Low (minimum) value High (maximum) value End (last) value The function of COUNT can be set to accumulate in one of two ways: It can count all unique values encountered, or it can count all values. The default will count all values. This can be changed for the session with the “Set Configuration Options” menu or permanently with Maintenance. A computational field that computes percent or ratio can only be included at one control break. To compute ratios or percentages based on multiple breaks, create multiple computational fields. If the computational field that computes a percent or ratio is included in the output file (i.e., has been placed in the response to the “INCLUDE IN OUTPUT” prompt above) and has not been specified at a control break, it is assumed that the grand total value constitutes 100%. To obtain the last value for a field in a sorted group, use an input of “nE”. This provides a summarized breakpoint value for field “n” of the ending (last) value in the sorted group. This is useful when detail records are suppressed and the lowest summary level is explicitly defined. By default, a field without any summary function (count, average, etc.) will contain the first value of the sorted group. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 65 Creating procedures from Eloquence MBF-UDALink SUPPRESS DETAIL RECORDS (N/y)? [n ] Enter “N” to produce detail records in the output file. Enter “y” to add records to the output file only when the value in the lowest sort field changes. If the lowest level sort field is not included in the response to the SUMMARIZE BY prompt, numeric fields are automatically totalled and the first occurrence of an alphanumeric field for this sort value is written to the output file. This may result in calculations such as the summing of phone number, unit prices, or ZIPs. To turn off the automatic summarization of numeric fields, include the lowest level of sort at the SUMMARIZE BY prompt and specify which fields are to be summarized. The numeric fields that are not specifically summarized contain the first value encountered for the sort field. SELECT BY [4P, 6 ] To limit an output file by selecting only the records where certain fields have specific values, enter the numbers of those fields. If you enter a “P” after a field number, you are prompted for the selection values for that field to be used at run time to determine which records are selected. To compare two fields, enter one with pre-defined selection at the SELECT BY prompt. When prompted for selection values for this field, enter the second preceded by a “$“. Operators such as “>”, “LE”, etc. may also be used. Entering the same field number twice (once with “P” and once without) allows a certain range of values to be pre-specified and still allows the user to further limit the selection at run time. At run time, the values that the user enters must be a subset of the values pre-specified, or no records will be selected. When you enter values for selection, you may use upper or lower case, as Reporter is not case-sensitive. The Fixed Selection capability provides additional level of selection definition and is available through the Profiles option. The prompt shown below appears for all selection fields that are to have pre-defined selection values stored with the procedure. The rules for entering selection values are the same as those entered at run time. In the SELECT BY prompt, the comma (,) represents an AND connector; the colon (: ) represents an OR connector. For example, “4, 6” indicates that a record is selected only if the BALANCE and TRAN-DATE both contain one of the appropriate selection values. 66 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating procedures from Eloquence SELECT BY [4P, 6] ENTER SELECTION VALUES FOR THE FOLLOWING DATA FIELDS: BALANCE [> 0.00 ] The colon (: ) represents an OR connector. For example, “6:3” indicates that a record is selected if either the BALANCE or TRAN-DATE contain one of the appropriate selection values. SELECT BY [4P: 6] ENTER SELECTION VALUES FOR THE FOLLOWING DATA FIELDS: BALANCE [> 0.00 ] ARE THE SPECIFICATIONS CORRECT (Y/n)? [ ] Enter “Y” if everything is correct. Entering “n” will repeat all prompts in the Define Output Specifications section, allowing you to re-enter the output specifications. EDIT NAMES/LOCATIONS OF DATA BASES AND FILES (N/y)? [n] If the data base or files are not in the same “local” group that the user will log on to, specify where they are located. Defining linkages between multiple files Once you have responded that everything in the “Define output specifications” section is correct, you move to the “Multi-file access order” menu. FILE ACCESS AND LINKAGE ORDER [1,2 ] Enter the file numbers, separated by commas, in the order the files are to be accessed. The link field is assumed to be in the file immediately to the left of a file number. You may specify otherwise by entering the number of the file to use as the link, separated by a colon, immediately before you enter a file number. To use a computed field as a link to a file, enter just a colon before its file number. For example:3 indicates a computational field will be used as the key to file 3. If more than one computational MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 67 Creating procedures from Eloquence MBF-UDALink field exists, a menu of all computational fields is displayed. Indicate which computational field you want to use as the key. In a multi-file extract process, field values are set to “null” if no records exist for the key value. The entire record complex is suppressed if selection criteria are applied to any field in these records, because “null” values are not a valid “match”. To include the record complex when there is selection on the second or subsequent files and there are no records in these files, specify a plus sign in front of the file number. This is referred to as the FORCE SELECTION IF MISSING feature. In a multi-file extract process, you may want to specify records from a file only where there are NO records in a linked file for corresponding key values. To include the record complex, specify a minus sign before the “link to” file. This is referred to as the SELECT IF MISSING feature. For example: • 1,2,3 defines the linkage order as: file 1 links to file 2; file 2 links to file 3. • 1,2,1:3 defines the linkage order as: file 1 links to file 2; file 1 also links to file 3. • 1,2,:3 defines the linkage order as: file 1 links to file 2; a computational field links to file 3. • 1,+2,3 defines linkage order as: file 1 links to file 2; file 2 links to file 3. A record complex is selected even if there are no records for file 2 for a specific key value and there is selection criteria on fields in file 2. An example would be the generation of a report including inventory parts from the parts master even though there are no records in the order detail and there is selection on the date ordered. • 1,-2 defines linkage order as: file 1 links to file 2. Where no records exist for corresponding keys in file 2, only records in file 1 are selected. An example would be the generation of a report of inventory parts from the parts master where there are no orders in the order detail file. If the second access file is an IMAGE detail, you can also specify that only the first or last record should be read in a file, or that the file should be read in reverse order. Append one of the following letters to the appropriate file number: 68 F read only the first record in the chain that meets all criteria L read only the last record in the chain that meets all criteria R read this file in reverse order. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating procedures from Eloquence Reading first or last records means that the program reads until it finds one record that meets the criteria of having the appropriate key value and meets any selection criteria specifications. After you have specified the file access order, you may be asked to select the fields that are used to link from one file to another. Following is a brief description of various linkage scenarios: • If you are using an Eloquence data base (and linking between detail and master sets or detail to detail), the file linkages may already be defined within the data base. If this is true, you can use the default path. • The field in the “from” file to be used as the link to the “to” file does not need to be a key, and does not need to have the same name as the key field in the following file. For instance, you can use a product-code from an invoice detail record to link to the product master, even if product-code is not the search item in the invoice detail set. • If a computational field is used in the linkage order, and multiple computations have been defined, you are shown a menu of all computations and asked to select one. If only one computational field exists, it is automatically used and no prompt is issued. Linking from <file> to <file> Linking from data set MEMBERSHIP to data set ACCT-HISTORY ———————————————————————————— IS THERE A DEFINED PATH BETWEEN DATA SETS (Y/n)? [n ] If both the “from” file and the “to” files are data sets in the same data base, the program can often automatically determine a path between the two data sets. This path is often defined as part of the data base structure, as in a master-detail relationship. Enter “Y” if you want to use the defined path, or enter “n” if you want to specify a custom linkage. Linking from file COUNTRYS to file STATES ———————————————————————————— 1: COUNTRY 3:CAPITAL 5:AREA 2: COUNTRY-NAME4:POPULATION ———————————————————————————— SELECT THE LINK FIELD from COUNTRYS [1 ] If a defined path between two files does not exist, or you specified that you did not want to use the defined path, you must choose a field from each file to use as the linkage between the files. Enter the number of the field to use to link the “from” file to the “to” file. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 69 Creating procedures from Eloquence MBF-UDALink If only one key exists, it is automatically used and you are not prompted. Linking from file COUNTRYS to file STATES ———————————————————————————— 1:*COUNTRY 3:STATE-NAME 5:POPULATION 2:*STATE 4:CAPITAL 6:AREA ———————————————————————————— SELECT THE KEY FIELD from STATES [1 ] SELECT THE KEY FIELD from “to” file [1 ] Enter the number of the field to be used as a key into this file. The values in this field is compared to the values from the link field in the previous file to determine matching entries (i.e. to form a “path” between the files). 70 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating procedures from Eloquence Procedure Preparation Phase PROCEDURE PREPARATION PHASE ———————————————————————————— ALTERNATE NAMES FOR SELECTION FIELDS (n/Y)?[y ] EDIT NAMES/LOCATIONS OF DATA BASES AND FILES (N/y)?[y ] <Output file format options> RUN THE PROCEDURE (Y/n)?[y ] SAVE CURRENT PROCEDURE (Y/n)?[y ] RETURN TO FIELD SELECTION MENU (N/y)?[y ] These are all of the messages and prompts for the PROCEDURE PREPARATION PHASE menu. The screen is cleared for each prompt, which appears at the top of the display. Entering “Y” to any of these prompts invokes a new menu, which returns here for the next prompt in the series. ALTERNATE NAMES FOR SELECTION FIELDS (n/Y)? [y ] If any selection fields were specified, you receive this prompt. Enter “Y” to customize the selection criteria prompts that appear when the procedure is executed; this will enter the “Alternate names for selection criteria” menu, then return here for the next prompt. ———————————————————————————— EXPIRY-DATE [Expire Date (YYMMDD) <selection field name> [ ] ] For each field specified as a selection field, you can enter a custom message to be displayed when prompting for selection criteria. Enter the message you want to use, or press <RETURN> to use the name of the field for the prompt message. To change this prompt later, use the “FIELD ENTRY PROMPT” of the “EDIT field names and definitions” menu, under MODIFY a procedure. For example, the default message for the EXPIRY-DATE field is: ENTER SELECTION CRITERIA FOR THE FOLLOWING FIELDS: EXPIRY-DATE[ ] If you entered the custom message shown above, the prompt you see at run time is: ENTER SELECTION CRITERIA FOR THE FOLLOWING FIELDS: Expire Date (YYMMDD)[ MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 ] 71 Creating procedures from Eloquence MBF-UDALink EDIT NAMES/LOCATIONS OF DATA BASES AND FILES (N/y)? [y ] You always receive this prompt. Enter “N” if all of the files to be accessed by the procedure are correctly qualified by group and account. Enter “y” to enter the group and account for each file accessed. This will enter the “Edit names/locations” menu, then return here for the next prompt. Enter “Y” if you want to change the location of any data bases or files in the procedure. Each data base or file used is shown, and you may choose to change the location or keep the current setting. Edit names/locations of data bases and files ———————————————————————————— Procedure using data base MEMBER Edit data base location (Y/n)? [y ] GROUP name [ ACCOUNT name[ ] ] If no location is specified, Reporter assumes it is in the local group. If you will be logging on to a different group and account when running this procedure, you must specify the location of the data bases or files. This prompt may also be used to change the location of a data base to be used in running the procedure, in the case where a procedure is built from a test data base, but will be run against a production data base that is not currently available. The location can also be changed in MODIFY a procedure. Edit <type of file> location (Y/n)? [y ] The name and type of file appears (data sets are not prompted for separately, only the data base that contains them) and this is followed by a prompt asking if this particular file is correctly qualified. Enter “n” to receive prompts for group and account. 72 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating procedures from Eloquence Specify the output file format The output file format menu is controlled by the installation menu prompt “OUTPUT FORMAT CATALOG” in Maintenance. If set to YES, the application menu shown below appears. Select a format and proceed as described in the previous section. ENTER AN OPTION NUMBER[ ] If you enter a value here, the procedure always creates an output file with the corresponding format. If you leave it blank, Reporter asks at run time what format you would like for this execution of the procedure. This option is the most flexible: you can create a report listing to see if the correct data has been selected and then, without re-running the procedure, reformat the output as many times as you want and download it to your PC and/or save it on the HP e3000. Note: Options surrounded by “[...............]” are not installed in your version of the product. Creating a special output format If the list of formats does not contain the format you need, you can generate a custom format. Enter “0” as the desired option and the menu shown below appears: Output file format options ———————————————————————————— 1: No data field delimiter character 2: Data fields delimited by commas 3: Data fields delimited by tab codes 4: Specify a data field delimiter character ———————————————————————————— ENTER AN OPTION NUMBER [ ] Depending on the delimiter chosen, several additional prompts are displayed to control the format of the output data file. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 73 Creating procedures from Eloquence MBF-UDALink NUMERICS LEFT JUSTIFIED (N/y)? [ ] With option 1, enter “N” if numeric fields are to be right justified with leading zeros (e.g.: for use in loading data bases, graphic routines, etc.); enter “y” to left-justify them without leading zeros. ASCII OR EBCDIC CHARACTER SET (A/e)? [ ] With options 2, 3 and 4, enter “A” if the output file should be in the ASCII character set (HP e3000 compatible); enter “e” for EBCDIC (IBM main-frame). TEXT FIELDS IN QUOTATION MARKS (N/y)? [ ] With all options, enter “y” if quotation marks (“) should be placed around character strings in the output file; enter ”N” if no quotation marks should appear. Quotation marks are required by certain PC applications such as LOTUS, dBASE and WordPerfect. Enter ‘1’ to get CR/LF as the delimiter ENTER DELIMITER CHARACTER [ ] With option 4, enter the character to be used to delimit data fields in output file records. The character may be the character itself or its decimal equivalent ASCII code. ASCII must be used for non-printing characters (e.g.: tab code) or ‘ambiguous’ characters (e.g.: “?” which will invoke a help message; “/” which will step back a prompt; or a digit that will be interpreted as the decimal code rather than an ASCII character). Enter “1” to use a carriage return and line feed as the field delimiter. RUN THE PROCEDURE (Y/n)? [y ] Enter “Y” to run the procedure; this will enter the “PROCEDURE EXECUTION PHASE” menu, then return here for the next prompt. SAVE CURRENT PROCEDURE (Y/n)? [y ] Enter “Y” to save the new procedure; this will enter the “SAVE THE PROCEDURE” menu, then return here for the next prompt. 74 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink SQL Interface Overview The SQL interface SQL Interface Overview The SQL interface appears in Reporter menus in several places: The Reporter program - In creating procedures, the SQL interface menu is available to prompt for SQL product and database names. The MBF-UDALink Manager program - The interface can be turned off at the system level or on a user-by-user basis. Note: This discussion assumes you have a working knowledge of SQL.. Creating a procedure with an SQL interface When you enter the CREATE a new procedure menu item on the Main Menu, you see an additional choice for the source of file and field definitions. Enter the menu number for the SQL option. If you only have one SQL interface, its name appears on the CREATE menu. Enter the number of the SQL interface you want to use. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 75 Creating a procedure with an SQL interface MBF-UDALink The Allbase SQL interface Enter the name of the SQL database environment you want to access. You are presented with a list of tables in the database environment. Considerations 76 • Tables are selected from the database environment. • Columns are selected from tables. • Tables can be linked to other tables if they are in the same database environment. • SQL has its own set of data types. Reporter automatically maps these data types to those used by other definition sources. For example, an SQL variable length string is treated as an “X” string with length equal to the maximum length of the SQL field. • Some SQL data types are not appropriate in an Reporter environment and are enclosed in brackets [ ] on the column menu. Selecting these items generates an error message. • Reporter supports multi-field joins when linking files. In file linkage, when prompted for the “link from” field, enter the field numbers from the “from” file, separated by commas. Reporter prompts for the corresponding “link to” fields. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a procedure with an SQL interface An SQL example When you choose the “CREATE a new procedure” item on the Main Menu, you see the Allbase/ SQL choice for file and field definitions, if the Allbase/SQL interface is installed. This example shows you how to create an Allbase/SQL procedure, linking three tables from MembrDBE. Enter the menu number for the Allbase/SQL option. Enter the name of the Allbase/SQL database environment to access. This screen shows the tables available in the MembrDBE environment. For this example, select tables 9, 11, and 17. You are then prompted for the fields to include from each of the three selected tables. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 77 Creating a procedure with an SQL interface MBF-UDALink You are the prompted to define the output specifications for the query, including the order in which you want the files accessed, and the field linkages you intend to use. 78 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a procedure with an SQL interface Once links and key fields are selected, continue through the output file decisions. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 79 Creating a procedure with an SQL interface 80 MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating FILE definitions FDGEN Creating FILE definitions 1: ENTER your own file definitions Select this option to define the record layout for a file that should be accessed in this procedure. 2: Use File-Definition (FD) file Select this option if the file definitions have been stored in a file definition (FD) file. 5: Use MBF-Subfile Select this option to access a MBF-Subfile. This type of file is produced by Reporter and contains all the field definition information used by Reporter. It is often used as an intermediate file between two or more Reporter procedures. ENTER your own file definitions You can enter the definition of each file separately in this section or use an EDITOR program to create a file with definitions for multiple files. This file is compiled with the utility program FDGEN. See the MBF-UDALink Administration Manual for a complete description of FDGEN. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 81 ENTER your own file definitions MBF-UDALink This menu allows you to define a file definition. Once the definition is complete you can continue to create the procedure. If you saved the file definition file, you can re-use it when you create a procedure. FILE name [ ] Enter the name of the file for which you are going to describe the record layout. You must define all fields from the start of the record to the last field needed for reference. The following rules govern creation of an FD file: •To correctly access the file, you must enter field definitions that account for every byte of storage up to, and including, the last field that you want to read in the record. • Fields must be defined in the order they appear in a record, from first byte to last. • Each field must begin immediately following the last byte of the previous field. Fields cannot overlap or be contained by another field. Entering field definitions The next four or five prompts will repeat, allowing you to enter the fields that occur in each record of the file. Unless you created this file yourself, you may have to refer to additional documentation such as the printout of the COBOL Data Division entry for a file in order to use this option. FIELD NAME [ ] Enter the name you want to use when referring to this field. When all fields have been defined, press Return to terminate the prompt sequence. DATA TYPE [ ] Enter the code for the data representation of the field. You can only change the way Reporter interprets the physical representation of the data. For example, if a date is a zoned numeric or character string of length 6, you can define it as Z(6), X(6) or DY where the latter data type will tell Reporter to apply date properties to it. To change the physical representation of the data, create a computational field. 82 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink DECIMAL PLACES(0) [ ENTER your own file definitions ] Enter the number of decimal places in the field (only for numeric data types). FIELD STORAGE LENGTH [ ] Enter the length of the field in bytes (characters). OCCURRENCE COUNT(1) [ ] Enter the number of times this field is to be repeated. Normally this value is 1. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 83 ENTER your own file definitions MBF-UDALink Saving the file definition When all the fields have been defined you have the option of saving the file definition for future use. The next time you want to access this file, go directly to the “Use File Definition(FD) file menu” and enter the name of the saved FD file. SAVE DEFINITIONS IN AN FD FILE (N/y)? [ ] Enter “Y” to be prompted for the name to be used for saving the FD file. Enter “N” or Return if you do not want to save the file definition. You will then see the “columns in FD file.....” menu and may continue to create the procedure. NOTE: We recommend that you save the FD files because you will not be able to add fields from ANY file when modifying the procedure if you do not have access to this definition source. FD FILE NAME [ ] Enter the name of the FD file to save in your current directory. Use File Definition (FD) file Enter the name of the file that contains the description of the file you want to access. If the FD file name entered contains the definition of only one file, you will automatically proceed to the menu “columns in <type of file><name>”. If the FD file contains the definitions of multiple files, you will first see a menu of file names, from which you can select the file you want to read. The menu heading will be “Files in FD file <name>”. Select the file to be read in the same manner as described under “Tables in data base <name>”. 84 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ENTER your own file definitions Tables in data base <name> This menu will display all the tables in the database you selected. ENTER TABLE SELECTION [8,10 ] Enter the numbers of the tables from which you want to select fields, separated by commas, or as a range separated by a slash (/). The names of the fields in each table will be displayed in turn, allowing you to select the fields you want. As fields are selected they are added to the working set that will be displayed on the screen after all file and tables menus have been displayed. The order in which fields are selected will be the default order in the report or download file but this order can be changed in the INCLUDE IN OUTPUT prompt. If there are too many files to be displayed on one screen, the list of files will be broken into a series of menus. Press Return to move between the menus. Columns in <type of file> <name> This menu is a basic menu type and is the end result of selecting any type of file that contains fields. The title of the menu will show the name and type of file from which the list of fields originates. ENTER DATA FIELD SELECTION [1/ 3,9,11,13/14 ] Enter the numbers of the fields you want to access, separated by commas, or as a range separated by a slash (/). By selecting fields from a table or file, you build the working set of fields for the procedure. When selecting fields from more than one file or table, you may encounter fields with the same name. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 85 ENTER your own file definitions MBF-UDALink The prompts shown below will be displayed for each field where a field with the same name has already been selected. If there are too many fields to be displayed on one screen, the list of fields will be broken into a series of menus. Press Return to move between the menus or use the navigational commands described else where in this manual. REGION FIELD HAS ALREADY BEEN SELECTED DELETE THIS DUPLICATE NAME (N/y)? [ ] Enter “Y” if the field is a duplicate and you do not want two occurrences of the field in the output. For example, the key fields from two files may both be accidentally selected for output and the second occurrence may be deleted. Enter “N” or press Return if the duplicate is valid. For example, in a sales history database you can select the field SALESREP from two tables. This prompt will occur and you have the option of deleting the second instance if it is a duplicate or keeping it if one occurrence was the original salesrep on the account and the second was the current salesrep. Define output specifications This menu displays all of the columns currently selected for use by the new procedure. These fields will be shown in the order in which they were selected and they will be numbered sequentially. The next three sets of prompts are repeated until you answer “N” to all of them. ADD MORE FIELDS OR FILES FOR SELECTION (N/y)? [ ] Enter “Y” to include columns from other tables or files, or if you need additional files from the current dataset. Enter “N” or Return to continue. EDIT FIELD DEFINITIONS (N/y)? [ ] Enter “Y” to re-specify the data type of a field or specify the number of decimal places for numeric items. Enter “N” or press Return to continue. 86 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ENTER your own file definitions ADD ANY COMPUTATIONAL FIELDS (N/y)? [ ] Enter “Y” to define your own data fields. Adding files for selection When you enter the option to select more files, the original menu is re-displayed. Select additional files in the same manner. If you select a file that was selected previously, Reporter will add the additional fields to the working set but not add an additional file to the access path. Editing field definitions ENTER A FIELD NUMBER [ ] Enter the menu number for the field you want to edit. This prompt will repeat until you press the Return key, to indicate you are finished editing fields. Note: You must enter one of the numbers from the menu above; otherwise, pressing Return ends the edit process. DATA TYPE (X&) [ ] The current data type is shown in parentheses. Enter a valid data type or press the Return key to keep the current setting. To indicate the field contains a date, enter one of the Reporter date types or “&” to indicate a date subtype will be entered next. DATA SUBTYPE [ ] To indicate the storage format of the date field, enter one of the date subtypes discussed in this manual. This is what is actually stored in the computer, not the format you want in your output. DECIMAL PLACES (0) [ ] If a field that is to be used as a value is selected, you will be prompted for decimal places. The current number of decimal places is shown in parentheses. Enter the number of decimals the field actually contains or press the Return key to keep the current setting. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 87 MAINTAIN an existing procedure MBF-UDALink Maintaining and modifying procedures MAINTAIN an existing procedure If you make structural changes to a database (for example, deleting, adding, repositioning or renaming fields in the database), the procedures or Views that access these databases MUST be modified accordingly. This menu allows you to change procedures, and to save and delete procedures. 1: REVIEW procedure definitions Display the complete definition of a procedure. You can review all procedures you created or to which you have been given access. You can review a procedure before you save it. You can send the report to a printer or display it on the terminal. 2: MODIFY procedure definitions This option allows you to enter the procedure modification submenu, to alter the specifications of a procedure. : SAVE the procedure This option allows you to save a procedure you have just created into any procedure catalog. You will be asked to enter a name for the procedure and a description. You will also be asked to specify which users will be able to access this procedure. If you try to save a procedure with a name that already exists, you will be asked if you want to replace the old procedure with the new one. 4: DELETE an existing procedure This allows you to delete any procedure you created. You will be asked to confirm each deletion. The deletion is logical rather than physical. The procedure is flagged as being deleted but not physically removed until the next compaction of the procedure catalog. As the procedure catalog may be compacted automatically when full, if you want to recover a deleted procedure, contact your System Administrator as soon as possible. 88 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink REVIEW procedure definitions REVIEW procedure definitions If an existing procedure (or a newly defined entry) is currently loaded, you can press Return to review it. Otherwise, enter the name of the procedure to be reviewed. Catalog directory Enter the name of the file group in which the catalog resides. Enter Return to indicate your logon file group. The Procedure Review report lists a complete definition of a procedure. If this report is printed to the system printer, it prints in its entirety without interruption. If this report is displayed to the terminal, it is displayed in a series of “pages” that can be reviewed using the standard report techniques. The Procedure Review heading includes the procedure name. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 89 REVIEW procedure definitions MBF-UDALink The Procedure Review body contains: 90 • OUTPUT FILE FORMAT: The output file format created by this procedure. • OUTPUT FILE LAYOUT: The fields in the output file are listed in order of appearance in the file. If detail records are suppressed for the output, the names of all numeric fields that are summarized will be enclosed in parentheses. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink REVIEW procedure definitions • SORTED BY: Sort fields are listed in the order to be sorted, from “major” to “minor”. If a field is to be sorted in descending sequence, the field name will be marked <descending>. If a field is used as a pre-sort field, it will be marked <presorted>. • SUMMARIZED BY: A list of summary functions taken at the control breaks. • SELECTED BY: The fields specified for selection are listed in the order that the prompts will appear. If selection criteria was embedded in the procedure, the selection values will be shown. • COMPUTED FIELDS: Computed fields are listed in the order of their declaration, showing the computational expression used to derive them. • FILE ACCESS PATH: All files used are listed in the order they will be accessed. All fields to be accessed in each file are listed with each file entry. This includes all fields specified by the user, plus all linkage fields. • FIELD DEFINITIONS: Fields are listed alphabetically, showing file names, edit masks, field headings, etc. • FILE DEFINITIONS: Files are listed alphabetically, showing dictionary source where appropriate. In the Procedure Review footing: • <description> The description that was entered when the procedure was saved is shown. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 91 MODIFY procedure definitions MBF-UDALink MODIFY procedure definitions MODIFY name [ ] Enter the name of the entry you want to MODIFY. This will show you the entry specifications and allow you to modify parts of them. Catalog directory Enter the name of the file group in which the catalog resides. Enter Return to indicate your logon file group. If there is an active (or newly defined) procedure, its name will be displayed in the prompt. Press Return to modify it. To modify a different procedure, enter its name. If the procedure is not in your local catalog, you can specify the location of the catalog. You must have access rights to the procedure to save the modified version; otherwise, save it under a new name. Once you have entered all of the modifications to a procedure, you can save the changes. 92 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Selecting what to modify Selecting what to modify This menu allows you to select the areas you want to modify. 1: EDIT attributes names and This allows you to change the name and location of any database, table, or file used in this procedure; to change the access password; and to change the names and definitions of any fields in the procedure. 2: DELETE computational fields This allows you to delete computational fields. Computational fields that appear in the output cannot be deleted at this prompt. 3: CHANGE procedure specifications This allows you to add more fields from existing or new files, to add computational fields and to change the fields that are included in an output file. You can also change the way the file is sorted, the control breaks and built-in functions used, and the selection criteria. 4: CHANGE output file format This allows you to select a different output file format. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 93 EDIT names and attributes MBF-UDALink EDIT names and attributes 1: Data Base Environment, userid and password This allows you to change the name of a database environment, the user ID and the password used to access it. 2: Table/SET Names This allows you to change the name of any tables used in the procedure. 4: FIELD definitions names and This allows you to change the name of a field and its definitions. (The definition means the type and size information for the field.) 5. DICTIONARY names and locations Select this option to change the name and location of any dictionary database or file used in creating the procedure. Note: Not all of these options will appear on your menu if the procedure you are modifying does not contain all of these types of entities. 94 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Data Base Environment, userid and password Data Base Environment, userid and password Enter 1 to modify the database name. MENU name [ ACTUAL name [ ] ] The prompt line displays the current information about a database used in this procedure. If the name has changed, enter the new name for the base. Table/Set names Enter 2 to modify the names of tables/sets. This prompt will only appear if there are more than two tables referenced in the procedure. MENU name: MEMBERSHIP ACTUAL name [ ] Specify the new name for the table(s) at the prompts provided. Tables will be shown one at a time so that necessary changes can be made. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 95 FIELD names and definitions MBF-UDALink FIELD names and definitions Enter the field numbers for any of the fields you want to change, separated by commas. You can enter a range of field numbers by separating two field numbers by a “/” as in “3/ 5”. Each field you specify will be displayed, one at a time, so that you can make all required changes. MENU name [ ACTUAL name [ ] ] Enter a menu name up to 20 characters long, including embedded blanks. This name will appear in menus and as the prompt for selection values if the LOGICAL MENU ITEM NAMES prompt in the MODIFIABLE default user parameters menu of MBF-UDALink Manager is set to YES. DATA TYPE (Z) [ ] Enter a code that specifies the appropriate data representation of the field. A plus sign (+) following numeric data types is optional and, if present, indicates that the number can contain only positive values. DECIMAL PLACES(0) [ ] Enter the number of decimal places. This prompt will only appear for numeric data types. FIELD STORAGE LENGTH (6) [ ] Enter the actual amount of computer storage needed to represent the data item to the computer or enter Return to accept the default. This length is only changed when the actual file or table length is changed. 96 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink FIELD names and definitions FIELD DISPLAY LENGTH (6) [ ] Enter the maximum number of characters to be displayed for a field. You might do this if a field is 50 characters long, but the first 20 characters are all you really need. For numeric fields, the default value for display is one greater than the storage size, to allow for the display of a negative sign. OCCURRENCE COUNT (1) [ ] Enter the number of times this field repeats in the file. FIELD ENTRY PROMPT [ ] Enter the name that you want displayed if this field is used as a selection field. FIELD HEADING [ ] Enter a text string to be used as the heading for this field. To create a multi-line heading, enter a “^” in the heading at the point where a new heading line should start (for example, “ACCOUNT^NUMBER”). Enter Return to leave any existing heading text. Enter one space to eliminate a heading for the field. FIELD EDIT MASK [ ] Enter an edit mask to be applied to each value for this field. Enter Return to leave an existing edit mask in place. Enter one space to erase the edit mask. DATE DISPLAY FORMAT [ ] Any field having a date type or subtype will be prompted for DATE DISPLAY FORMAT rather than EDIT MASK. The format indicates how the date value is to be displayed on a report listing (if it is to be different from the storage format). MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 97 CHANGE procedure specifications MBF-UDALink CHANGE procedure specifications Change procedure specification includes the ability to: • add new fields and files from any source • add/delete computational fields • change file linkages • change items in output format • change sort sequence • change selection criteria • suppress/enable detail records You will be prompted through the process in the same manner as you would be for procedure creation. Make the appropriate modifications as you are prompted through the procedure. NOTE: Computational fields added through this menu are not automatically added to the output file. New computational fields can be used to hold interim calculations for other computational fields and may not be required in the output file. Computational fields that are to appear in the output file should be added through the INCLUDE IN OUTPUT prompt in the CHANGE output file specifications menu. The specifications originally entered are shown above each prompt. Once you enter a change that makes any part of the original specification illogical, the original specification is not shown. For 98 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ADD additional computational fields example, if in your modification you removed the sort on a field used as a summary field in the original report, it will not be shown in the specifications above the “summarize by” prompt because it can no longer be used as a summary field. Note: If you do not change the order of any linked fields, you will not be prompted for linkage fields. If you make any changes, you will be prompted for all file linkage information. ADD additional computational fields A computational field is a column defined in a procedure or data view. It can be any data type, can be used to define other computational fields, can be written to a report or output file and can be used as the link field when linking files. Computational fields can be defined when the procedure or data view is created or added later. In all cases, the basic prompt sequence is the same: NEW FIELD NAME [ ] Enter a name for the computational field. This adds a new column to the end of the list of columns you have selected from tables and files. It is always numbered one greater than the last. You can use this feature to base new computational fields on previous computational fields you have declared. Pressing Return terminates the entry of computational fields. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 99 ADD additional computational fields MBF-UDALink COMPUTATIONAL EXPRESSION [ ] Enter the combination of field numbers, string and numeric constants and built-in functions to be used to calculate the value for this field. A complete discussion of computational expressions follows the descriptions of the prompts. For the remaining prompts, the program will analyze the computational expression you have entered and will determine suggested values. Often no change is required to these suggested values. Situations where you might want to change the suggested values include: • matching the data type and storage length of a key field that is to be used to link one file to another • converting several bytes from a character string to a numeric for use in arithmetic calculations • creating a field with a specific data type and storage length for an undelimited ASCII output file DATA TYPE (Z) [ ] Enter a code that specifies the appropriate data representation of the field. A plus sign (+) following numeric data types is optional and, if present, indicates that the number can contain only positive values. DECIMAL PLACES (2) [ ] Enter the number of decimal positions in the number. As this is only meaningful for numeric data types, it will only be prompted for if you have specified a numeric data type. FIELD STORAGE LENGTH (8) [ ] Enter the actual amount of computer storage needed to represent the column in bytes. OCCURRENCE COUNT (1) [ ] Enter the number of times this column repeats (occurs). For example, for multiple address lines, enter <cr> to use the default of 1. This prompt will not occur if the target item is a date type or if the computed item is the result of an if-then-else computation. The value is always placed in the first occurrence of the array. 100 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink FIELD CONVERSION/MAPPING (C/m)? [ ADD additional computational fields ] This prompt will occur if there is only one field of type X or U in the computational expression and the data type for the computed field is specified as a numeric type, or if the computational expression contains a numeric field and the data type for the computed field is non-numeric. Enter “C” to have the data converted to the numeric type. Enter “M” if the numeric data is stored in the field and just needs to be mapped (moved). The mapping situation can arise in databases when the data portion of a record has been defined as one string, and the contents of the record have been overlaid into this string with programs. These “hidden” fields can be mapped into computational fields when creating procedures. For example, an X(24) field may actually be 12 integers containing values for some columns for the months of the year. If this field is menu item 4 and you want to extract the third month, enter 4[5:2] into the computational expression, “I” as the data type and “M” as the response to this prompt. The integer embedded in the character will be moved to the integer variable, not converted. If mapping rather than conversion has been specified for a field value assignment, the Review listing will show “=>” instead of “=” to indicate that mapping will be performed on this computed field. Note: Computational fields added through this menu are not automatically added to the view. New computational fields can be used to hold interim calculations for other computational fields, and may not be required in the view. Computational fields that are to appear in the view should be added through the INCLUDE IN VIEW prompt. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 101 CHANGE output file specifications MBF-UDALink CHANGE output file specifications The specifications originally entered are shown above the Modify prompt. In this example, the Output order has been changed. This is accomplished by moving the cursor with the space bar until it is under where the change is to take place, then enter the required information. It is also possible to delete and/or insert new files. The following sub-commands can be used in the modify line. They can be upper- or lowercase. • D - Delete the characters from the current line that are above each D. The Ds can be followed by I or R subcommands. • D> - Delete from the current position to the end of the current line. The D> can be followed by I or R subcommands. If the D is in column 1, the line is blanked unless followed by I or R subcommands • I - Insert the text following the I, up to the end of the edit line. The text is inserted in the current line at the position of the I. • R - Replace. The text following the R will replace the current line, starting at the R. Note: Any text that does not start with D, R, I or ">" is treated the same as R… • >D - Delete from the end of the current line, right-to-left. The >Ds can be followed by I or R subcommands. If not followed by I or R subcommands, the result is the removal of the last character (or characters if multiple Ds are used). • >R - Replace the end of the current line with the text following the >R. The last character of the text following >R will replace the last character of the current line. • >I - Append the following text to the end of the current line. Note: Any text that does not start with >D, >R or >I is treated he same as >I… 102 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink CHANGE output file format CHANGE output file format Enter the number of the output file format. NOTE: Press Return to change the format to runtime decision. If you decide not to change the output file format, you must re-enter the original output file format. Saving a modified procedure When you have finished making changes, you are given the opportunity to save the modified procedure either under the same or a new name. Enter “Y” to save the modified procedure or “N” to cancel the changes and return to the MAINTAIN an existing procedure menu. This menu allows you to save the modified procedure into a catalog in this account. The prompts are identical to those explained in the next section except that, being an existing procedure, it has values already established for the prompts. These existing values are displayed above the prompt. Press Return to keep the existing value, or enter a new one. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 103 Saving a modified procedure MBF-UDALink To save the procedure into a catalog in a different group, enter “N” to PURGE OLD ENTRY and this sequence of prompts will be repeated. If you re-enter the same name, the last prompt will be changed to SAVE entry into local catalog, which will allow you to save the procedure in another location, preserving the original. SAVE the procedure This menu allows you to save the procedure into a catalog. SAVE name [TEST ] Enter a name for this procedure. The name can be up to 10 characters long but may not contain embedded blanks. If you save the procedure with the name of an existing procedure, you will be warned that the name exists and be given the option of overwriting the existing procedure. DESCRIPTION [ ] Enter a description for this procedure. This description is displayed as part of the Procedure Catalog Report and on all procedure listings. ENTRY ACCESS BY USER [ ] You must also specify which users have access to this procedure. The values you can specify are: 104 <RETURN> Leave current setting. {user-id} Allow {User ID} to also access this procedure. * Allow all users who can access this catalog to access this procedure. blank Remove a user ID “*” Access and restrict access to the creator. {class name] User class name if Profiles is installed. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Saving a modified procedure ENTRY PASSWORD [ ] You can provide a password for this procedure that must be entered whenever the procedure is referenced. Catalog Directory[ ] Enter the name of the directory in which the catalog resides. Enter Return to indicate your logon file directory. CATALOG ENTRY ALREADY EXISTS, PURGE OLD ENTRY (N/y)? [ ] A procedure with this name already exists in the procedure catalog you specified. Enter “Y” to overwrite it. Enter “N” or Return to specify a new name or a different procedure catalog. ENTRY SAVED IN CATALOG Your procedure has been saved. DELETE an existing procedure A user with “AM” capability can delete any procedure in this account. A user with “SM” capability can delete any procedure in any account. This menu allows you to delete procedures. You can only delete procedures you created unless you have AM or SM capability. DELETE name [ ] Specify the name of a procedure to be deleted. DELETE entry from local catalog (Y/n)? [ ] If this procedure is not in the local catalog, specify its location. CONFIRM TO DELETE ENTRY (N/y)? [ ] Enter “y” to confirm the deletion of the procedure. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 105 Saving a modified procedure MBF-UDALink ANY MORE ENTRIES TO DELETE (N/y)? [ ] If you have more procedures to delete, enter “y”, otherwise press <RETURN> to return to the main menu of the maintenance section. Note: Procedures are ‘logically’ rather than ‘physically’ deleted. Procedures marked for deletion are physically removed from the procedure catalog when it is compacted. See the procedure catalog maintenance section of the Maintenance program in the Administration Guide. 106 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Types of computationals Computational expressions Types of computationals There are two types of computational expressions: simple The value is a combination of other fields in the menu. conditional The value is a combination of other fields in the menu but the value of the computation may be different based on the contents of one or more of the fields in the menu. For a simple computational expression, enter a numeric expression or a string expression, which takes the general form of: Field number or constant <operator> Field number or constant A field number is the number of the item as it appears in the item list of the menu display. A constant is a number or a string. To distinguish between field numbers (which are always integers) and numeric constants, enter numeric constants with a decimal point. For example, 3 + 1.0 will add the value 1.0 to the contents of field number 3. String constants must always be enclosed in quotes. An operator must be an arithmetic operator if the fields in the expression are of a numeric data type, or must be a string operator if the fields in the expression are string data types. You cannot perform arithmetic operations on string data types. There are two special operators, PERCENT and RATIO, which calculate the percent or ratio of a field value against the total of that field at a control break. The arithmetic operators and their meanings are: + add - subtract * multiply / divide, giving the quotient // divide, giving the remainder ** exponentiate MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 107 Types of computationals MBF-UDALink Arithmetic operations are divided into three groups and are performed from left to right by group, and left to right in each group, in the following order: exponentiation multiplication and division addition and subtraction You can vary the order of operations by using parentheses to group expressions. For example: (3 + 5) * 34. add the contents of fields 3 and 5 before multiplying by 34. The string operators and their meanings are: + concatenate with trailing blanks “AR ” + “X” will create a string “AR X” * concatenate suppressing trailing blanks “JOHN ” * “ ” + “DOE” will create a string “JOHN DOE” - remove all occurrences of a string *ALPHABETICAL” - “A” will create a string “LPHBETICL” If no preceding field exists, to change the field justification: - “RIGHT” will create a string “....RIGHT”. If the field is already right-justified, then it will become left-justified. A continuation line prompt is issued if the computational expression ends with an arithmetic or string operator. 108 NEW FIELD NAME [Name ] COMPUTATIONAL EXPRESSION [2 * ] (continuation line) [“ ” + 3 ] MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Types of computationals The percent and ratio operators To include a field in a report indicating which percentage or ratio a value is of its total (or subtotal if specified), create a computational field: • When asked for a computational expression, enter the field number for which the percentage or ratio is to be calculated, followed by a “P” for Percent or “R” for ratio. • Include the computational field at the INCLUDE IN OUTPUT prompt. • No other field reference or literal may appear in the same computational expression as the “P” or “R” operator. • A computational field with a “P” or “R” reference cannot be used as a Sort or Selection field. For example, if BALANCE is field number 3 on the menu and you want to calculate the percentage each region’s BALANCE is of the total, the computational field would look like this: NEW FIELD NAME [Percent COMPUTATIONAL EXPRESSION [3P DATA TYPE (I) [ DECIMAL PLACES (2) [ ] FIELD STORAGE LENGTH (4) [ ] OCCURRENCE COUNT (1) [ ] ] ] ] In the summary specifications for the procedure, include this field at the levels you want the percents. The resulting report might look something like this: REGION BALANCE Percent —————————————————————————————— CE 112.50 21.52 EA 262.50 50.22 MO 25.00 4.78 PA 122.50 23.43 552.50 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 109 Types of computationals MBF-UDALink Substring and subfield manipulation Substring manipulation allows you to select either a single character or a group of characters from a string, or bit extraction from a numeric field. This is specified by: • <field number>[<starting position:length>] where the brackets “[” and “]” are required characters For example, 3[5:6] will select data from field 3 starting at position 5 for 6 bytes. The program will check that the string is long enough. • Bit extraction is available for numeric fields using the same type of expression as for substring extraction. For example, “5[6:4]” means extract 4 bits starting at bit 6 if field 5. This assumes the first byte/bit is numbered 1. Subfield manipulation allows you to select specific information from repeating items (i.e., an item that has an occurrence count greater than 1). This is specified by: • <field number>[<occurrence>] (where the brackets “[” and “]” are required characters) For example, 7[5] will select the fifth occurrence of field number 7. The program will check that field 7 has at least 5 occurrences. To compare two fields, enter one field number in the “when to use” and, when prompted for comparison value, enter the second field number preceded by a “$”. Operators such as “>” and “<” can also be used. If the selection criteria for the first expression is not satisfied, the second will be evaluated and, if satisfied, the computational field will be assigned the value of COMPUTATIONAL EXPRESSION(2). This process continues until the selection criteria are satisfied or until the last or default expression is reached. Note: If there is no default value for the computational expression, the computational field retains the value previously calculated. Default values are recommended to prevent confusion unless you specifically want to carry over the value from the previous calculation. 110 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Types of computationals As an example, using the MembrDBE database in the demo system, assume that you want to develop a new region code based on the values of the current REGION and TYPE codes in the MEMBERSHIP table. • All memberships with TYPE = CORP will be brought into a new “national” region. • The Pacific and Mountain regions will be renamed the “western” region. • The Eastern and Central regions will be combined into “eastern” except for the senior and student members. • Any members not in one of the above categories will come under a “special” region. Conditional expressions A conditional expression allows the value of a computational field to be based on the value of other fields in the output file. A conditional specification is of the form: NEW FIELD NAME [new field COMPUTATIONAL EXPRESSION [calculation IF when to use calculation] <connector> field 1 name [ ] field 2 name [ ] COMPUTATIONAL EXPRESSION (2) <connector> ] [calculation IF when to use calculation] field 1 name [ ] field 2 name [ ] (as many levels as are needed) The calculation is set up the same way as for the simple computational field: a series of field numbers linked together to form an alphabetic or numeric expression. The “IF” connector allows for the specification of a “when to use” this calculation for the computational expression. The “IF” must be preceded and followed by at least one blank. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 111 Creating computational fields MBF-UDALink The “when to use” expression is a series of field numbers whose value sets will be used to determine if the computational field should be assigned the value calculated by the expression on the left side of the equal sign. The connector between these fields determining when to apply the calculation can be: a comma (,) Indicates an AND condition between the fields. a colon (:) Indicates an OR condition between the fields. As many additional expressions as are required can be added. Entry stops when an expression with no “IF” is entered. The computational field NEW-REGION can be reported or used to create other computational fields. Creating computational fields A computational field is a column defined in a procedure It can be any data type, can be used to define other computational fields, can be written to a report or output file and can be used as the link field when linking files. Computational fields can be defined when the procedure is created or can be added later. In all cases, the basic prompt sequence is the same: 112 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating computational fields Note: This discussion will explain all the prompts that could be displayed at this portion of creating a computation expression. All prompts do not apply in every instance. NEW FIELD NAME [ ] Enter a name for the computational field. This adds a new field to the end of the list of fields you have selected from tables and files. It is always numbered one greater than the last. Use can use this feature to base new computational fields on previous computational fields you have declared. Press Return to terminate the entry of computational fields. COMPUTATIONAL EXPRESSION [ ] Enter the combination of field numbers, string and/or numeric constants and/or built-in functions to be used to calculate the value for this field. A complete discussion of computational expressions follows the descriptions of the prompts. For the remaining prompts, the program will analyze the computational expression you have entered and will determine suggested values. Often no change is required to these suggested values. Situations where you might want to change the suggested values include: • Matching the data type and storage length of a key field that is to be used to link one file to another. • Converting several bytes from a character string to a numeric for use in arithmetic calculations. • Creating a field with a specific data type and storage length for an undelimited ASCII output file. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 113 Creating computational fields MBF-UDALink DATA TYPE (X) [ ] Enter a code which specifies the appropriate data representation of the field. A plus sign (+) following numeric data types is optional and, if present, indicates that the number can contain only positive values. DECIMAL PLACES (2) [ ] Enter the number of decimal positions. As this is only meaningful for numeric data types, it will only be prompted for if you have specified a numeric data type. FIELD STORAGE LENGTH (26) [ ] Enter the actual amount of computer storage needed to represent the field in bytes. OCCURRENCE COUNT (1) [ ] Enter the number of times this field repeats (occurs). For example, for multiple address lines, enter <cr> to use the default of 1. This prompt will not occur if the target item is a date type or if the computed item is the result of an if-then-else computation. The value is always placed in the first occurrence of the array. FIELD CONVERSION/MAPPING (C/m)? [ ] This prompt will occur if there is only one field of type X or U in the computational expression and the data type for the computed field is specified as a numeric type or the computational expression contains a numeric field and the data type for the computed field is non-numeric. Enter “C” to have the data converted to the numeric type. Enter “M” if the numeric data is stored in the field and just needs to be mapped (moved). The mapping situation can arise in databases when the data portion of a record has been defined as one string, and the contents of the record have been overlaid into this string with programs. These “hidden” fields can be mapped into computational fields when creating procedures. For example, an X(24) field may actually be 12 integers containing values for some column for the months of the year. If this field is menu item 4 and you want to extract the third month, enter 4[5:2] into the computational expression, “I” as the data type and “M” as the response to this prompt. The integer embedded in the character will be “moved” to the integer variable, not converted. If mapping rather than conversion has been specified for a field value assignment, the Review listing will show “=>” instead of “=” to indicate that mapping will be performed on this computed field. 114 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Special features for computationals Special features for computationals Entry of value at runtime This function allows a value to be entered at runtime. The data type defaults to X with a length of 10 but the data type and other field attributes can be changed by the user when creating the computed field. When used, this function is the only item that can appear in the computational expression but the computational field itself can be used to create computational fields. $PROMPT - Value supplied by the user at runtime. Entry of a value from a file An initial value for a computational field can be read from a file. The $FILE function has one parameter, the name of the file containing the initial value, in square brackets. The example that follows illustrates reading a control date from a file named FISCAL. Considerations • The computed field can be used in other computations. • The file usually contains one field which can be an alphanumeric, a numeric, or a date field. • If more than one value is contained in the field, sub-string notation can be used to break the field read from the file into multiple computational fields. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 115 Special features for computationals MBF-UDALink • You must know the data type and storage length of the field. • Long text strings can be broken into several records. The file will be read until enough characters have been read to fill the string. The string is padded with spaces if there are not enough characters in the file to fill the string. • The function must be the only item in the computational expression. Convert dollar values to words The $TEXT function converts a numeric value to words for use in check production and other similar applications. If the value converted to words is negative (in most applications negative values would likely not be selected), the text is preceded by the word “minus”; for example, “minus twelve & 50/100”. The default size is 50 characters; if the words generated have more than 50 characters, the output field is filled with “#” characters and an OVERFLOW warning is generated. To right justify the value in the field, enter a “ -” in front of the expression, as shown: COMPUTATIONAL EXPRESSION [ - $TEXT[n] 116 ] MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Report Designer Overview The ReportDesigner option Report Designer Overview One of the output formats of Reporter is the report listing. This listing is broken into page parts if the width of the output is greater than the width of the display terminal. You can scroll through the report listing, backwards and forwards, or go to a specific page and scroll side-to-side through the page parts. The ReportDesigner option allows customization of a report listing online, displaying the results of the changes as they are made. This customization can include: • folding the report line within the display width rather than page parts • creating multiple report images • adding a page heading and footing • page breaks and line spacing on sort fields • reordering or removing columns • altering the default column spacing • setting up different formats for the screen and printer from the same report • adding or changing column headings and edit masks • fixing the location of columns on the report • justifying the data and column headings for each column The ReportDesigner works with all the other options and interfaces to produce the desired report. If column headings and edit masks are built into your source file, there is less customization to do with the ReportDesigner. If you spend more time designing the output file during procedure creation, there is also less formatting to do with the ReportDesigner. You can, however, generate the report listing quickly and do all the formatting in the ReportDesigner. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 117 Designing a report MBF-UDALink Designing a report To use the ReportDesigner, run a procedure that creates a report listing as its output format. Enter “N” at the prompt LIST ON PRINTER to display the report on the screen. Enter “P”, “M” or “T” when the prompt PAGE PARTS, MULTI-LINE OR TRUNCATE appears, so that you can work with the entire report. Enter Designer mode by pressing the DESIGN REPORT (F7) function key, or if your terminal or desktop does not support function keys, entering “D” in response to the PAGE-FORWARD/EXIT prompt. Modify the report format using the GLOBAL and FIELD edit function. When finished, save the format. The report format is saved as part of the procedure definition in the Procedure catalog. Keep in mind that the report definition is a subset of the complete output file format. For example, you can create an output file format containing the name and address as well as other information to be downloaded to an application on your desktop. With ReportDesigner you can also design a report in the same procedure, containing just the name and address information in three-up mail label format and print them on your terminal or desktop printer. The mailing labels and letters are sorted in the same order for ease in matching, and contain exactly the same information, eliminating duplication of effort and the chance of introducing errors by typing. 118 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode Entering Designer mode When a report is displayed on the screen, you can browse it using the standard navigational commands or function keys. F1 FORWARD A PAGE F2 BACK A PAGE INSERT TEXT MULTIPLE LINE PAGE PARTS F3 F4 F5 NUMBER OF PAGE <PART PART> SUPPRESS OR SHOW GROUP FORMAT DETAILED FORMAT DETAIL HEADINGS SUPPRESS OR SHOW LAYOUT PAGE HEADING PAGE FOOTING LAYOUT INSERT TEXT SUPPRESS TITLES SUPPRESS HEADINGS F6 F7 F8 FIELD EDIT EXIT PROMPT MODE NEXT KEYS EXIT DEFAULT ESCAPE EXIT PROMPT MODE NEXT KEYS EXIT DEFAULT ESCAPE EXIT PROMPT MODE NEXT KEYS EXIT DEFAULT ESCAPE EXIT ESCAPE EXIT NEXT KEYS LEFT JUSTIFY FIELD SPACING LINE SPACING PROMPT MODE NEXT KEYS EXIT RIGHT JUSTIFY CENTER JUSTIFY DEFAULT ESCAPE EXIT LINE SPACING PROMPT MODE NEXT KEYS EXIT HEADING JUSTIFY INCREASE DECREASE DEFAULT ESCAPE EXIT HEADING JUSTIFY FIELD JUSTIFY PROMPT MODE NEXT KEYS EXIT INCREASE DECREASE DEFAULT ESCAPE EXIT MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 119 Entering Designer mode MBF-UDALink Field Edit Function Keys F1 FORWARD A PAGE FORWARD F3 F4 F5 F6 BACK A PAGE F2 NUMBER OF PAGE <PART PART> GLOBEL ALIGN FIELD ADJUST FIELD NEXT CHOICE PREVIOUS CHOICE PROMPT MODE NEXT KEYS EXIT BACK REMOVE NEXT CHOICE PREVIOUS CHOICE DEFAULT ESCAPE EXIT ADJUST FIELD NEXT CHOICE PREVIOUS CHOICE PROMPT MODE NEXT KEYS EXIT START POSITION NEXT CHOICE PREVIOUS CHOICE DEFAULT ESCAPE EXIT NEXT CHOICE PREVIOUS CHOICE PROMPT MODE NEXT KEYS EXIT NEXT CHOICE PREVIOUS CHOICE DEFAULT ESCAPE EXIT MOVE FIELD NEW LINE JOIN MOVE FIELD ALIGN FIELD LEFT SHIFT RIGHT SHIFT TRUNGATE F7 F8 EXIT EDIT NEXT KEYS FIELD JUSTIFY HEADING JUSTIFY NEXT CHOICE PREVIOUS CHOICE PROMPT MODE NEXT KEYS EXIT BEFORE FIELD FIELD HEADING NEXT CHOICE PREVIOUS CHOICE DEFAULT ESCAPE EXIT INSERT TEXT HEADING JUSTIFY NEXT CHOICE PREVIOUS CHOICE PROMPT MODE NEXT KEYS EXIT LEFT JUSTIFY RIGHT JUSTIFY NEXT CHOICE PREVIOUS CHOICE DEFAULT ESCAPE EXIT INSERT TEXT FIELD JUSTIFY NEXT CHOICE PREVIOUS CHOICE PROMPT MODE NEXT KEYS EXIT LEFT JUSTIFY RIGHT JUSTIFY NEXT CHOICE PREVIOUS CHOICE DEFAULT ESCAPE EXIT CENTER JUSTIFY NEXT KEYS GROUP EDIT NEXT CHOICE PREVIOUS CHOICE PROMPT MODE NEXT KEYS EXIT DISP/SUP NEXT CHOICE PREVIOUS CHOICE DEFAULT ESCAPE EXIT SORT EDIT NEXT CHOICE PREVIOUS CHOICE PROMPT MODE NEXT KEYS EXIT NEXT CHOICE PREVIOUS CHOICE DEFAULT ESCAPE EXIT PAGE SKIP 120 DOUBLE SKIP LINE SKIP MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode To design the report, press the DESIGN REPORT (F7) function key or enter “D” in response to the prompt. You see a partial page of data with a column number added beneath the column heading of each column. These numbers will continue to increase on page parts although the repeating columns will retain their original column numbers. To modify the report listing: • Press the GLOBAL EDIT function key to enter global format rules to apply to the entire report. OR Press the FIELD EDIT function key to enter format rules for specific fields. Edit rules for an individual field override the rules entered for the global format. • If your terminal does not support function keys, enter “D” to the PAGE-FORWARD/EXIT prompt to display the prompt EDIT FIELD NUMBER. Enter the number of the column you want to edit or “0” (zero) to enter global specifications. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 121 Entering Designer mode MBF-UDALink Entering global format specifications Global format specifications are formatting rules that affect the entire report. Some of these rules can be overridden for individual fields using the FIELD EDIT facility. The first three function keys on each line generate an additional set of function keys. The Next Keys function key displays the keys in the lower image. 122 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode In PROMPT mode, all possible edit prompts for the highlighted field are displayed. The current setting for the prompt is also shown. The function key labels display values that can be selected where possible. CONTINUE - Retain the default value shown and proceed to the next prompt. ESCape - Back up one prompt. EXIT - Accept any changes made so far and return to the GLOBAL/EDIT keys. Layout PAGE PARTS are displayed if the report is in MULTIPLE LINE mode. Press this function key to switch to PAGE PART mode. MULTIPLE LINE are displayed if the report is in PAGE PART mode. Press this function key to switch to MULTIPLE LINE mode. GROUP FORMAT moves control break columns into a header on each section. IMAGES allows multiple images of the data to be displayed across the screen. The following prompts are generated if the number of images is greater than 0 (zero). NUMBER OF IMAGES (0) [ ] Enter the number of repeating images to appear across each page of the output report. To remove the multiple labels, enter 0 or 1. IMAGE WIDTH (39) [ ] Enter the character width of the image display block. The total page display width is equal to this width multiplied by the number of images specified, plus any defined pre-spacing before the first image. FIRST IMAGE COLUMN PRE-SPACE (0) [ ] Enter the number of characters of pre-spacing to appear before the first image of the print page. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 123 Entering Designer mode MBF-UDALink IMAGE LINE SPACING (0) [ ] Enter the number of spacing lines between format images (or single detail lines). This spacing is suppressed at the start of a new page. COLUMN FORMAT (NO) [ ] Enter YES if the data records in a multiple image page are to be ordered down each image column in turn on the page. Enter NO if the data records are to be ordered across the page images. Other global and field options can be used to suppress column headings and align fields as required. Insert Text The INSERT TEXT function key allows a page heading and a page footing to be generated. PAGE HEADING - Enter a string of characters to appear at the top of each page of the report. PAGE FOOTING - Enter a string of characters to appear at the bottom of each page of the report. For both headings and footings, the string of characters can include the formatting character “\” and $DATE and $TIME functions described on the following pages. The format of the page heading and footing entry is: PAGE HEADING [ entry 1 \ entry 2 \ entry 3] PAGE FOOTING [ entry 1 \ entry 2 \ entry 3] where the entries can be any combination of the following: $DATE - The system date in the format dd-mmm-yyyy (hh:mm); for example: 02-JUN-1996 (16:29). $PAGE - The page number of the report; for example, page 1 of 10. <a text string> - The string of characters to appear in the heading or footing. Note: This area is limited to 50 characters. The example $DATE/$TIME/PRODUCTS would be 20 characters. 124 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode Considerations • Entry: 1 is left adjusted in the heading or footing 3 is right adjusted in the heading or footing 2 is centered in the remaining space • The $PAGE and $DATE can appear in both heading and footing and can appear more than once in either. • $DATE and $PAGE appear in the screen display as well as the printer report. Suppress or Show The SUPPRESS or SHOW function key allows for the suppression of the column headings and/or the Report Headings and Footers. The function keys work as toggle switches. SUPPRESS TITLES - Press to suppress titles and column headings. SHOW TITLES - Press to restore title and column headings. SUPPRESS HEADINGS - Press to suppress column headings. SHOW HEADINGS - Press to restore column headings. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 125 Entering Designer mode MBF-UDALink Heading Justify The HEADING JUSTIFY function key controls default alignment of column headings. LEFT JUSTIFY - Change the default column justification to left justify. RIGHT JUSTIFY - Change the default column justification to right justify. CENTER JUSTIFY - Change the default column justification to center justify. Field Spacing The FIELD SPACING function key controls the default spacing between the fields. INCREASE - Increase the default spacing between columns by one. (Default is 2 spaces.) DECREASE - Decrease the default spacing between columns by one. Line Spacing The LINE SPACING function key controls the spacing between the detail lines. INCREASE - Increase the number of blank lines between detail lines by one. (Default is no blank lines.) DECREASE - Decrease the number of blank lines between detail lines by one. Prompt Mode You can enter the Global edit facility directly while in Field edit by entering a zero at the ENTER FIELD NUMBER prompt. In GLOBAL edit mode, the prompts described on the next page are displayed, including the current setting for the prompt. CONTINUE - Retain the default value shown and proceed to the next prompt. ESCape - Back up one prompt. EXIT - Accept any changes made so far and return to the GLOBAL/EDIT keys. If the defaults are already overridden, the current settings are displayed followed by an asterisk; for example, DEFAULT COLUMN SPACING (3*). 126 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode The prompts displayed in GLOBAL edit mode are: REORDER/REMOVE FIELD COLUMNS (N/y)? MOVE FIELD COLUMN NUMBER AFTER FIELD COLUMN NUMBER LAYOUT FOR TERMINAL/PRINTER (T/P)? BREAKPOINT GROUP FORMAT (NO) PAGE LINE FORMAT (PARTS) NUMBER OF REPEATING FIELD COLUMNS (1) LINE SPACING (0) NUMBER OF IMAGES (0) IMAGE WIDTH (39) FIRST IMAGE COLUMN PRE-SPACE (0) COLUMN FORMAT (NO) DEFAULT COLUMN SPACING (2) SUPPRESS PAGE HEADERS (NO) SUPPRESS FIELD HEADINGS (NO) DEFAULT HEADING JUSTIFICATION (CENTER) PAGE HEADING [This line will appear as the title of the report ] PAGE FOOTING [This line will appear as the footer of the report ] [y [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] REORDER/REMOVE FIELD COLUMNS (N/y)? [ ] Enter “Y” to move a column to a different location on the report, or to remove it. This prompt and the following two prompts appear until “N” or Return is entered here. Fields can also be reordered or removed using the MOVE FIELD function key menu of the FIELD EDITs. MOVE FIELD COLUMN NUMBER [ ] Enter the number of the field to be moved. If you enter “0” to this prompt, any moves you have made are reversed, any removed (deleted) fields are returned to the screen, and you are returned to the default field order. AFTER FIELD COLUMN NUMBER [ ] Enter the number of the field that the field to be moved should follow. The “after” field can be on any page part. Enter a zero if the “move” field is to appear as the first field in the report. NOTE: Entering a blank or pressing Return will delete the MOVE FIELD column. LAYOUT FOR TERMINAL/PRINTER (T/p)? [ ] Enter “T” or Return to work with the report as it will appear on a screen. Enter “P” to work with the report as it will appear when printed. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 127 Entering Designer mode MBF-UDALink BREAKPOINT GROUP FORMAT (NO) [ ] Enter“Y” to display breakpoint (summarized) fields in a group heading format displayed at the start of each group’s detail records. Enter “N” to display report in the default format. PAGE LINE FORMAT (PARTS) Enter “P” to break reports wider than the display format into page parts. Enter “M” to fold the report line within the display width, that is, to create MULTIPLE line images. Enter “T” to truncate the report at the end of the display. Any additional fields are lost. NUMBER OF REPEATING FIELD COLUMNS (1) [ ] This prompt only appears if the PAGE LINE FORMAT is PARTS. The repeating fields always begin with the left-most field on the first page part, and are the fields immediately following it. Repeating fields allow page parts to be lined up correctly. LINE SPACING (0) This prompt only appears if the NUMBER OF IMAGES is greater than 1. Enter the number of blank lines that should appear between each image if in MULTIPLE LINE format or between each report line if in PAGE PARTS format. NUMBER OF IMAGES (0) Enter the number of times the report line image should be repeated in the output display width. IMAGE WIDTH (39) This prompt only appears if the NUMBER OF IMAGES is greater than 0. Enter the number of columns in each image display block. The total display width is equal to the number of images times the image width plus the first image pre-space. FIRST IMAGE COLUMN PRE-SPACE (0) This prompt only appears if the NUMBER OF IMAGES is greater than 0. Enter the number of blank characters that should appear before the first image. This can be used to adjust the output for special forms to match the standard setup for printers. COLUMN FORMAT (NO) This prompt only appears if the NUMBER OF IMAGES is greater than 0. Enter “Y” if the images are to be ordered down the image columns like the names in a phone book. Enter “N” to order them across the page. 128 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode DEFAULT COLUMN SPACING (2) [ ] Enter the number of blanks that should separate the fields on a report. This default can be overridden for individual fields. SUPPRESS PAGE HEADERS (NO) Enter “Y” to suppress all page headings and footings including column headings for use with special forms such as mailing labels. SUPPRESS FIELD HEADINGS (NO) Enter “Y” to suppress all field headings for use with special forms such as mailing labels. DEFAULT HEADING JUSTIFICATION (C) [ ] Enter the code to determine the heading justification for fields on the report. This default can be overridden for individual fields. PAGE HEADING [ ] Enter a string of characters to appear at the top of each page of the report. PAGE FOOTING [ ] Enter a string of characters to appear at the bottom of each page of the report. At the end of this prompt sequence, the report will be refreshed. Additional global specifications can now be made or FIELD EDITS can be performed. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 129 Entering Designer mode MBF-UDALink Formatting individual fields Press the FIELD EDIT function key, F7, to display the first line of function keys shown below. Press the NEXT KEYS function key to display the next row and, when at the last row, recycle back to the first. The field to be edited is highlighted. It is the first field in a multi-line format or on page part one and the first non-repeating field in subsequent page parts. 130 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode To edit other fields, press the NEXT or PREVIOUS CHOICE function keys, enter a field number (it can be on a different page part), or go to a new page part. The first three function keys on each line generate an additional set of function keys, which are described in the following pages. The other keys are standard and appear on all FIELD EDIT menus. The effect of pressing these keys is discussed on the next page. These keys can be pressed any time they appear and can be used to select a new field to be edited while in a particular function. NEXT CHOICE - Move the highlight bar one field to the right. If the highlight bar is on the last field in the report, pressing this key will move it to the first field. If the highlight bar is on the last field of a page part, it will move it to the first non-repeating field on the next page part. PREVIOUS CHOICE - Move the highlight bar one field to the left. If the highlight bar is on the first field in the report, pressing this key will move it to the last field. If the highlight bar is on the first field of a page part, it will move it to the last field on the previous page part. PROMPT - All possible field edit prompts are shown with their current settings. Press Return to retain the current setting and move to the next. ESCape - Return to the current FIELD edit function keys. EXIT - Accept any changes made so far and return to GLOBAL/FIELD function keys. To perform the same function on all fields (for example, to change all field headings): • Highlight the first field to be edited. • Press the INSERT TEXT key and the FIELD HEADING key. • Insert the new heading. • Press the NEXT CHOICE key to highlight the next field. • Repeat the sequence, skipping over any fields that have the correct heading. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 131 Entering Designer mode MBF-UDALink Move Field The MOVE FIELD function key is used to switch the position of a field with that of the field on either side of it, or to remove it from the report. FORWARD - Switch the positions of the highlighted field and the field on its right. BACK - Switch the positions of the highlighted field and the field on its left. REMOVE - Remove the highlighted field from the report. To restore all removed fields, use the DEFAULT key. DEFAULT - Return all removed fields to the report and restore the field columns to their original order. This is similar to an UNDO function but affects all changes. Align Field The ALIGN function key is used to change the position of the field in relation to the field on its left, or to reduce the column width. NEW LINE - Move the highlighted field to a new line if in MULTIPLE mode or to the next part if in PARTS mode. JOIN - Concatenate the highlighted field to the last non-blank character of the field to its left, with one blank separating them. START POSITION - Enter the column number in which this field is to start. The default is immediately after the field on its left, following the default number of blank columns. This entry forces the field to begin in a specific column. DEFAULT - Restore the highlighted field to its original position with its original field length. 132 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode Adjust Field The ADJUST function key shifts a field one position in either direction. LEFT SHIFT - Move the entire field one position to the left. RIGHT SHIFT - Move the entire field one position to the right. TRUNCATE - Remove one character position from the end of the highlighted field. Use prompt mode to restore the length if too many characters are truncated. DEFAULT - Return the highlighted field to its original position. Insert Text The INSERT TEXT function key allows for the insertion of characters before and after the data in the report line. It can also modify the field heading and edit mask. BEFORE FIELD - Insert a string of characters in front of the highlighted field. If spacing is required, add one or more blanks to the string value. To remove the string, enter a blank. FIELD HEADING - Change the predefined field heading. Enter the heading when prompted. To create a multi-line heading, enter a “^” between the lines. For example, “First^Name” would generate a two-line heading. To restore the heading to its previous value, enter a blank. FIELD MASK - To change the way a field is displayed, enter a field edit mask or date format when prompted. To remove the edit mask, enter a blank. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 133 Entering Designer mode MBF-UDALink Field Justify The FIELD JUSTIFY function key controls the default justification of data within the field width. LEFT JUSTIFY - Align the contents of the highlighted field with the left margin. RIGHT JUSTIFY - Align the contents of the highlighted field with the right margin. DEFAULT - Restore the highlighted field to its default justification (left for alphanumeric fields, right for numeric). Heading Justify The HEADING JUSTIFY function key controls the default justification for the field heading. LEFT JUSTIFY - Align the heading for the highlighted field with the left of the column width. RIGHT JUSTIFY - Align the heading for the highlighted field with the right of the column width. CENTER JUSTIFY - Center the heading for the highlighted field within the column width. DEFAULT - Restore the default field heading justification. Sort Edit The SORT EDIT function key is used to cause sort key values to be repeated on each report line. DISPLAY REPEAT - This key will only appear for fields that are sort items. Force the value of the field to appear on each report line. DEFAULT - Suppress the printing of the highlighted field after the first occurrence. Group Edit The GROUP EDIT function key is used to add blanks lines before total and subtotal lines and to generate page breaks on specific sort fields. The field must have been identified as a control break for these prompts to appear (or be entered at SUMMARIZE BY prompt in procedure creation). PAGE SKIP - Generate a page skip before printing the first value for a sort item. DOUBLE SKIP - Insert two blank lines after the subtotal line for this group. LINE SKIP - Insert one blank lines after the subtotal line for this group. DEFAULT - Remove the blank line(s) after the subtotal line for this group. 134 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode Prompt Mode The PROMPT function key is used to generate a sequence of prompts for all the items that can be changed for a particular field. The current settings are displayed. In PROMPT mode, all possible edit prompts for the highlighted field are displayed. The current setting for the prompt is also shown. CONTINUE - Retain the default value shown and proceed to the next prompt. ESCape - Back up one prompt. EXIT - Accept any changes made so far and return to the GLOBAL/FIELD keys. If the defaults are already overridden, the current settings are displayed suffixed by an asterisk; for example, Field Column Spacing (4*). The prompts displayed in PROMPT mode are: DISPLAY REPEATING SORT FIELD (N)[ SUMMARY LINE SPACING (0) FIELD COLUMN WIDTH (11) FIELD START POSITION (31) FIELD COLUMN SPACING (2) FIELD LINE SPACING (0) HEADING JUSTIFICATION FIELD JUSTIFICATION [ FIELD HEADING ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] BALANCE] [Balance^Owing] [ ] [ZZZ.ZZ ] [ ] [ ] FIELD EDIT MASK FIELD TEXT DISPLAY REPEATING SORT FIELD (N) [ ] This prompt only appears if the field is a sort field. By default, the value in a sort field is only displayed when the value in that field changes. Enter “Y” to print the value of the sort field on each report line. SUMMARY LINE SPACING (0) [ ] Enter 0, 1 or 2 as the number of spacing lines following the summary line for this field when it immediately precedes the next group of detail lines. Enter 3 to force a new page rather than line spacing. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 135 Entering Designer mode MBF-UDALink FIELD COLUMN WIDTH (14) [ ] The column width is determined by the edit mask or the field heading length, whichever is longer. If an alphanumeric field is made smaller, Reporter will truncate the values in the field. If a numeric field is made too small to contain its values, the field will be filled with ### characters. Enter a new value for the width of this column, up to the maximum width allowed. FIELD START POSITION (21) [ ] Enter the starting column for this field. A column ruler is shown at the bottom of the report to assist in spacing. FIELD COLUMN SPACING (2) [ ] Enter the number of blank columns to separate this field from the one that precedes it. This field can be concatenated to the field on its left by entering “+” as a prefix to the number of blank columns to be printed. For example, a field column spacing of “+1” for LAST-NAME would align the last name up to the last non-blank of FIRST-NAME, with one space between the two names. FIELD LINE SPACING (0) [ ] Enter line spacing to force this field to a new line or page part. Enter “0” for no spacing, ”1” for the next line, “2” for skip a line, etc. HEADING JUSTIFICATION [ ] Enter the code for the heading justification for this field. FIELD JUSTIFICATION [ ] Enter the code for the field justification for this field. FIELD HEADING [ ] Enter the new field heading. To indicate a multi-line heading, place a “^” wherever a new line is to start (for example, EXPIRY^DATE). To retain the default shown, press Return. Enter a blank to erase the heading. FIELD EDIT MASK [ ] Enter an Edit Mask to tell ReportDesigner how the values for a field should be displayed in the report. 136 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Entering Designer mode FIELD TEXT [ ] Enter a string of characters to be displayed on the report line in front of this field. At the end of the prompt mode sequence, you can: • select another field for editing • specify that you want to enter global format specifications (i.e. enter a field number of zero) • press return at the prompt for another field to edit, so you can see the effect of the changes you have made. You can then print the formatted report or go back into Report Designer and make more changes. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 137 Editing concepts MBF-UDALink Editing concepts The following concepts used in the ReportDesigner are discussed in this section: • justification of data and field headings within the field column • field edit masks to modify how data is displayed on the report line • display formats to allow different layouts on the screen and printer from the same procedure • multi-line reports to allow the display of a complete record on one screen or printer page and to create special forms such as mailing labels • creating group headers Justification Both the contents of a field and its field heading can be justified within the maximum field width. The defaults are: • Headings are centered over the maximum field width. • Alphanumeric items are left justified. • Numeric items are right justified. Using the GLOBAL edits facility, the default heading justification can be changed for all fields in the report and the justification for individual fields can then be modified with the FIELD edit facility. For field headings, the choices are: C - centered R - right justified L - left justified Alphanumeric fields can be right justified and numerics left justified using the FIELD edits. Report Listing page 1 of 3 Left RightCentered Left Adjusted AdjustedAdjusted Adjusted ——[1]—+——+——[2]—+——+——[3]—+——+——+-[4]+——— Frank 138 Alaopa010704 0 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Editing concepts Jean Amoux010509 Sean Connery010706 6129415555 8554711 Paul Dauer010611 3037724599 Kirby Dick010706 4087385186 ——+——1——+——2——+——3——+——4——+——5——+— PAGE-FORWARD/EXIT (F/e)? [ ] In this example:. • The first name is left justified (by default) and its heading has been left justified • The last name and its heading have been right justified. • The date field (numeric) has been positioned at the default, which is centered. • The phone number and its heading have been left adjusted. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 139 Editing concepts MBF-UDALink Edit masks Edit masks are combinations of the substitution and insertion character that affect how a field is displayed on the output report. One character from the data field is assigned to each substitution character in turn. Insertion characters (any character not in the list shown below) are printed as is. The following characters can be included in a field edit mask: SUBSTITUTION CHARACTER ^ Z $ * . ! mask( ) maskmaskCR maskDR DEFINITION Insert actual data character in this position. Suppress leading zeros (must be upper case). Suppress leading zeros and place a dollar sign before the left-most digit. Replace all leading zeros with asterisks. Align decimal point with decimal positions defined in the field. Put a decimal point in this position, regardless of the number of defined decimals for this field. Format as indicated by the edit mask; if the value is negative, enclose it in parentheses. Format as indicated by the edit mask; if the value is negative, it will print with a trailing negative sign. Format as indicated by the edit mask; if the value is negative, it will print followed by “CR”. Format as indicated by the edit mask; if the value is negative, it will print followed by “DR”. Any other character is considered an insertion character, and is displayed at that position in the field. When you specify an edit mask, you must allow a character for the sign position. For example, an edit mask of $$$$$$.^^ can hold a maximum value of 9999.99 because one character is taken up by the $ and another is reserved in case a negative sign is required. If your edit mask is not large enough to contain the field values, the field will be filled with ### characters. 140 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Editing concepts Some examples follow. EDIT MASK VALUE ^^^-^^^ ^^/^^/^^ $$$$$$.^^ $$$,$$$.^^ ***,**$.^^ $$$,$$$.^^( ) 123456 010186 100000 100000 100000 100000 -100000 9995551212 (^^^) ^^^-^^^^ RESULT 123-456 01/01/86 $1000.00 $1,000.00 **$1,000.00 $1,000.00 ($1,000.00) (999) 555-1212 Creating a test file Create a file for testing download of various type page 1A of 3 NUMBER LAST EXPIRY-DATE LAST-PAID-DATE REGION TYPE BALANCE JOIN-DATE [1]+------------[2]------+-------[3]---------+------[4]+---------+------[5]---+-----[6]-+-------[7]--+--------+----[8] 10066 Dick 010706 000706 PA STU 12.50 000706 10173 Lelo 010613 000613 PA IND 25.00 000613 10181 Tark 010721 000721 CE IND 25.00 000721 10182 Conn 010706 000706 CE STU 12.50 000706 10183 Rath 010721 000630 PA IND 10.00 000721 [1]+------------[2]------+-------[3]---------+------[4]+---------+------[5]---+-----[6]-+-------[7]--+--------+----[8] DATE DISPLAY FORMAT [YYMMDD ] DATE SEPARATOR () [- ] MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 141 Editing concepts MBF-UDALink DATE DISPLAY FORMAT [YYMMDD ] Enter a date display format if required—valid formats are: YYMMDD, YYMMMDD, YYYYMMDD, or YYYYMMMDD (year-month-day) MMDDYY, MMMDDYY, MMDDYYYY, or MMMDDYYYY (month-day-year) DDMMYY, DDMMMYY, DDMMYYYY, or DDMMMYYYY (day-month-year) YYMM, YYMMM, YYYYMM or YYYYMMM (year-month) MMYY, MMMYY, MMYYYY or MMMYYYY (month-year) MMDD or MMMDD (month-day) DDMM or DDMMM (day-month) YYDDD or YYYYDDD (year-day) DDDYY or DDDYYYY (day-year) DATE SEPARATOR() [ ] Enter a separator character for the date display format if required. Typically, “-”, “/” or a blank are used as separators. Press Return to indicate that you do not want a separator and the date will print as 951231 (for example). Enter “0” to cancel any existing separator. This prompt only appears if you enter a date display format. To change the date separator, re-enter the date display format. 142 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Display formats Display formats Reporter adjusts the report line to fit the output display width: usually 79 characters for the screen and 132 for a printer. The LAYOUT FOR TERMINAL/PRINTER prompt in the GLOBAL edits allows you to design a report at the screen to be printed on a printer with a display width greater than that of the screen. To view the portion of the screen outside the display width, press the “PART>” and “< PART” function keys. The prompt shown below allows you to go to the next part by pressing Return or to go to the hidden portion of the page part by entering a starting location. For example, enter 54 to see columns 54 to 132. When you press PART, enter 1 to re-display columns 1 to 80. Press Return to move a page part DISPLAY from position [ ] You can produce two different formats from the same procedure, one for the screen and one for the printer. Three field edit items determine the different formats: field column width, field start position, and field column spacing. As long as the values of these edit items have been defined for one of the two formats, the formats are identical. To create different formats: • Run the procedure to create the report. • Enter ReportDesigner mode. • In the global edit specifications, specify whether you want to create a format for the terminal or the printer with the prompt: LAYOUT FOR TERMINAL/PRINTER (T/P) ? • In field edit mode, change the length or fixed starting location for any field or change the spacing between specific columns. • Return to global edit specifications and request the other layout format. • In field edit mode, change the field length, fixed start location, or spaces between columns for some of the fields. Changing one of the three edit items for a field in the terminal display format has no effect on the printer layout for this report. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 143 Display formats MBF-UDALink A typical use of this feature is the creation of a screen format where all fields have been truncated as much as possible or codes printed rather than their descriptions, and the spacing between columns minimized to get as much data onto one page part as possible. This may be useful for fast lookup of certain information where an entire field is not needed to obtain the required information. A complete record of the information can be sent to the printer. All fields are printed at their full lengths and with columns spaced for readability. 144 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Display formats Page parts and multiple line formats If there is too much data in the report line to fit within the display width of the terminal or printer, the report line is normally broken into page parts. Each page part is identified by a letter after the page number such as page 1B of 12 or page 1C of 12. The first field in the report line is repeated to assist in lining up the page parts after printing or on the screen. With ReportDesigner, additional capabilities are available: • More than one field can be repeated to assist in lining up the parts. • The data can be modified to fit more information on each part. • The data that will not fit on the first report line can be displayed on a second line rather than on a new part. Additional report lines are added as necessary. The report line is folded within the display area by selecting MULTIPLE LINE IMAGES when printing the report. In this mode, field headings are suppressed to maximize the amount of data that appears on the report image. To label data, use the INSERT TEXT function of FIELD EDIT to add text before and/or after the field value. In page part format: • The page parts are labelled “A”, “B”, “C”, etc. As many page parts as are necessary are used. • There is a “>” in the last position of the dashed line under the report, to indicate there are more page parts following this one. • There is a “<” in the first position of the dashed line under the report, to indicate there are more page parts before this one. • The prompt at the end of the page adjusts to reflect the choices available. For example, when you are at page part 1B of this report, you can only go back or exit; this is the last page. In multiple-line format: • Fields are printed on the first line until there is no room to display a complete field. As many lines as are necessary are used to print the record. • The field headings are also “folded” and only the first line of the field heading is displayed. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 145 Display formats MBF-UDALink Sample page part format LIST REPORT ON PRINTER (N/y)? [ ] PAGE PARTS, MULTI-LINE OR TRUNCATE (P/m/t)? [P ] This is the first page part of the report page 1A of 1 Name ADDRESS —————————————————————————————— Sean Connery Box 2139 David Fletcher 294 West Ogden Ave. Andrei Tarkovsky P.O. Box 749 Frank Alaopa Box 4353 Jean Amoux 21 Cranberry Street Mark Gibson 39406 Mentor Route Jerry Holst 971 Park Ave. Lynn Mawerston 1095 Bloomfield Avenue Russell Wilson 3300 Benjamin Franklin Parkway Paul Dauer 1485 Meeker Drive —————————————————————————————— PAGE-FORWARD/EXIT (F/e)? [ ] This is the second part of Page 1 page 1B of 1 Name CITY STATE ZIP —————————————————————————————— Sean Connery Minneapolis MN 55424 David Fletcher Westmount IL 60559 Andrei Tarkovsky Beeville TX 78102 Frank Alaopa SilverSprings MD 20901 Jean Amoux Brooklyn NY 11201 Mark Gibson Willoughby OH 44094 Jerry Holst Orange NJ 07050 Lynn Mawerston WestCaldwell NJ 07006 Russell Wilson Philadelphia PA 19130 Paul Dauer Longmont CO 80501 —————————————————————————————— EXIT/PAGE-BACK (E/b)? [ ] 146 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Display formats Default multiple-line format PAGE PARTS, MULTI-LINE OR TRUNCATE (P/M/T)? [M This sample shows the Multiple Line format FIRST-NAME LAST-NAME ADDRESS CITY ] page 1 of 2 STATE ZIP ——————————————————————————————————————— Frank Alaopa Box 4353 SilverSprings MD 20901 Jean Amoux Sean Connery 21Cranberry Street Brooklyn NY 11201 Box2139 Minneapolis MN 55424 ——————————————————————————————————————— PAGE-FORWARD/EXIT(F/e)?[] This default format can be customized with a combination of global and field edits. In GLOBAL edits: • Specify two images for two-up mailing labels (3.5 inches times 6 characters to the inch, plus one for the gap between them). • Add as many characters to the beginning to make the labels match the printer, to avoid adjusting the printer. (Eight characters makes things appear properly on the screen.) • Add two blank lines to the four detail lines, to make up the six lines to the inch for the labels. • Request column format and remove page headings (left in for this example). In FIELD edits: • Press ALIGN then NEXT CHOICE until LAST-NAME is highlighted, then press JOIN. Repeat for STATE. • Any unnecessary fields can be REMOVED with the MOVE sub-functions and any final ADJUSTments and other ALIGNments can be performed. Press EXIT to refresh the screen at any time. SAVE the format when complete. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 147 Display formats MBF-UDALink Sample 2-up mailing labels page 1 of 3 —————————————————————————————— Frank Alaopa Paul Dauer Box 4353 1485 Meeker Drive Silver Springs MD Longmont CO 20901 80501 Jean Amoux Kirby Dick 21 Cranberry Street 740 Almanor Ave Brooklyn NY Sunnyvale CA 11201 94086 Sean Connery David Fletcher Box 2139 294 West Ogden Ave. Minneapolis MN Westmount IL 55424 60559 Mark Gibson Lynn Mawerston 39406 Mentor Route 1095 Bloomfield Avenue Willoughby OH West Caldwell NJ 44094 07006 Jerry Holst Basil Rathbone 971 Park Ave. 415 W. Foothill Blvd. Orange NJ Claremont CA 07050 91711 —————————————————————————————— Headers and footers can also be suppressed. 148 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating group headers Creating group headers In many reports there are several sort fields that always change together and take up space on detail lines, often forcing page parts where they are not really necessary. This example shows how to move this repeating information up into a “report header”. Create the report as you normally would. Put the fields to be moved into the group header on the left of the INCLUDE IN OUTPUT line. Sort on only one of the fields that change together. The sample shown, above right, is the result of creating the report and pressing: F7 DESIGN REPORT to enter the Report Designer option. F6 GLOBAL EDIT to indicate you want to enter GLOBAL EDIT options. Return to exit GLOBAL edit [ ]. Note: A detailed description of the Global and Field Edit keys is explained earlier in this chapter. The following examples provide a brief explanation of the functionality of this option of Reporter. F1 LAYOUT - Display the LAYOUT options. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 149 Creating group headers MBF-UDALink F2 GROUP FORMAT - Move the control break field value (sort fields with summaries specified) onto “header lines”. This is a toggle function key. When in GROUP formats, this key shows DETAIL FORMAT. To return to detail format, press the key again. Note: Enter the control break fields first in the INCLUDE IN OUTPUT response when creating a procedure using GROUP FORMAT. Fields can be moved to column 1 but it saves effort and eliminates possible confusion. F3 DETAIL HEADINGS - Move the column headings from the page header to the top of each detail group. Skip this step if you want the column headings at the top of the page only. This is a toggle function key. When in DETAIL HEADINGS it will show PAGE HEADING. To return to PAGE HEADINGS, press the function key again. F1 EXIT - Exit from GLOBAL edits. F7 FIELD EDIT - Enter FIELD EDITS. F4 NEXT CHOICE - Move the highlight bar to the REGION-NAME field. F1 MOVE - Access MOVE functions. F2 BACK - Move the field from column 1 up into the group header. (If the field is not in column 1, press F2 multiple times until the field moves into the header.) F7 ESCape - Return to the FIELD EDIT keys. F4 NEXT CHOICE - Move the highlight bar to the NUMBER field. F2 ALIGN - Access ALIGN functions. F3 START POSITION - Generate the prompt for the starting position for the NUMBER. This is optional and serves to highlight the break points on the left margin. F7 ESCape - Return to the FIELD EDIT keys. F4 NEXT CHOICE twice - Move to the EXPIRY-DATE field. F7 NEXT KEYS - Locate INSERT TEXT function. F1 INSERT TEXT - Access Insert text functions. F3 FIELD HEADING - Add a new column heading as appropriate. Only one line of column heading is allowed in this format. F6 FIELD MASK - Add a field or date mask as appropriate. 150 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating group headers Common keys NEXT CHOICE - Move the highlight bar one field to the right. If the highlight bar is on the last field in the report, pressing this key will move it to the first field. If the highlight bar is on the last field of a page part, it will move it to the first non-repeating field on the next page part.PREVIOUS CHOICE - Move the highlight bar one field to the left. If the highlight bar is on the first field in the report, pressing this key will move it to the last field. If the highlight bar is on the first field of a page part, it will move it to the last field on the previous page part. ESCape - Return to the previous menu. EXIT - Return to the ReportDesigner mode. PROMPT MODE - Generate a sequence of prompts for all the items that can be changed for a particular field. The current settings are displayed Field edit keys MOVE FIELD - Switch the position of a field with that of the field on either side of it or to remove it from the report. FORWARD - Switch the positions of the highlighted field and the field on its right. BACK - Switch the positions of highlighted field and the field on its left. REMOVE - Remove the highlighted field from the report. To retrieve the field, use the DEFAULT key. DEFAULT - Return all removed fields to the report and restore the field columns to their original order. ALIGN FIELD - Change the position of the field in relation to the field on its left or to reduce the column width. NEW LINE - Move the highlighted field to a new line if in MULTIPLE mode or to the next part if in PARTS mode. JOIN - Concatenate the highlighted field to the last non-blank character of the field to its left, with one blank separating them. ADJUST FIELD - Shift a field one position in either direction. LEFT SHIFT - Move the entire field one position to the left. RIGHT SHIFT - Move the entire field one position to the right. TRUNCATE - Remove one character position from the end of the highlighted field. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 151 Creating group headers MBF-UDALink INSERT TEXT - Enable insertion of characters before data in the report line and field headings and edit masks. BEFORE - Insert a string of characters in front of the highlighted field. If spacing is required, add one or more blanks to the string value. To remove the string, enter a blank. FIELD HEADING - Change the pre-defined field heading. To create a multi-line heading, enter a “^” in the text where appropriate. FIELD MASK - To change the way a field is displayed, enter a field edit mask. To remove the edit mask, enter a blank. FIELD JUSTIFY - Changes the default justification of data within the field width. LEFT JUSTIFY - Align the contents of the highlighted field with the left margin. RIGHT JUSTIFY - Align the contents of the highlighted field with the right margin. DEFAULT - Restore the highlighted field to its default justification (left for alphanumeric fields, right for numeric). HEADING JUSTIFY - Change the default justification for the field heading. LEFT JUSTIFY - Align the heading for the highlighted field with the left of the column width. RIGHT JUSTIFY - Align the heading for the highlighted field with the right of the column width. CENTER JUSTIFY - Center the heading for the highlighted field within the column width. DEFAULT - Restore the default field heading justification. SORT EDIT - Cause sort key values to be repeated on each report line. DISP/SUP REPEAT - Reverse the setting of the switch that causes the value of the field to appear on each report line. (Only appears for fields that are sort items.) GROUP EDIT - Add blank lines before total and subtotal lines and generate page breaks on specific sort fields. The sort field must be a control break. PAGE SKIP - Generate a page skip before printing the first value for a sort item. DOUBLE SKIP - Insert two blank lines after the subtotal line for this group. LINE SKIP - Insert one blank line after the subtotal line for this group. 152 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Report design without function keys Report design without function keys Reporter knows if function keys are not available and adds instructional prompts where appropriate. Enter a page control character: F - Forward a page. B - Back a page. E - Exit from Report Designer. P - Generate the prompt for page number to display. > - Display the page part to the right. < - Display the page part to the left. “D” - Refresh the screen with the standard report design format; puts you directly into field edit mode, unlike report designing with function keys. Enter <field> - The column number of the field you want to edit. Enter 0 (zero) - Enter global edit mode. Entering the column number of a field on the screen puts you directly into prompt mode for that field. The default setting is shown; make changes as you step through the prompts. Entering the column number of a field not on the screen causes Reporter to refresh the screen with the appropriate page part and puts you in field edit mode for the column number you specified. To change the field number, enter “/” to return to the EDIT FIELD NUMBER and enter the column number. The screen is always refreshed after the last response. You can edit any field as often as required to obtain the desired result. Date editing is also available in PROMPT mode. Enter “0” (zero) to begin GLOBAL EDIT mode. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 153 Report design without function keys 154 MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink What is the JDBC1 driver? The JDBC1 driver MBF-UDALink has both a JDBC and an ODBC driver. What is the JDBC1 driver? Java Database Connectivity (JDBC) is a standard Application Programming Interface (API) for database access from Java. The JDBC1 driver is an implementation of the standard JDBC API. It consists of full Java driver for JDBC, network protocol and database server interface components for concurrent access to ALLBASE/SQL and Oracle databases. What is JDBC? JDBC (Java Database Connectivity) is a standard Java interface for connecting to relational databases from Java. The JDBC standard was defined by Sun Microsystems, allowing individual providers to implement and extend the standard with their own JDBC drivers. JDBC is based on the X/Open SQL Call Level Interface, and complies with the SQL92 Entry Level standard. In addition to the standard JDBC API, JDBC1 drivers have extensions to properties, types, and performance. Basic JDBC driver architecture A typical JDBC Java application consists of a Java application or applet, the JDBC Driver Manager, a vendor specific JDBC driver, and a database. The JDBC Driver Manager is provided with the Java SDK and its primary function is to load and register the vendor-specific JDBC driver with the Java applications and then get out of the way. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 155 What is the JDBC1 driver? MBF-UDALink The following diagram shows the various components of a client-server JDBC application. Java Application or Applet JDBC Driver Manager MB Foster Driver for JDBC Network MB Foster Universal Server IMAGE, ALLBASE, ORACLE, KSAM … JDBC client-server application The JDBC1 driver is a Type IV driver that is written in 100% pure Java and complies with the JDBC 1.2 standard, which provides the complete compatibility with all Java Virtual Machines on all platforms. This driver is targeted to both Java applet developers and Java application developers. The JDBC1 driver interfaces with the MBF Universal Server, which currently runs on HP-MPE and UNIX platforms. The Universal Server provides connectivity to the MB Foster’s ODBC, JDBC, and RPC Client Drivers. 156 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink JDBC1 Installation and Setup JDBC1 Installation and Setup Java Requirements The JDBC1 driver requires a Sun-compliant JDK version 1.1.x or above; the JDK must include JDBC version 1.2. Install the JDK from Sun or from your platform vendor. Individual platform vendors may have their own requirements for the platform host. Setup This section assumes that you have already installed the Sun Microsystems Java Developer’s Kit (JDK) on your system. The JDBC1 driver uses Java Sockets to connect directly to the MBF Universal Server and is used for Java applications or applets in either a two-tier or three-tier configuration. (MBF Universal Server must first be installed on the server host before the JDBC1 driver can be installed.) The JDBC1 driver consists of the ODBC driver Java class files and a sample JDBC client source file. To install the JDBC1 driver, run <CD Drive>\Program_Files\jdbc1\setupWin32.exe. If you are not running Windows, select the platform-specific installer from the jdbc1 directory.. The JDBC1 driver class files must be installed in your Java class path so that the Java compiler and the Java class loader can find them. Example on the Win32 Platform CLASSPATH=C:\JDK1.1.8\LIB;. You would then install the JDBC1 driver class files (MBFJDBC1.jar) in the directory: C:\JDK1.1.8\LIB\ The JDBC1 driver can also be downloaded into a browser simultaneously with the Java applet being run. From the client (usually a browser), you select a URL from an HTML page that contains a Java applet tag. The web server downloads the Java applet and the JDBC1 driver to the client. The JDBC1 driver then establishes a direct connection to the MBF Universal Server using Java Sockets. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 157 Using the JDBC1 driver MBF-UDALink Using the JDBC1 driver Preparing to compile and run Java Before using the JDBC1 driver, to further ensure that Java is set up properly on your client system, go to the samples directory (for example, C:\MBFoster\jdbc\samples if you are using the JDBC1 driver on a Windows NT machine), then see if javac (the Java compiler) and java (the Java interpreter) will run without error. Enter: Javac then enter: java Each should give you a list of options and parameters and then exit. Checking the environment variables The Java class path must be set to include the JDBC1 driver class files. Without this setting, both the Java compiler and the Java Run Time Environment will not be able to locate the JDBC1 driver. Please refer to your JDK documentation for more explicit details as to how to set the Java class path. In general, the Java class path must include the directory in which the JDBC1 driver class files have been installed. If the JDBC1 driver class files are installed in: C:\MBFoster\JDBC\MBFJDBC1.jar The CLASSPATH environment variable should be: CLASSPATH=C:\JDK1.1.8\LIB\classes.zip:.:C:\MBFoster\JDBC\MBFJDBC1.jar Importing packages When you use the JDBC1 driver, you must include the following import statements at the beginning of your program. import java.sql.* JDBC packages. import java.math.* Java math packages; for example, these are required for the BigDecimal classes. 158 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using the JDBC1 driver Loading the JDBC1 driver The Java method used to load all JDBC drivers is the class.forName method. To load the JDBC1 driver, the code is: class.forName("mbf.jdbc1.MBFDriver "); This loads the JDBC1 driver and registers it with the JDBC Driver Manager. Once a driver has been loaded and registered with the ODBC driver Manager, it is ready to be used to connect to a database. Opening a JDBC1 Connection You open a connection to the database with the static getConnection() method of the JDBC DriverManager class. This method returns an object of the JDBC Connection class which needs as input a userid, password, connect string that identifies the JDBC driver to use, and the name of the database to which you want to connect. The following example connects user "jdbcmgr" with password "chicago" to a MBF Universal Server through port 21249 of host "myhost", using the MBF-JDBC driver. Connection conn = DriverManager.getConnection ("jdbc:mbf://myhost:21249 ", " jdbcmgr ", " chicago "); Creating a Statement object Once you connect to the MBF Universal Server and, in the process, create your Connection object, the next step is to create a Statement object. The createStatement() method of your JDBC Connection object returns an object of the JDBC Statement class. To continue the example from the previous section where the Connection object conn was created, here is an example of how to create the Statement object: Statement stmt = conn.createStatement(); MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 159 Using the JDBC1 driver MBF-UDALink Executing a query and returning a Result Set object To query the database, use the executeQuery() method of your Statement object. This method takes a SQL statement as input and returns an object of the JDBC ResultSet class. To continue the example, once you create the Statement object stmt, the next step is to execute a query that populates a ResultSet object with the contents of the FIRST_NAME (first name of member) and LAST_NAME (last name of member) columns of a table of member-ship that is named MEMBERSHIP: ResultSet rset = stmt.executeQuery ("SELECT FIRST_NAME, LAST_NAME FROM MEMBERSHIP"); Processing the Result Set Once you execute your query, use the next() method of your ResultSet object to iterate through the results. This method loops through the result set row by row, detecting the end of the result set when it is reached. To pull data out of the result set as you iterate through it, use the various getXXX() methods of the ResultSet object, where XXX corresponds to a Java datatype. For example, the following code will iterate through the ResultSet object rset from the previous section, and will retrieve and print each member first name and last name: while (rset.next()) System.out.println (rset.getString(1) + " " + rset.getString(2)); Closing the Result Set You must explicitly close the ResultSet and Statement objects after you finish using them. This applies to all ResultSet and Statement objects you create when using the JDBC1 driver. the ODBC driver does not have finalizer methods; cleanup routines are performed by the close() method of the ResultSet and Statement classes. If you do not explicitly close your ResultSet and Statement objects, serious memory leaks could occur. For example, if your ResultSet object is rset and your Statement object is stmt, close the result set and statement with these lines: rset.close() stmt.close(); 160 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using the JDBC1 driver Closing the Connection You must close your connection to the database once you finish your work. Use the close() method of the Connection class to do this. For example, if your Connection object is conn, close the connection with this statement: conn.close(); Connection Parameters The following information is required for all JDBC1 connections to an MBF Universal Server: Host name -- The name of the server host on which the MBF Universal Server is running. This can either be the name of the server host, or the IP address. For example, ’myhost.mbfoster.com’ or ’123.4.5.6’. Port number -- The port number on which the MBF Universal Server is listening. This is specified when the listener is started on the server host in the startup command or script. The default port number for use by the MBF Universal Server is 21245. If a port number is not specified, this default value is used. User Name (UID) -- A valid user name (matching a UID from the Host Configuration Setup) for the MBF Universal Server. User Password (PWD) -- The password (if required) that matches the provided user name. Optional Parameters The following information is optioned for all JDBC1 connections: Client Debug Level Debug - This parameter will set the JDBC1 debug level. Server Debug Level HostDebug - This parameter will set the MBF Universal Server debug level. Space Padding for CHAR Columns Padding - This parameter will set Space Padding for CHAR Columns. The default value is true. Login to other account LOGIN - This parameter will tell the server to change to another account. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 161 Using the JDBC1 driver MBF-UDALink If the MBF Universal Server is running on UNIX, you should use the format : LOGIN=# uname/upwd; URL Syntax The JDBC1 connection URL string syntax is: jdbc:mbf://<host_name>[:<port_number>][;parameter=value][;...] URL Syntax (Including User Name and Password) The first connection method specifies all connection parameters in a URL string including the user name and password. java.sql.DriverManager.getConnection(url) where: String url = " jdbc:mbf://<host_name>[:<port_number>];UID=uid;PWD=pwd[;...]" URL Syntax (Without User Name and Password) The second connection method specifies the user id and password as method arguments, so this information is not present in the URL. java.sql.DriverManager.getConnection(url, uid, pwd) where: String url = " jdbc:mbf://<host_name>[:<port_number>]][;parameter=value][;...]"; String uid = "uid"; String pwd = "pwd"; 162 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink JDBC1 Samples JDBC1 Samples // // This simple Java application loads a JDBC Driver, prompts the // user for connection information, creates the ODBC driver URL, makes // the connection to the database, and sends user provided SQL // statements to the database. // // If the result of the statement is a result set, it is printed out. // // This code and information is provided "as is" without warranty // of any kind, either expressed or implied. // // Copyright (c) 2001 MB Foster Associates Limited. All Rights Reserved // import java.sql.*; import java.io.*; class Sample { public static void main(String[] args) { // User input fields String hostName = getInputInfo("Host Name: "); String portNumber = getInputInfo("Port Number: "); String userName = getInputInfo("User Name: "); String userPassword = getInputInfo("User Password: "); // Create the URL based on the user input String url = "jdbc:mbf://" + hostName + ":" + portNumber; try { // Load the MBF-JDBC driver Class.forName("mbf.jdbc1.MBFDriver"); // Connect to the database Connection conn = DriverManager.getConnection(url, userName, userPassword); // Main processing loop for (;;) { // Ask user for an sql statement MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 163 JDBC1 Samples MBF-UDALink System.out.println(""); String sql = getInputInfo("SQL (empty string to end) > "); System.out.println(""); // If empty string, then exit if (sql == null || sql.equals("")) break; // Submit the SQL statement Statement stmt = conn.createStatement(); // If execute returns true, there is a result set if (stmt.execute(sql)) { ResultSet rs = stmt.getResultSet(); displayResultSet(rs); rs.close(); } // Otherwise, there is an update count else { System.out.println(stmt.getUpdateCount() + " rows changed."); } stmt.close(); } // End of main processing loop conn.close(); System.exit(0); } catch (Exception e) { e.printStackTrace(); System.exit(-1); } } // // This captures console input until a CR is hit and // then returns a Java String with the input. // private static String getInputInfo(String prompt) { String rtn = ""; 164 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink JDBC1 Samples try { byte[] buf = new byte[1024]; System.out.println(prompt); int len = System.in.read(buf); rtn = new String(buf, 0, len); rtn = rtn.trim(); } catch (Exception ex) { ex.printStackTrace(); } return rtn; } // // Displays all columns and rows in the given result set // private static void displayResultSet(ResultSet rs) throws SQLException { // Get the ResultSetMetaData. // This will be used for the column headings. ResultSetMetaData rsmd = rs.getMetaData(); // Get the number of columns in the result set int numCols = rsmd.getColumnCount(); // For each column, print out the column names, separated by commas for (int i = 1; i <= numCols; i++) { System.out.print(rsmd.getColumnName(i)); if (i < numCols) System.out.print(", "); } System.out.println("\n"); // Print out the data, fetching until end of the result set while (rs.next()) { // For each column, print out the data as String for (int i = 1; i <= numCols; i++) { String colValue = rs.getString(i); MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 165 JDBC1 Samples MBF-UDALink // If data was null, use the null string instead if (rs.wasNull()) colValue = "<NULL>"; System.out.print(colValue); if (i < numCols) System.out.print(", "); } System.out.println(); // Fetch the next result set row } System.out.println(); } } 166 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink What is JDBCLink-UX? JDBCLink-UX What is JDBCLink-UX? Java Database Connectivity (JDBC) is a standard Application Programming Interface (API) for database access from Java. JDBCLink-UX driver is an implementation of the standard JDBC API. It consists of full Java driver for JDBC, network protocol and database server interface components for concurrent access to ALLBASE/SQL, Oracle databases and Eloquence. What is JDBC? JDBC (Java Database Connectivity) is a standard Java interface for connecting to relational databases from Java. The JDBC standard was defined by Sun Microsystems, allowing individual providers to implement and extend the standard with their own JDBC drivers. JDBC is based on the X/Open SQL Call Level Interface, and complies with theSQL92 Entry Level standard. In addition to the standard JDBC API, JDBC2 drivers have extensions to properties, types, and performance. Basic Driver Architecture A typical JDBC Java application consists of a Java application or applet, the JDBC Driver Manager, a vendor-specific JDBC driver, and a database. The JDBC Driver Manager is provided with the Java SDK and its primary function is to load and register the vendor-specific JDBC driver with the Java applications and then get out of the way.. JDBCLink-UX is a Type IV driver, that is written in 100% pure Java and complies with the JDBC 1.2 standard. This provides the complete compatibility with all Java Virtual Machines on all platforms. This driver is targeted for both Java applet developers and Java application developers. JDBCLink-UX interfaces with the MB Foster Universal Server. The Universal Server provides connectivity to the MBFoster’s ODBC, JDBC, and RPC Client Drivers. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 167 J2EE Background MBF-UDALink J2EE Background What is J2EE? The Java 2 Platform, Enterprise Edition (J2EE) was designed to simplify complex problems with the development, deployment, and management of multi-tier enterprise solutions. J2EE is an industry standard, and is the result of a large industry initiative led by Sun Microsystems. It's important for you to realize that J2EE is a standard, not a product. You cannot "download" J2EE. Rather you download a set of Adobe Acrobat PDF files which describe agreements between applications and the containers in which they run. So long as both sides obey the J2EE contracts, applications can be deployed in a variety of container environments. The J2EE camp's goal is to give customers choice of vendor products and tools, and to encourage best-of-breed products to emerge through competition. The only way this would ever happen is if the industry as a whole were bought-into J2EE. To secure buy-in, Sun collaborated with other vendors of eBusiness platforms, such as BEA, IBM, and Oracle, in defining J2EE. Sun then initiated the Java Community Process (JCP) to solicit new ideas to improve J2EE over time. The reason Sun did this is because they had to do so to achieve success--the best way to secure buy-in to an idea is to involve others in defining that idea. The J2EE architecture is based on the Java programming language. J2EE is an application of Java. What is a JavaBean? The goal of the JavaBeans is to define a software component model for Java, so that third party ISVs can create and ship Java components that can be composed together into applications by end users. A component model defines an environment that supports reusable application components. Any object that conforms to certain basic rules as defined in the JavaBeans API can be a JavaBean. In addition to having a default constructor and being serializable, a JavaBean exports properties, events, and methods. Properties indicate the internal state of a Bean and can be manipulated using a pair of get and set methods (getter/setter methods). A Bean is also capable of generating events and follows the Java 1.1 Delegation Event Model for generating them. A bean defines an event by providing methods for adding and removing event listener objects from a list of interested listeners for that event. Bean methods are any public methods the bean exposes (except the getter/setter methods) to change property values or the methods to register and remove event listeners. In addition to this, JavaBeans also define indexed properties, bound properties, and constrained properties. An indexed property is a property that has an array value and methods to change the value of either an individual array element or the entire array. A bound property is one that sends 168 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink J2EE Background out a notification event when its value changes. A constrained property is one that sends out a notification when its value changes and allows the change to be vetoed by its listeners. A bean can also provide a BeanInfo class that provides additional information about the bean in the form of FeatureDescriptor objects, each of which describe a single feature of the bean. If a bean has complicated property types, it may need to define a PropertyEditor class that enables the user to set values for that property. A bean can also define a Customizer class, which creates a customized GUI that enables the user to configure the bean in some useful way. What is EJB? Enterprise JavaBeans (EJB) technology is an emerging part of a fundamental software architecture that attempts to combine the best of Internet technology, distributed object architecture, and platform-independent coding into a better way of creating and maintaining E-commerce, corporate and personal applications. Announced as a specification effort two years ago and as a specification one year ago, serious EJB-based applications are now making their appearance in corporate Web applications. Enterprise JavaBeans (EJB) takes a high-level approach for building distributed systems. It frees the application developer to concentrate on programming only the business logic, while removing the need to write all the "plumbing" code required in any enterprise application development scenario. For example, the enterprise developer no longer needs to write code that handles transactional behavior, security, connection pooling, or threading because the architecture delegates this task to the server vendor. The current version of EJB bears little relation to JavaBeans. The name "Enterprise JavaBeans," however, implies a relationship that doesn't really hold. Typically, JavaBeans are used in a manner similar to Microsoft's ActiveX components (to provide user-friendly controls for building user interfaces), whereas EJBs are used to implement transactional middleware and are decidedly nonvisual. In addition, EJB does not include things like BeanInfo classes, property editors, or customizers. In essence, EJB is a server component model for Java and is a specification for creating serverside, scalable, transactional, multiuser, and secure enterprise-level applications. Most important, EJBs can be deployed on top of existing transaction processing systems including traditional transaction processing monitors, Web servers, database servers, application servers, and so forth. What is the Naming Service? A naming system provides a natural, understandable way of identifying and associating names with data. For example, the DOS file system uses a naming system for associating data with folder and file names, while a relational database uses a naming system for associating data with column and table names. Naming systems enable humans to interact with complex computer addressing systems by associating data and objects with simple, understandable names. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 169 J2EE Background MBF-UDALink A naming service is a dedicated piece of software that manages a naming system or namespace. Naming services often run independently of the computer systems that use them. In other words, they provide the service of associating names with data or objects-a naming system-but are independent and can serve any system that understands their protocol and can connect to them. Directory and naming services usually employ two layers: a client layer and a server layer. The server is responsible for maintaining and resolving the actual name-object bindings, controlling access, and managing operations performed on the structure of the directory service. The client acts as an interface that applications use to communicate with the directory service. What is JNDI? The Java Naming and Directory Interface (JNDI) is a client API that provides naming and directory functionality. JNDI is specified in Java and is designed to provide an abstraction that represents those elements most common to naming and directory service clients. JNDI is not intended as an alternative to established naming and directory services. Instead, it is designed to provide a common interface for accessing existing services like DNS, NDS, LDAP, CORBA, or RMI. JNDI provides an interface that hides the implementation details of different naming and directory services behind the JNDI API. This allows multiple directory services to coexist and even cooperate within the same JNDI client. Using JNDI, a user can navigate across several directory and naming services while working with seemingly only one logical federated naming service. What is JTS? The Java Transaction Service (JTS) plays the role of a transaction coordinator for all the constituent components of the EJB architecture. In JTS terminology, the director is called the transaction manager. The participants in the transaction that implement transaction-protected resources, such as relational databases, are called resource managers. When an application begins a transaction, it creates a transaction object that represents the transaction. The application then invokes the resource managers to perform the work of the transaction. As the transaction progresses, the transaction manager keeps track of each of the resource managers enlisted in the transaction. The application's first call to each resource manager identifies the current transaction. For example, if the application is using a relational database, it calls the JDBC interface, which associates the transaction object with the JDBC connection. Thereafter, all calls made over that connection are performed on behalf of the database transaction until it ends. Typically, the application completes the transaction by invoking a xa_commit() method and the transaction is said to commit. If the application is unable to complete for any reason, it performs a rollover by calling the xa_rollback() method, which undoes the transaction's actions. If the application fails, the JTS aborts the transaction. When the application successfully completes the transaction's work, it calls the JTS to commit the transaction. The JTS then goes through a twophase commit protocol to get all the enlisted resource managers to commit. 170 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink J2EE Background What are the JDBC 2 extensions? JDBC 2 support JTS, JavaBean, EJB and JNDI MB Foster supports both the Java 2 Enterprise Edition (J2EE) and the Java Native Interface (JNI). Consult http://java.sun.com/j2ee/ for more information on using J2EE. Consult http://java.sun.com/docs/books/tutorial/native1.1/index.html for more information on using the JNI. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 171 JDBCLink-UX Installation and Setup MBF-UDALink JDBCLink-UX Installation and Setup Java Requirements JDBCLink-UX requires a Sun-compliant JDK version 1.2.2 or above; the JDK must include JDBC version 2.2. Install the JDK from Sun or from your platform vendor. Individual platform vendors may have their own requirements for the platform host. Setup This section assumes that you have already installed the Sun Microsystems Java Developer’s Kit (JDK) on your system. JDBCLink-UX uses Java Sockets to connect directly to the MB Foster Universal Server and is used for Java applications or applets in either a two-tier or three-tier configuration. (MB Foster Universal Server must first be installed on the server host before JDBCLink-UX can be installed) JDBCLink-UX consists of the ODBC driver Java class files and a sample JDBC client source file. To install the JDBC2 driver, run <CD Drive>\Program_Files\jdbc2\setupWin32.exe. If you are not running Windows, select the platform-specific installer from the jdbc2 directory.. The JDBC2 driver class files must be installed in your Java class path so that the Java compiler and the Java class loader can find them. JDBCLink-UX class files must be installed in your Java class path so that the Java compiler and the Java class loader can find them. Example on the Win32 Platform CLASSPATH=C:\JDK1.2.2\LIB;. You would then install JDBCLink-UX class files (mbfjdbc.jar) in the directory: C:\JDK1.2.2\LIB\ JDBCLink-UX can also be downloaded into a browser simultaneously with the Java applet being run. From the client (usually a browser), you select a URL from an HTML page that contains a Java applet tag. The web server downloads the Java applet and JDBCLink-UX to the client. JDBCLink-UX then establishes a direct connection to the MB Foster Universal Server using Java Sockets. 172 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Connection Parameters Connection Parameters The following information is required for all JDBCLink-UX connections to an MB Foster Universal Server: Host name -- The name of the server host on which the MB Foster Universal Server is running. This can either be the name of the server host, or the IP address. For example, ’myhost.mbfoster.com’ or ’123.4.5.6’. Port number -- The port number on which the MB Foster Universal Server is listening. This is specified when the listener is started on the server host in the startup command or script. The default port number for use by the MB Foster Universal Server is 21245. If a port number is not specified, this default value is used. User Name (UID) -- A valid user name (matching a UID from the Host Configuration Setup) for the MB Foster Universal Server. User Password (PWD) -- The password (if required) that matches the provided user name. Optional Parameters The following information is optional for all JDBCLink-UX connections: Client Debug Level Debug – This parameter will set the JDBCLink-UX debug level. Server Debug Level HostDebug – This parameter will set the MB Foster Universal Server debug level. Space Padding for CHAR Columns Padding – This parameter will set Space Padding for CHAR Columns. The default value is true. Login to another account LOGIN – This parameter will tell the server to change to another account. There are two formats to change the account login. If the MB Foster Universal Server is running on MPE, you should use the format: LOGIN=#session,uname/upwd.acctname/acctpwd,gpname/gppwd; If the MB Foster Universal Server is running on UNIX, you should use the format: MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 173 Connection Parameters MBF-UDALink LOGIN=# uname/upwd; Use the Secure Sockets Layer (SSL) to connect SSL – This parameter will set connection with SSL. The default value is false. URL Syntax The JDBCLink-UX connection URL string syntax is: jdbc:mbf://<host_name>[:<port_number>][;parameter=value][;…] URL Syntax (Including User Name and Password) The first connection method specifies all connection parameters in a URL string including the user name and password. java.sql.DriverManager.getConnection(url) where: String url = " jdbc:mbf://<host_name>[:<port_number>];UID=uid;PWD=pwd[;…]" URL Syntax (Without User Name and Password) The second connection method specifies the user id and password as method arguments, so this information is not present in the URL. java.sql.DriverManager.getConnection(url, uid, pwd) where: String url = " jdbc:mbf://<host_name>[:<port_number>]][;parameter=value][;…]"; String uid = "uid"; String pwd = "pwd"; 174 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using JDBCLink-UX Using JDBCLink-UX Verifying that you can compile and run Java Before using JDBCLink-UX, to further ensure that Java is set up properly on your client system, go to the samples directory (for example, C:\MBFoster\jdbc\samples if you are using JDBCLinkUX on a Windows NT machine), then see if javac (the Java compiler) and java (the Java interpreter) will run without error. Enter: Javac then enter: java Each should give you a list of options and parameters and then exit. Checking the environment variables The Java class path must be set to include JDBCLink-UX class files. Without this setting, both the Java compiler and the Java Run Time Environment will not be able to locate JDBCLink-UX. Please refer to your JDK documentation for more explicit details as to how to set the Java class path. In general, the Java class path must include the directory in which JDBCLink-UX class files have been installed. If JDBCLink-UX class files are installed in: C:\MBFoster\JDBC\mbfjdbc.jar The CLASSPATH environment variable should be: CLASSPATH=C:\JDK1.2.2\LIB\classes.zip:.:C:\MBFoster\JDBC\mbfjdbc.jar MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 175 Loading JDBCLink-UX MBF-UDALink Loading JDBCLink-UX Once the ODBC driver is installed, you can connect from your application to your database in two ways: with a connection URL through the JDBC driver manager, or with a JNDI data source. Using a connection URL The Java method that is used to load all JDBC drivers is the class.forName method. To load JDBCLink-UX, the code is: class.forName("com.mbf.jdbc.MBFDriver"); This loads JDBCLink-UX and registers it with the JDBC Driver Manager. Once a driver has been loaded and registered with the ODBC driver Manager, it is ready to be used to connect to a database(s). Alternatively, you can use the ODBC driverManager.registerDriver() method to register the JDBC driver. For example: DriverManager.registerDriver (new com.mbf.jdbc.MBFDriver ()); Opening a Connection You open a connection to the database with the static getConnection() method of the JDBC DriverManager class. This method returns an object of the JDBC Connection class which needs as input a userid, password, connect string that identifies the JDBC driver to use, and the name of the database to which you want to connect. The following example connects user "jdbcmgr" with password "chicago" to a MB Foster Universal Server through port 21249 of host "myhost", using JDBCLink-UX. Connection conn =DriverManager.getConnection ("jdbc:mbf://myhost:21249", " jdbcmgr", " chicago"); Creating a Statement Object Once you connect to the MB Foster Universal Server and, in the process, create your Connection object, the next step is to create a Statement object. The createStatement() method of your JDBC Connection object returns an object of the JDBC Statement class. To continue the example from the previous section where the Connection object conn was created, here is an example of how to create the Statement object: Statement stmt = conn.createStatement(); 176 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Loading JDBCLink-UX Executing a Query and Returning a Result Set Object To query the database, use the executeQuery() method of your Statement object. This method takes a SQL statement as input and returns an object of the JDBC ResultSet class. To continue the example, once you create the Statement object stmt, the next step is to execute a query that populates a ResultSet object with the contents of the FIRST_NAME (first name of member) and LAST_NAME (last name of member) columns of a table of membership that is named MEMBERSHIP: ResultSet rset = stmt.executeQuery ("SELECT FIRST_NAME, LAST_NAME FROM MEMBERSHIP"); Processing the Result Set Once you execute your query, use the next() method of your ResultSet object to iterate through the results. This method loops through the result set row by row, detecting the end of the result set when it is reached. To pull data out of the result set as you iterate through it, use the various getXXX() methods of the ResultSet object, where XXX corresponds to a Java datatype. For example, the following code will iterate through the ResultSet object rset from the previous section, and will retrieve and print each member first name and last name: while (rset.next()) System.out.println (rset.getString(1) + " " + rset.getString(2)); Closing the Result Set You must explicitly close the ResultSet and Statement objects after you finish using them. This applies to all ResultSet and Statement objects you create when using JDBCLink-UX. the ODBC driver does not have finalizer methods; cleanup routines are performed by the close() method of the ResultSet and Statement classes. If you do not explicitly close your ResultSet and Statement objects, serious memory leaks could occur. For example, if your ResultSet object is rset and your Statement object is stmt, close the result set and statement with these lines: rset.close() stmt.close(); Closing the Connection MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 177 Loading JDBCLink-UX MBF-UDALink You must close your connection to the database once you finish your work. Use the close() method of the Connection class to do this. For example, if your Connection object is conn, close the connection with this state ment: conn.close(); 178 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink JDBCLink-UX Functionality JDBCLink-UX Functionality JDBCLink-UX supports the JDBC 2.0 specification. The ODBC driver also supports a subset of the JDBC 2.0 Optional Package, which provides the following functionality: • Java Naming Directory Interface (JNDI) for naming data sources • Connection Pooling • Distributed Transactions Connecting Through Data Sources A JDBC2 data source is a DataSource object that provides the connection information needed to connect to an underlying database. The main advantage of using a data source is that it works with the Java Naming Directory Interface (JNDI) naming service, and it is created and managed outside of the applications that use it. Because the connection information is outside of applications, the time it takes to reconfigure your infrastructure when a change is made is minimal. For example, if the underlying database is moved to another server and uses another port number, the administrator must change only the relevant properties of the JDBC2 data source (a DataSource object). The applications using the underlying database do not need to change because they only refer to the logical name of the JDBC2 data source. Importing Packages The JDBC2 data source class implements the following interfaces defined in the JDBC 2.0 Optional Package: • javax.sql.DataSource • javax.sql.ConnectionPoolDataSource, which enables you to implement connection pooling When you use JDBCLink-UX, you should include those import statements at the beginning of your program. import javax.sql. * JDBC 2.0 Standard Extension. import javax.naming.* to support JNDI. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 179 Calling a Data Source in an Application MBF-UDALink Calling a Data Source in an Application Applications can call a JDBC2 data source using a logical name to retrieve the javax.sql.DataSource object. This object loads JDBCLink-UX and can be used to establish a connection to the underlying database. Once a JDBC2 data source has been registered with JNDI, it can be used by your JDBC application as shown in the following example: Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("jdbc/Membership"); Connection con = ds.getConnection("jdbcmgr", "chicago"); In this example, the JNDI environment is first initialized. Next, the initial naming context is used to find the logical name of the JDBC2 data source (Membership). The Context.lookup() method returns a reference to a Java object, which is narrowed to a javax.sql.DataSource object. Finally, the DataSource.getConnection() method is called to establish a connection with the underlying database. 180 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using Connection Pooling Using Connection Pooling Connection pooling allows you to reuse connections rather than create a new one every time the JDBCLink-UX needs to establish a connection to the underlying database. Connection pooling manages connection sharing across different user requests to maintain performance and reduce the number of new connections that must be created. For example, compare the following transaction sequences. Example A: Without Connection Pooling 1.The client application creates a connection. 2.The client application sends a data access query. 3.The client application obtains the result set of the query. 4.The client application displays the result set to the end user. 5.The client application ends the connection. Example B: With Connection Pooling 1.The client checks the connection pool for an unused connection. 2.If an unused connection exists, it is returned by the pool implementation; otherwise, it creates a new connection. 3.The client application sends a data access query. 4.The client application obtains the result set of the query. 5.The client application displays the result set to the end user. 6.The client application returns the connection to the pool. NOTE: The client application still calls "close()", but the connection remains open and the pool is notified of the close request. The pool implementation creates "real" database connections using the getPooledConnection() method of ConnectionPoolDataSource. Then, the pool implementation registers itself as a listener to the PooledConnection. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 181 Using Connection Pooling MBF-UDALink When a client application requests a connection, the pool implementation (Pool Manager) assigns one of its available connections. If there is no connection available, the Pool Manager establishes a new connection and assigns it to that application. When the client application closes the connection, the Pool Manager is notified by the ODBC driver through the ConnectionEventListener interface that the connection is free and available for reuse. The pool implementation is also notified by the ConnectionEventListener interface when the client somehow corrupts the database connection, so that the pool implementation can remove that connection from the pool. Once a JDBC2 data source has been registered with JNDI, it can be used by your JDBC application as shown in the following example, typically through a third-party connection pool tool: Context ctx = new InitialContext(); ConnectionPoolDataSource ds = (ConnectionPoolDataSource)ctx.lookup("jdbc/Membership"); pooledConnection pcon = ds.getPooledConnection("jdbcmgr", "chicago"); In this example, the JNDI environment is first initialized. Next, the initial naming context is used to find the logical name of the JDBC data source (Membership). The Context.lookup() method returns a reference to a Java object, which is narrowed to a javax.sql.ConnectionPoolDataSource object. Finally, the ConnectionPoolDataSource.getPooledConnection() method is called to establish a connection with the underlying database. Data source properties You can use the following connection properties with JDBC2 data sources: Table 3: Connection properties Property Name Type Description databaseName String Name of a particular database on a server dataSourceName String A data source name; used to name an underlying XADataSource, or ConnectionPoolDataSource when pooling of connections is done Description String Description of this data source networkProtocol String Network protocol used to communicate with the server Password String A database password 182 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using Connection Pooling Table 3: Connection properties Property Name Type Description portNumber int Port number where a server is listening for requests RoleName String The initial SQL rolename serverName String Database server name Username String User’s account name minCacheSize int The minimum no of connections for the Cache maxCacheSize int The maximum no of connections for the Cache Using SSL mode connections Data that travels across a network can easily be accessed by someone who is not the intended recipient. When the data includes private information, such as passwords and credit card numbers, steps must be taken to make the data unintelligible to unauthorized parties. It is also important to ensure the data has not been modified, either intentionally or unintentionally, during transport. The Secure Sockets Layer (SSL) was designed to help protect the privacy and integrity of data, while it is transferred across a network. About Java Socket Extension (JSSE) JDBCLink-UX implements SSL connection with Java Secure Socket Extension (JSSE). When you try to connect server with SSL mode, you should make sure that you have installed the Java Secure Socket Extension (JSSE) package if your JDK or JRE version is 1.2.x or 1.3.x. JSSE has now been integrated into the J2SDK, v 1.4.x A keystore is a database of key material. Key material is used for a variety of purposes, including authentication and data integrity. There are various types of keystores available, including "PKCS12" and Sun’s "JKS." Generally speaking, keystore information can be grouped into two different categories: key entries and trusted certificate entries. A key entry consists of an entity’s identity and its private key, and can be used for a variety of cryptographic purposes. In contrast, a trusted certificate entry only contains a public key in addition to the entity’s identity. Thus, a trusted certificate entry can not be used where a private key is required. In the J2SDK implementation of "JKS", a keystore may contain both key entries and trusted certificate entries. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 183 Using Connection Pooling MBF-UDALink A truststore is a keystore which is used when making decisions about what to trust. If you receive some data from an entity that you already trust, and if you can verify that the entity is the one it claims to be, then you can assume that the data really came from that entity. Properties of JDBCLink-UX SSL When you use SSL mode to connect the MB Foster Universal Server, make sure that the MB Foster Universal Server is set SSL enable. Then you must explicitly assert "SSL=true" in your connection URL. For example, the URL is "jdbc:mbf://myhost:21249;SSL=true;" You can customize SSL mode for your connection with JDBCLink-UX SSL properties Server Certificate Authenticate com.mbf.jdbc.ssl.serverAuth – This parameter declares whether the server certificate needs to authenticate or not. The default value is false. Trust Store com.mbf.jdbc.ssl.trustStore – This parameter declares where is the truststore. The default is ".keystore" in your home directory. (Note: if this property is not defined, JDBCLink-UX will use system property javax.net.ssl.trustStore) Trust Store Type com.mbf.jdbc.ssl.trustStoreType – This parameter declares what kind of the truststore. (Note: if this property is not defined, JDBCLink-UX will use system property javax.net.ssl.trustStoreType). Trust Store Password com.mbf.jdbc.ssl.trustStorePassword – This parameter declares the password of the truststore. Default is null. (Note: if this property is not defined, JDBCLink-UX will use system property javax.net.ssl.trustStorePassword). Client Certificate Authenticate com.mbf.jdbc.ssl.clientAuth – This parameter declares whether the client certificate needs to authenticate or not. The default value is false. Key Store com.mbf.jdbc.ssl.keyStore – This parameter declares where is the keystore. The default is ".keystore" in your home directory. (Note: if this property is not defined, JDBCLink-UX will use system property javax.net.ssl.keyStore) 184 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using Connection Pooling Key Store Type com.mbf.jdbc.ssl.keyStoreType – This parameter declares what kind of the keystore. (Note: if this property is not defined, JDBCLink-UX will use system property javax.net.ssl.keyStoreType). Key Store Password com.mbf.jdbc.ssl.keyStorePassword – This parameter declares the password of the keystore. Default is null. (Note: if this property is not defined, JDBCLink-UX will use system property javax.net.ssl.keyStorePassword). Client Certificate Alias com.mbf.jdbc.ssl.clientAlias – This parameter declares the alias of client certificate in keystore. The default is null. Client Key Password com.mbf.jdbc.ssl.keyPassword – This parameter declares the password of client private key. The default is null. Setting a com.mbf.jdbc.ssl Property You can set a JDBCLink-UX SSL property either statically or dynamically: To set a JDBCLink-UX SSL property statically, use the -D option of the java command. For example, to run an application named MyApp that invokes JDBCLink-UX and set the com.mbf.jdbc.ssl.trustStore property to specify a truststore named "MyCacertsFile", type the following: java –Dcom.mbf.jdbc.ssl.trustStore=MyCacertsFile MyApp To set a JDBCLink-UX SSL property dynamically, call the java.lang.System.setProperty method in your code: System.setProperty(propertyName,"propertyValue"); Substituting the appropriate property name and value. For example, your application will invoke JDBCLink-UX to do SSL mode connection, the application requests to authenticate server certificate with specify a truststore named "MyCacertsFile". So you should call setProperty for setting the com.mbf.jdbc.ssl.serverAuth and com.mbf.jdbc.ssl.trustStore properties would be: MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 185 Using Connection Pooling MBF-UDALink System.setProperty("com.mbf.jdbc.ssl.server","true"); System.setProperty("com.mbf.jdbc.ssl.trustStore","MyCacertsFile"); 186 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink JDBCLink-UX Examples JDBCLink-UX Examples // // This simple Java application loads a JDBC Driver, prompts the // user for connection information, creates the ODBC driver URL, makes // the connection to the database, and sends user provided SQL // statements to the database. // // If the result of the statement is a result set, it is printed out. // // This code and information is provided "as is" without warranty // of any kind, either expressed or implied. // // Copyright (c) 2002 MB Foster. All Rights Reserved // import java.sql.*; import java.io.*; class Sample { public static void main(String[] args) { // User input fields String hostName = getInputInfo("Host Name: "); String portNumber = getInputInfo("Port Number: "); String userName = getInputInfo("User Name: "); String userPassword = getInputInfo("User Password: "); // Create the URL based on the user input String url = "jdbc:mbf://" + hostName + ":" + portNumber; try { // Load JDBCLink-UX Class.forName("com.mbf.jdbc.MBFDriver"); // Connect to the database Connection conn = DriverManager.getConnection(url, userName, userPassword); // Main processing loop for (;;) { // Ask user for an sql statement System.out.println(""); String sql = getInputInfo("SQL (empty string to end) > "); System.out.println(""); MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 187 JDBCLink-UX Examples MBF-UDALink // If empty string, then exit if (sql == null || sql.equals("")) break; // Submit the SQL statement Statement stmt = conn.createStatement(); // If execute returns true, there is a result set if (stmt.execute(sql)) { ResultSet rs = stmt.getResultSet(); displayResultSet(rs); rs.close(); } // Otherwise, there is an update count else { System.out.println(stmt.getUpdateCount() + " rows changed."); } } stmt.close(); // End of main processing loop conn.close(); System.exit(0); } } catch (Exception e) { e.printStackTrace(); System.exit(-1); } // // This captures console input until a CR is hit and // then returns a Java String with the input. // private static String getInputInfo(String prompt) { String rtn = ""; try { byte[] buf = new byte[1024]; System.out.println(prompt); int len = System.in.read(buf); rtn = new String(buf, 0, len); 188 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink JDBCLink-UX Examples rtn = rtn.trim(); } catch (Exception ex) { ex.printStackTrace(); } } return rtn; // // Displays all columns and rows in the given result set // private static void displayResultSet(ResultSet rs) throws SQLException { // Get the ResultSetMetaData. // This will be used for the column headings. ResultSetMetaData rsmd = rs.getMetaData(); // Get the number of columns in the result set int numCols = rsmd.getColumnCount(); // For each column, print out the column names, separated by commas for (int i = 1; i <= numCols; i++) { System.out.print(rsmd.getColumnName(i)); } if (i < numCols) System.out.print(", "); System.out.println("\n"); // Print out the data, fetching until end of the result set while (rs.next()) { // For each column, print out the data as String for (int i = 1; i <= numCols; i++) { String colValue = rs.getString(i); // If data was null, use the null string instead if (rs.wasNull()) colValue = "<NULL>"; System.out.print(colValue); } if (i < numCols) System.out.print(", "); MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 189 JDBCLink-UX Examples } } 190 } MBF-UDALink System.out.println(); // Fetch the next result set row System.out.println(); MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Transaction Support in JDBCLink-UX Transaction Support in JDBCLink-UX Handling Transactions By default, all new Connection objects are in autocommit mode. When autocommit mode is on, a COMMIT statement is automatically executed after each statement that is sent to the database server. To turn autocommit mode off, explicitly call setAutoCommit(false) in Connection objects. When autocommit mode is off, the JDBCLink-UX driver implicitly starts a new transaction when the next statement is sent to the database server. This transaction lasts until the user issues a COMMIT or ROLLBACK statement. If the user has already started a transaction by executing setAutoCommit(false) and then calls setAutoCommit(false) again, the existing transaction continues unchanged. The Java program must explicitly terminate the transaction by issuing either a COMMIT or a ROLLBACK statement before it drops the connection to the database or the database server. If the Java program sets autocommit mode on while inside a transaction, the JDBCLink-UX driver rolls back the current transaction before it actually turns autocommit mode on. In a database that has been created with logging, if a COMMIT statement is sent to the database server and autocommit mode is on, a error is returned by the database server because there is currently no user transaction started. This occurs whether the COMMIT statement was sent with the Connection.commit() method or directly with an SQL statement. For an XAConnection object, autocommit mode is off by default and must remain off while a distributed transaction is occurring. The transaction manager performs commit and rollback operations; therefore, you should avoid performing these operations directly. How XA Transaction Control Works JDBCLink-UX supports distributed transactions and the two-phase commit protocol for enterprise applications. A distributed transaction is a transaction that updates multiple resource managers (such as databases) in a coordinated manner. In contrast, a local transaction begins and commits the transaction to a single resource manager that internally coordinates API calls; there is no transaction manager. The two-phase commit protocol is a method of coordinating a single transaction across two or more resource managers. It guarantees data integrity by ensuring that transactional updates are committed in all of the participating databases, or are fully rolled back out of all the databases, reverting to the state prior to the start of the transaction. In other words, either all the participating databases are updated, or none of them are updated. Distributed transactions involve the following participants: MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 191 Transaction Support in JDBCLink-UX MBF-UDALink Transaction originator initiates the transaction. The transaction originator can be a user application, an Enterprise JavaBean, or a JMS client. Transaction manager manages transactions on behalf of application programs.A transaction manager coordinates commands from application programs to start and complete transactions by communicating with all resource managers that are participating in those transactions. When resource managers fail during transactions, transaction managers help resource managers decide whether to commit or roll back pending transactions. Recoverable resource provides persistent storage for data. The resource is most often a database. Resource manager provides access to a collection of information and processes. Transaction-aware JDBC drivers are common resource managers. Resource managers provide transaction capabilities and permanence of actions; they are entities accessed and controlled within a distributed transaction. The communication between a resource manager and a specific resource is called a transaction branch. The first phase of the two-phase commit protocol is called the prepare phase. The required updates are recorded in a transaction log file, and the resource must indicate, through a resource manager, that it is ready to make the changes. Resources can either vote to commit the updates or to roll back to the previous state. What happens in the second phase depends on how the resources vote. If all resources vote to commit, all the resources participating in the transaction are updated. If one or more of the resources vote to roll back, then all the resources participating in the transaction are rolled back to their previous state. For the detail of XA API support in JDBC, please reference JDBC 2.0 specification in particular: XAResource, XADataSource, XID, XAConnection and Pooling support. Tech Tips 1: For XA transaction, JDBCLink-UX will change Allbase open mode in XA mode and normal transaction (such as autocommit transaction) can not work in this mode, so Connection.close should be called after XA transaction finishes. At this time, the logical Connection will drop to the Connection Pool. XA mode will be open when getXAResource will be called, and will continue till Connection.close is called. 2: XA functionality is more like a protocol between Transaction Manager and Resource Manager, JDBCLink-UX supports direct XA calls without Transaction Manager. 3: XA will cause the DB to be locked for prepare, if there is problem in an application or network during this time, there are two ways to unlock DB, JTA will automatically recover transaction later, or use odbcutil (reference ODBCLINK manual) from the server part. Please reference all the client and server logs carefully before manually recovering transaction. Recovery is an administrator task as it could cause loss of data. That is one of the reasons we do not support XAResource.forget in our driver. 192 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Transaction Support in JDBCLink-UX 4: Before starting to program for XA transactions, understanding more about two-phase commit, in particular roles of TM and RM, can be very helpful. If you have a special requirement for transaction control, please contact M.B. Foster. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 193 Interface Support MBF-UDALink Interface Support The following tables describe the interface support for various transaction methods: Table 4: Javax.sql XAConnection Method getXAResource Version introduced 2.0 Supported Comments Yes Table 5: Javax.sql XADatasource Method Version introduced Supported getLoginTimeout 2.0 Yes getLogWriter 2.0 Yes getXAConnection 2.0 Yes setLogWriter 2.0 Yes setLoginTimeout 2.0 Yes getLoginTimeout 2.0 Yes Comments Table 6: Javax.xa XAResource Method Version introduced Supported commit 2.0 Yes end 2.0 Yes 194 Comments MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Interface Support Table 6: Javax.xa XAResource Method Version introduced Supported forget 2.0 No getTransactionTimeout 2.0 Yes isSameRM 2.0 Yes prepare 2.0 Yes recover 2.0 Yes rollback 2.0 Yes setTransactionTimeout 2.0 Yes start 2.0 Yes Comments Table 7: Javax.xa.Xid Method Version introduced Supported getFormatId 2.0 Yes getGlobalTransactionId 2.0 Yes getBranchQualifier 2.0 Yes MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 Comments 195 Interface Support MBF-UDALink Table 8: Javax.xa.XAException Method Version introduced Supported Comments getXAErrorCode N/A Yes getXAErrorMessage N/A Yes Pass nothing getXAErrorMessage N/A Yes Pass error code in 196 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Example of an XA transaction Example of an XA transaction The following code may not work properly on your computer. It is for reference only. /* */ A sample of XA demo. // You need to import the java.sql package to use JDBC import java.sql.*; import javax.sql.*; import com.mbf.jdbc.*; import com.mbf.jdbc.xa.MBFXid; import com.mbf.jdbc.xa.MBFXAException; import javax.transaction.xa.*; class XA1 { public static void main (String args []) throws SQLException { try { DriverManager.registerDriver(new MBFDriver()); String url = "jdbc:mbf://191.1.2.3:7777"; try { String url1 = System.getProperty("JDBC_URL"); if (url1 != null) url = url1; } catch (Exception e) { // If there is any security exception, ignore it // and use the default } // Connect to the database Connection conn = DriverManager.getConnection (url, "user", "password"); // Prepare a statement to create the table Statement stmt = conn.createStatement (); try { MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 197 Example of an XA transaction MBF-UDALink // Drop the test table stmt.execute ("drop table my_table"); } catch (SQLException e) { // Ignore an error here } try { // Create a test table stmt.execute ("create table my_table (col1 int)"); } catch (SQLException e) { // Ignore an error here too } // Create a XADataSource instance MBFXADataSource mxds = new MBFXADataSource(); mxds.setURL(url); mxds.setUser("user"); mxds.setPassword("password"); // get a XA connection XAConnection pc = mxds.getXAConnection(); // Get a logical connection Connection conn1 = pc.getConnection(); // Get XA resource handle XAResource mxar = pc.getXAResource(); Xid xid = createXid(); // Start a transaction branch mxar.start (xid, XAResource.TMNOFLAGS); // Create a Statement Statement stmt1 = conn1.createStatement (); // Do some DML stmt1.executeUpdate ("insert into my_table values (7321)"); // Close the Statement stmt1.close(); stmt1 = null; 198 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Example of an XA transaction // End the branch mxar.end(xid, XAResource.TMSUCCESS); // Do a 1 phase commit mxar.commit (xid, true); // Close the connection conn1.close(); conn1 = null; // close the XA connection pc.close(); pc = null; ResultSet rset = stmt.executeQuery ("select col1 from my_table"); while (rset.next()) System.out.println("Col1 is " + rset.getInt(1)); rset.close(); rset = null; stmt.close(); stmt = null; conn.close(); conn = null; } } catch (SQLException sqe) { sqe.printStackTrace(); } catch (XAException xae) { xae.printStackTrace(); } static Xid createXid() throws XAException { byte[] data = new byte[128]; byte[0] = (byte)'a'; byte[64] = (byte)'b'; Xid xid = new MBFXid(0x1234, 64, 64, data); return xid; MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 199 Example of an XA transaction } 200 MBF-UDALink } MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC Driver Overview The ODBC driver ODBC Driver Overview ODBC driver is an implementation of Microsoft’s Open Database Connectivity (ODBC) Protocol. It enables Microsoft Windows-based applications and tools to access relational (SQL) databases through a Winsock connection. In an ODBC environment, application developers and end users can take advantage of the PC’s graphical user interface (GUI) and processing power, while relying on the security, integrity, and database management capabilities of the server database environment. There are many different types of ODBC implementations. The most popular are referred to as Thin Client and Thick Client. In a thin client environment, the processing is done on the server where the resources are better equipped to deal with large volumes of data. A thick client will transfer the raw data down to the desktop for processing. ODBC driver is a thin client. It allows the processing of data to take place on the server before moving the results to the client. It goes beyond the definition of the ODBC standard by providing access to Eloquence tables, user-defined sequential files, flat files, and PowerHouse PDL. ODBC driver supports Winsock and serial connection (through modem) to server data in addition to Eloquence tables, ALLBASE/SQL and Oracle databases. Flat files can be accessed via the PowerHouse PDL, a file definition dictionary (FDGEN), or a View. The Views option of MBF-UDALink provides the ability to create Views and enable field value security. PowerHouse dictionary support also includes support for PowerHouse subfiles. ODBC compliancy level The ODBC driver is Level 3.5-compliant, with the following exceptions: SQLBrowseConnect, SQLExtendedFetch and SQLSetPos Scalar function SQL_BIT, SQL_TINYINT, and SQL_BIGINT data types MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 201 ODBC Driver Overview MBF-UDALink Client environment ODBC driver is compliant with the following operating systems: Windows 98, WindowsNT 4.0 and Windows 2000. ODBC driver supports LAN connections, direct or dial-up on all platforms and under all operating systems. With ODBC driver and application software, you can develop SQL applications, generate reports, and query the database on the server. The tested client applications include: Cognos Axiant Cognos Impromptu Lotus Approach PowerBuilder Crystal Reports MSExcel MSAccess MSQuery Visual Basic Visual C++ Visual FoxPro Paradox Server environment The ODBC driver runs on an HP 9000, under HP-UX 10.2 or greater. The database environment on these platforms can be Eloquence tables, ALLBASE/SQL or ORACLE. Security is provided by HP-UX and the database environment. A listener process running on the server responds to client requests. The connecting link Dynamic link libraries (DLLs) on the client are used to connect the client to the server. Desktop applications make the request for data to the Driver. The ODBC driver makes the request of the server to establish access to the appropriate data repository through Winsock or the native communications driver (for serial and modem). Once established, the reply is returned to the client, along the same route. 202 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC Driver Overview Use the ODBC driver in a thin client environment for fast and reliable multi-thread access to hostbased data. Host-based security ensures you retain control of data integrity and access controls. ODBC driver requirements HP 9000 server requirements Operating systems supported: HP-UX 10.2 or greater Databases supported Eloquence ALLBASE/SQL ORACLE Networks supported Sockets configured and running Client requirements Platform Pentium processor 16 mb memory 10 mb of free disk space Operating systems Windows 98, Windows NT Version 4.0 and Windows 2000 Networks supported Winsock or other TCP/IP software Software provided Server program for the HP 9000 Client programs for 32-bit platforms MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 203 ODBC Driver Overview MBF-UDALink Field types supported All data types supported by Eloquence, ALLBASE/SQL and Oracle SQL commands supported Complete ALLBASE/SQL syntax, and a subset for Eloquence tables that are accessed directly. 204 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Supported ODBC functions Supported ODBC functions The ODBC functions are listed here for application software developers. These functions are supported by ODBC driver at the time of publication. You can use the ODBC SQLGetFunctions call for a list of the supported ODBC driver functions. Descriptions and conformance designations are listed in the ODBC API Reference, included with the Microsoft Software Developers Kit (SDK). Functions that are not completely implemented or are only in the ODBC 2 version of the driver are noted by an R in parentheses and are discussed below. SQLAllocConnect(R1) SQLError(R1) SQLSetParam SQLAllocEnv(R1) SQLExecute SQLPrepare SQLAllocStmt(R1) SQLExecDirect SQLPrimaryKeys SQLBindCol SQLFetch SQLProcedureColumns SQLBindParam SQLForeignKeys SQLProcedures SQLCancel SQLFreeConnect(R1) SQLRowCount SQLColAttributes (R1)(R2) SQLFreeEnv(R1) SQLSetConnectOption(R1) (R3) SQLColumns SQLFreeStmt(R1) SQLSetCursorName SQLColumnPrivileges SQLGetConnectOption(R1) SQLSetStmtOption(R1) (R4) SQLConnect SQLGetCursorName SQLSpecialColumns SQLDataSources SQLGetFunctions SQLStatistics SQLDescribeCol SQLGetInfo SQLTablePrivileges SQLDisconnect SQLGetTypeInfo SQLTables SQLDriverConnect SQLNumResultCols SQLTransact(R1) SQLSetStmtOption(R1) Functions that are ONLY implemented in the ODBC 3 version of the driver: SQLSetDescField SQLGetDescField SQLGetDescRec SQLSetDescRec SQLCopyDesc MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 205 Supported ODBC functions MBF-UDALink R1 Functions implemented in ODBC3 version of the driver which replace ODBC 2 functions: SQLAllocHandle(replaces SQLAllocEnv,SQLAllocConnect,SQLAllocStmt) SQLFreeHandle(replaces SQLFreeEnv,SQLFreeConnect,SQLFreeStmt) SQLGetDiagField(Additional functionality replaces SQLError) SQLGetDiagRec(Additional functionality replaces SQLError) SQLEndTran (replaces SQLTransact - SQLCommit/SQLRollback) SQLSetConnectAttr(replaces SQLSetConnectOption ) SQLGetConnectAttr (R3) (replaces SQLGetConnectOption) SQLGetStmtAttr(replaces SQLGetStmtOption) SQLSetStmtAttr(R4)(replaces SQLSetStmtOption) SQLColAttribute(R2)(replaces SQLColAttributes) R2 The following SQLColAttribute(s) options are implemented; the others return 'Not Implemented'. SQL_COLUMN_COUNT SQL_COLUMN_PRECISION SQL_COLUMN_NAME SQL_COLUMN_SCALE SQL_COLUMN_TYPE SQL_COLUMN_DISPLAY_SIZE SQL_COLUMN_LENGTH SQL_COLUMN_NULLABLE R3 The following SQLSetConnectOptions SQLSetConnectAttr are supported. All others return a Driver not Capable (SQLState S1C00). SQL_AUTOCOMMIT 1=ON (default) 0=OFF SQL_OPT_TRACE Supported by Driver Manager 206 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Supported ODBC functions SQL_OPT_TRACEFILE Supported by Driver Manager SQL_TRANSLATE_DLL Supported SQL_TRANSLATE_OPTION Supported SQL_TXN_ISOLATION Supported: Cursor Stability isolation level (CS) is not supported by SQLSetConnectOption but you may set it from the ODBC Administrator. SQL_TXN_READ_UNCOMMITTED (Read Uncommitted (RU)) SQL_TXN_READ_COMMITTED (Read Committed (RC)) SQL_TXN_REPEATABLE_READ (Read Repeatable (RR)) SQL_TXN_SERIALIZABLE (Note: Sets to Repeatable Read (RR)) SQL_TXN-VERSIONING Not Implemented - DO NOT USE R4 The SQLSetStatementOption(ODBC 2) options that are implemented in the ODBC 2 version of the driver are: SQL_QUERY_TIMEOUT SQL_MAX_ROWS For the ODBC 3 version of the driver, the SQLSetStmtAttr(ODBC 3) attributes that are implemented within the ODBC driver are: SQL_ATTR_QUERY_TIMEOUT SQL_ATTR_MAX_ROWS SQL_ATTR_APP_PARAM_DESC SQL_ATTR_APP_ROW_DESC SQL_ATTR_PARAM_BIND_OFFSET_PTR SQL_ATTR_PARAM_BIND_TYPE SQL_ATTR_PARAM_OPERATION_PTR MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 207 Supported ODBC functions MBF-UDALink SQL_ATTR_PARAM_STATUS_PTR SQL_ATTR_PARAMS_PROCESSED_PTR SQL_ATTR_PARAMSET_SIZE SQL_ATTR_ROW_ARRAY_SIZE SQL_ATTR_ROW_BIND_OFFSET_PTR SQL_ATTR_ROW_BIND_TYPE SQL_ATTR_ROW_OPERATION_PTR SQL_ATTR_ROW_STATUS_PTR SQL_ATTR_ROWS_FETCHED_PTR Any other options/attributed will return either OPTION_VALUE_CHANGED, if set to other than the ODBCdrivers default, or DRIVER_NOT_CAPABLE, or in the ODBC 3 version may be ignored. 208 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Performance considerations Performance considerations Most people find ODBC access to their server very fast. You should, however, be aware of the following considerations. While reading and sorting a large table, the host may not return control to the client until the entire database has been read and sorted. If this occurs, even restarting your PC will have no effect. You must manually abort the server, terminate the connection with the ISQL Terminate User command, or terminate the process using MBF-Console. When opening a large table in MS Access, the program typically displays a screenful of data and then seems to wait for user input. In many cases, however, it is downloading data to the client in the background. You should think about this when giving users ODBC access to large tables on the server. You can give or withhold access to certain tables with the ALLBASE/SQL GRANT and REVOKE commands. As a rule of thumb, ODBC driver does not complete any request faster than ISQL does, and may be slower due to network overhead. If you are writing your own SQL, you may want to verify in ISQL how ALLBASE/SQL optimizes your queries by reading the SYSTEM.PLAN pseudo-table. Refer to the ALLBASE/SQL manual for details. If you are writing your own SQL to do multi-row inserts or updates, you can speed up your application by using dynamic substitution parameters. See the ODBC SDK manual (from Microsoft Press) for details. Note: If you are developing applications that use an ODBC interface, you may want to obtain a copy of the Microsoft Developer Network (MSDN) Professional (Level 2) from Microsoft. The MSDN contains the ODBC Software Developers Kit (SDK), which includes the ODBC API reference, sample ODBC applications, and other technical information to assist you in developing your applications. There are also many good books written on the use of ODBC. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 209 Using stored procedures MBF-UDALink Using stored procedures The ODBC driver implements all ALLBASE/SQL stored procedures, including those that return multiple-format results sets. You can list the stored procedures available to your ODBC session by calling SQLProcedures. You can also get parameter information for stored procedures by calling SQLProcedureColumns. Stored procedures return data either through bound parameters or through one or more results sets. To get a return value that is a procedure parameter, prepare an SQL statement (with SQLPrepare) of the form: {?=call owner.procedure (?,?..)} Bind the parameters with SQLBindParameter, specifying an output parameter where appropriate. (SQLProcedureColumn will tell you which are input parameters, which are output parameters, and which are input/output parameters.) Call SQLExecute. The return value(s) are copied into your stack according to the SQLBindParameter specifications. Note that all stored procedures return an integer return status called RETURN_STATUS. If your stored procedure returns one or more result sets, you call SQLNumResultCols, SQLDescribeCol, SQLFetch, SQLGetData normally, as you would for any Select statement. If the procedure returns only one result set, you call SQLMoreResults when you get to the end of the first result set. You can then retrieve another result set. Turning AutoCommit on/off AutoCommit on is the default value for all ODBC drivers. Turning AutoCommit on/off is normally accomplished by the application calling SQLSetConnectOption. The AutoCommit on/off setting in ODBC Administrator is there for historical reasons only and should not be used. 210 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Supported data types Supported data types The following table details the correspondence between HP data types and ODBC data types. HP DATA TYPE ODBC DATA TYPE DESCRIPTION CHAR, max length <255 SQL_CHAR CHAR, max length >=255 SQL_LONGVARCHAR VARCHAR, max length <255 SQL_VARCHAR VARCHAR, max length >=255 SQL_LONGVARCHAR BINARY, length <256 SQL_BINARY BINARY, length >=256 SQL_LONGVARBINARY VARBINARY <256 SQL_LONGVARBINARY VARBINARY >=256 SQL-LONGVARBINARY LONG BINARY SQL_LONGVARBINARY LONG VARBINARY SQL_LONGVARBINARY INTEGER (32-bit) SQL_INTEGER SMALLINT (16-bit) SQL_SMALLINT DECIMAL (Internal representation is packed decimal) SQL_DECIMAL FLOAT(24) or REAL or SQL_REAL FLOAT(53) or DOUBLE PRECISION or SQL_DOUBLE DATE SQL_DATE 6-byte with year, month, day in 2-byte binary fields TIME SQL_TIME 6-byte with hour, minute, second in 2-byte binary fields MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 Character representation with leading sign and decimal point 211 Supported data types MBF-UDALink DATETIME SQL_TIMESTAMP 16-byte made up of year(2), month(2), day (2), hour (2), minute (2), second (2), fraction (4) INTERVAL SQL_CHAR Format is Addddddd hh:mm:ss.fff@ Note: When creating a table using CHAR and Binary data types that are greater than 255 characters, the resulting data types used will be LONGVARCHAR and LONGVARBINARY. This may not be the data type expected by the application. Notes on data types Updates to LONGVARCHAR and LONGVARBINARY items are not supported. To retrieve them, call SQLFetch and SQLGetData in chunks. When a zoned-decimal item is a key item in a dataset and qualifying data according the value of the item, the DBFIND is done twice, once for the signed value and, if no entries are found, again for the unsigned value. This won’t work if both signed and unsigned values are present in the database. Notes on ODBC data types SQL_CHAR can only go up to 255 bytes. Everything longer must go into a LONGVARCHAR. SQL_DECIMAL is a character-based value, with leading sign and decimal point. SQL_DATE is a 6-byte binary value, with the year in bytes 0-1, month in bytes 2-3, and day in bytes 4-5. Determining the data type Run MBFUTIL with the user ID and password you are using and do a SHOW <tablename>. 212 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Supported data types Notes on using BLOBs When creating an ALLBASE table for storage of BLOBs, use a LONG VARBINARY column. ALLBASE will allocate storage space according to the actual size of the BLOB. For example, creating a table with a column defined as LONG VARBINARY (200000000) and writing a 10K BLOB to it results in only 10K of space being used (not the maximum of 2 GB as specified when the column was created). Although you can store a BLOB using a LONGBINARY column, this is not recommended because ALLBASE will allocate storage space according to the specified column size for each BLOB regardless of the size of the actual data. For example, creating a table with a column defined as LONGBINARY(1000000) and writing a 10K BLOB will result in 1000000 bytes of space being used for each BLOB. You would quickly run out of space in your database. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 213 Isolation levels MBF-UDALink Isolation levels Isolation levels allow you to control the degree of concurrency by regulating the extent to which operations performed by one user in a multi-user environment can be affected by operations performed by another user. ALLBASE/SQL allows four different isolation levels: • Cursor Stability (CS) • Repeatable Read (RR) • Read Committed (RC) • Read Uncommitted (RU) ODBC driver uses the isolation level specified in the ODBC setup screen. The application can later change this by calling SQLSetConnectOptions with the SQL_TXN_ISOLATION option. The recommended isolation level is RU for Read Uncommitted. This minimizes the number of locks that are held on your database. Refer to the ALLBASE/SQL Reference Manual for further information. 214 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC Translator ODBC Translator Select “Roman8 to PC-ANSI Translator” if you want extended characters on your HP 9000 (such as foreign accented characters) to appear correctly on your PC. The translation goes both ways. For example, extended characters are entered on the PC and sent to the host in an SQL update or insert operation will be translated. Note: The ODBC Translator is 16 bit double bite support read. It gives access to Asian Characters. The MS Code Page Translator is a DOS based translator. The Roman9 to PCANSI Translator will recognize the symbol for the European Currency Symbol, known as the Euro. Select Translator Window After setting up the data source, the translator window is displayed. To change the translator options select the appropriate ODBC translator and click OK. The Data Source Administrator window is re-displayed. Select:OK to return to the Control Panel. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 215 Extended features of the ODBC driver MBF-UDALink Extended features of the ODBC driver The following is a list of features that are specific to ODBC driver. Character set conversion The ODBC driver converts characters greater than 127 between Windows ANSI and Roman-8. Additional character set translations are planned for the future. Primary key name returned by SQLStatistics Most ODBC applications, including Microsoft Access, Visual Basic and PowerBuilder, require a unique primary key for a table to be updatable. The algorithm used to locate the primary key is as follows: If the table or dataset is defined as a SnapShot (the default), no primary key is returned and the table is not updatable. If there is a PrimaryKey specified for the table or dataset in the HOSTCONF Utility, it is used. Note: ALLBASE/SQL Views are not updatable and the primary key is ignored. If no PrimaryKey specified, the algorithm does the following: For ALLBASE/SQL tables, the algorithm tries to locate a hashed or unique index on the table. If it cannot find one, no primary key is returned and the table is not updatable. Updating search and sort items in Eloquence Details To update, search, or sort items in Eloquence Details, enable the CIUPDATE (critical item update) option via DBUTIL. Date support and Year 2000 Version 5.6 adds a large number of date datatype conversions to support the various date types available in Reporter. These include the following: Char, Integer, Packed, and Zoned dates in YMD, MDY, and DMY formats, with either two or four digits years, as well as CYMD, ASK, and Julian formats. To support two-digit years, a century delimiter parameter has been added as a setvar. The parameter is set using SETVAR ODBC_CENTURY_DELIMITER # (where # is a number between 0 and 99 and has a default of 0). Another new feature of date conversion is the ability to address invalid dates as null. This is enabled by using SETVAR ODBC_NULLIFY_INVALID_DATES 1 (default is 1). 216 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Extended features of the ODBC driver Eloquence character fields Eloquence character fields are assigned data type CHAR (or LONGVARCHAR if the length is greater than 254 bytes and nullable). If a field contains all spaces, it is considered null. All other data types are non-nullable. In addition, the primary key is always non-nullable. Eloquence subfielded fields Subfielded fields in Eloquence are assigned an underscore followed by a number, e.g. FIELD_1, FIELD_2, etc. To concatenate Eloquence character-type subfielded fields into one field, set the environment variable ODBC_CONCATENATE_SUBFIELDS to 1 before running the server. Eloquence locking strategy ODBC driver always locks Eloquence datasets at the minimum possible level. For updates and deletes, this involves locking at the item level for the key that has the most associated master records (on a detail) or the primary key on a master. For DBPUT, there is no choice but to lock the entire dataset. All locks are done conditionally and are repeated at approximately 0.5 second intervals until they succeed or until the server times out. Automatic masters in Eloquence not reported Automatic master datasets do not show on the tables list. To override, set environment variable ODBC_SHOW_AUTOMATIC_MASTERS to a non-zero value. Viewing the access path of an Eloquence query To view the access strategy and I/Os made by the server, run ODBCUTIL with environment variable ODBC_DEBUG set to 5. You may also view the keys that were found by the server, and all the columns in the table, by running ODBCUTIL and entering the command SHOW <TableName>. Detection of keys on ALLBASE/SQL ODBC driver will locate and report keys on an ALLBASE/SQL table. Unsupported data types Unsupported data types are returned as BINARY. It is up to the application to convert them. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 217 Extended features of the ODBC driver MBF-UDALink Sending a file to the host SQLPutFile (an ODBC extension) sends a file to the host. It takes two parameters: the file name on the PC and the file name on the host. The file is created with short records 2 bytes long. Padding may occur on the last byte. Reading or writing ALLBASE/SQL LongVarBinary items Any file on the HP can be inserted into an ALLBASE/SQL LongVarBinary field with the command: INSERT INTO Table VALUES (..., '<BLOB >%$', ...); where BLOB is the name of the file on the HP and “>%$” tells ALLBASE/SQL to copy the contents to a memory location when retrieving the row. You can also have ALLBASE/SQL copy the contents to a file during retrieval “<BLOB>OUTFILE”). In either case, the data can be retrieved in the standard way (SQLFetch followed by SQLGetData in chunks). You can also create a binary column on the HP by using ODBC functions call sequence: SQLPrepare, SQLBindparameter (DATA_AT_EXECUTION), SQLExecute, SQLParamData, SQLPutData. Refer to the ODBC SDK manual for details. Maximum number of statements ODBC driver supports up to 50 concurrent statements, or cursors, per connection. However, SQLGetInfo with option SQL_MAX_STMT set to 1 will only report 1 as the maximum number of concurrent statements. This is because multiple statements (or cursors) in ALLBASE/SQL on the same connection are not truly independent. Having SQLGetInfo return 1 for SQL_MAX_STMT forces MS Access and other applications to use multiple connections (multiple SQLDriverConnect’s) instead of multiple statements on the same connection (one SQLDriverConnect and multiple SQLAllocStmt’s). You can use multiple statements from in the same connection. (In fact, some applications ignore the SQLGetInfo and do this anyway.) There is a performance advantage to doing things this way because a new statement (or cursor) in ALLBASE/SQL takes much less overhead than a new connection. However, you should be aware of the following: 218 • In ALLBASE/SQL, a COMMIT or ROLLBACK operation closes all open cursors in the connection. If you have multiple Select statements going on different statements, the next time you SQLFetch on one statement, after a Commit on another statement, you will get the following error: “ALLBASE has closed the cursor for this statement”. You may not get this error immediately because ODBC driver caches a certain number of rows during a fetch. • If you are in AUTOCOMMIT mode ON (this is the default option, set through MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Extended features of the ODBC driver SQLSetConnectOptions and in ODBC Administrator), there is an implicit Commit done whenever you fetch the last row. This is so that locks held on the database by the open cursor are released. This may destroy other open cursors. Note: Opening a table for the first time automatically triggers various initialization calls that cause a commit to be performed when AUTOCOMMIT is ON. • If you are using prepared statements with substitution parameters to insert or update, you need not be concerned about this. The prepared statement will still be valid after a Commit. You can bind new parameters and SQLExecute again with no problem. Prepared statements are SQL statements with question marks “?” that you SQLPrepare and then call SQLBindParam or SQLBindCol. Refer to ODBC SDK for details. If you want to specify the max number of statements the driver should use, set the desired number in the ODBC driver setup thru the ODBC Administrator. See ODBC Driver client Configuration later in this chapter. Multiple serial connections ODBC driver does not support multiple serial connections. If you get a message "Connection in use", exit your application and try again. New SQLGetInfo types These return (or expect and return) a LONG value: 1000 Expected length of a BLOB being received by SQLFetch during asynchronous execution. 1001 Number of bytes sent by SQLPutFile. 1002 Number of bytes received in current transmission block. 1003 Block number being received. 1004 Current column number being received by SQLFetch. 1005 Number of substitution parameters (after SQLPrepare). 1006 Expects the parameter number, returns the ODBC data type. Note: These functions have to be called directly into ODBCLINK.DLL (not ODBC.DLL) because they are not supported by the Microsoft driver. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 219 Extended features of the ODBC driver MBF-UDALink SQLGetDataCol This is an ODBC extension. It works the same way as SQLGetData but uses a null-terminated column name instead of the icol parameter. NOTES: You must call this function into UDALINK2.DLL or UDALINK3.DLL. You should not mix calls between ODBC.DLL and UDALINK2.DLL or UDALINK3.DLL. ODBC.DLL uses its own statement and connection handles which are different than the ones it passes to UDALINK2.DLL or UDALINK3.DLL. SQLPutData This function is not supported for SQL_LONGVARCHAR and SQL_LONGVARBIN types. Use SQLPutFile followed by an SQLExecDirect (INSERT) instead. SQLSetCursorName The cursor naming and updating functions are not supported. Substitution parameter Most applications (such as MS Access), use ODBC by calling substitution parameters functionality. Most commonly used functions include: SQLPrepare, SQLSetParam and SQLBindParameter, SQLGetData. New 7.01.00 release extends support to all these functions thus improving our Dynamic SQL driver support. SQLForeignKey This functionality is used to automatically determine and show relationship between selected tables. This interface will return: 1: A list of foreign keys in the specified table (columns in the specified table that refer to primary keys in other tables). 2: A list of foreign keys in other tables that refer to the primary key in the specified table. The driver returns each list as a result set on the specified statement SQLTablePrivileges Returns a list of tables and the privileges associated with each table. The driver returns the information as a result set on the specified statement. 220 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Extended features of the ODBC driver SQLColumnPrivileges Returns a list of columns and associated privileges for the specified table. The driver returns the information as a result set on the specified StatementHandle. SQLProcedure Returns the list of procedure names stored in a specific data source. Procedure is a generic term used to describe an executable object, or a named entity that can be invoked using input and output parameters. SQLProcedureColumns Returns the list of input and output parameters, as well as the columns that make up the result set for the specified procedures. The driver returns the information as a result set on the specified statement. SQLProcedure and SQLProcedureColumn provide a way for programmers to build SQL statements that execute procedures and may provide a way for programmers to test procedures, such as call SQLProcedure to list available procedures and SQLprocedureColumns to list the input, input/output, and output parameters, the procedure return value, and the columns of any result sets created by a procedure. ALLBASE/SQL restrictions on ODBC grammar The following table summarizes the ALLBASE/SQL restrictions on the ODBC grammar. Statement Programming Considerations CREATE TABLE UNIQUE PRIMARY KEY must follow NOT NULL DROP TABLE ALLBASE/SQL does not provide CASCADE or RESTRICT REVOKE ALLBASE/SQL does not provide RESTRICT ALLBASE/SQL provides a DATETIME data type that is similar to TIMESTAMP. ALLBASE/SQL does not implement optimistic locking. Optimistic locking occurs when the DBMS does not lock data until just before an update is made. This improves concurrency because locks are not held for long. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 221 Extended features of the ODBC driver MBF-UDALink ANSI character set The HP 9000 uses the default ROMAN8 character set. Most Windows applications use the 8-bit ANSI (ISO 8859/1) character set to provide support for Western European languages as well as American English. The first 127 characters are the same for both ROMAN8 and ANSI character sets. Only the extended and special characters are different. If your client application uses these extended or special characters, the data from the database server must be converted from ROMAN8 to ANSI. The data returning to the database server must be converted from ANSI to ROMAN8. To activate the conversion, select the “Roman8 to PC-ANSI translation” DLL during the data-source setup. The conversion takes place on the client. Bind variables of datatype CHAR and VARCHAR are also converted. A bind variable in an SQL statement is associated (bound) to variables defined in a program. A bind variable is another name for a dynamic parameter. For more information, refer to the ALLBASE/SQL Reference Manual. A few characters cannot be converted to ROMAN8 and then back to ANSI. For example, when the copyright sign in ANSI is converted to ROMAN8, it is changed to a lowercase "c." When the data is returned to the client, the copyright sign cannot be recognized because of the conversion process. The following characters, sent from the client, cannot be properly converted from ANSI to ROMAN8 in a round-trip fashion. (The hex designation is listed along with the character name.) 222 A6 broken bar A9 copyright sign AC not sign AE registered trade mark B2 superscript 2 B3 superscript 3 B8 cedilla B9 superscript 1 D7 multiply sign F7 divide sign MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Extended features of the ODBC driver Similarly, the following characters, sent from the database server, cannot be properly converted from ROMAN8 to ANSI in a round-trip fashion. A9 accent grave AA circumflex accent AC tilde accent BE Dutch guilder EB upper-case S caron EC lowercase s caron EE upper-case Y umlaut F6 long dash FC solid box Unsupported ALLBASE/SQL statements Some ALLBASE/SQL statements are not supported in the ODBC driver environment. • Several ALLBASE/SQL statements work only with embedded SQL. ODBC driver does not support embedded SQL. • Some ALLBASE/SQL statements relate to functions, such as connection, that have been replaced by functions resident on the client. • Some ALLBASE/SQL functions should be restricted to the DBA. Statements controlling these functions are accessible only through Interactive Structured Query Language (ISQL) on the server. • ODBC driver internally prepares an SQL statement to be dynamically preprocessed. Therefore, you cannot use statements such as EXECUTE IMMEDIATE. Refer to the "PREPARE" section of the "SQL Statements" chapter in the ALLBASE/SQL Reference Manual for a list of statements that cannot be prepared. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 223 Extended features of the ODBC driver MBF-UDALink ALLBASE/SQL statements that work with embedded SQL Client application software accessing ALLBASE/SQL databases through the ODBC driver does not support embedded SQL. The application software calls the database functions directly. There is no need for preprocessing. The following ALLBASE/SQL statements function only with embedded SQL. They are not supported by the ODBC driver: CLOSE CURSORFETCH BEGIN DECLARE SECTIONINCLUDE DECLARE CURSOROPEN DESCRIBE PREPARE END DECLARE SECTIONREFETCH EXECUTE SQLEXPLAIN EXECUTE IMMEDIATEWHENEVER ALLBASE/SQL statements replaced by client functions Some functionality has moved from the database server to the client with ODBC driver. The following ALLBASE/SQL statements are no longer supported. They have been replaced by other functions resident on the client: CONNECT SET MULTITRANSACTION DISCONNECT START DBE RELEASE START DBE NEW RESET START DBE NEWLOG SET CONNECTSTOP DBE 224 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Creating a DBEnvironment on the HP 9000 Creating a DBEnvironment on the HP 9000 If you do not have an existing database for testing purposes, you can create a DBEnvironment called PartsDBE. Follow these steps to create the PartsDBE database on the HP 9000: To create PartsDBE only, without preprocessing or compiling any sample programs, execute the setup script as follows: $ /opt/allbase/lib/hpsql/setup 2 The script copies the hpsql/sampledb directory into your current working directory. Then it creates and loads the two databases in the PartsDBE DBEnvironment in the new sampledb directory. Note: For a complete explanation of the procedures necessary to create the PartsDBE DBEnvironment, refer to the appendix "Sample DBEnvironment" in the ALLBASE/SQL Reference Manual. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 225 Supported SQL syntax MBF-UDALink Supported SQL syntax Eloquence The ODBC driver implements a subset of SQL for Eloquence databases. It takes an SQL statement and translates it into the series of Eloquence calls (DBFIND, DBGET, etc.) required to optimally read the data. It then does internal processing for joins, calculated columns, sorts, etc. Finally, it returns the data to the client as a rowset (table of rows and columns). Query optimization is invisible to the user (except in terms of speed). Not all queries are optimizable. Some may require a serial read of the database. Fully supported SQL • Simple SELECT, UPDATE, INSERT, DELETE: no restrictions. • ORDER BY: no restrictions • GROUP BY AND AGGREGATE FUNCTIONS • WHERE clause: no restrictions except for subqueries. Partially supported SQL • Joins: Inner joins and Left Outer Joins supported. Both ways of specifying join syntax are supported ("SELECT ... WHERE T1.key = T2.Key" and “SELECT ... FROM table1 T1 LEFT OUTER JOIN table2 T2 ON T1.key = T2.key”). • Conversion functions in Select list: only SUBSTRING is supported. • Calculated columns: all numeric data types are converted to double-float. • SELECT COUNT(*) FROM ... Usually it returns the count of the largest number of records that may qualify (up to the dataset capacity), before join expansion, and before any record qualification is done. • TRANSACTION CONTROL: The ability to commit and rollback transactions. It is disabled by default, that is, the AutoCommit option is on by default. This means all inserts/updates/deletes to the databases are normally performed immediately, with no possibility of rolling back the transaction. To use transaction control on ALLBASE/SQL databases, do the following: Disable the AutoCommit option by calling SQLSet connection Option with fOption=102(SQLAUTOCOMMIT) and vParam=0 (SQL_AUTOCOMMIT_OFF) Call SQLExecDirect with your INSERT/UPDATE/DELETE operation. Call SQL Transact with fType=0 (SQL_COMMIT and 1(SQL-ROLLBACK). 226 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Supported SQL syntax ISOLATION LEVELS refers to the level of locking the host uses when reading the database. To set isolation level with ODBC driver, you call SQLSetConnectOption with fOption=108 (SQL_TXN_ISOLATION) and a vParam that is either 1 (SQL_TXN_READ_UNCOMMITTED, 2 (SQL_TXN_READ_COMMITTED), or 4(SQL_TXN_REPEATABLE_READ). Refer to the ALLBASE/SQL Manual for a description of isolation levels. • SELECT FOR UPDATE. You can lock data on a read of an ALLBASE/SQL database (before doing an update) by using the construct: “SELECT ... FROM table WHERE conditions FOR UPDATE”. When the record(s) are retrieved, the operation will lock the rows qualified by the WHERE clause until you Commit or Rollback the data. Use this feature to ensure the selected data remains stable until you can update it. Unsupported SQL • Table creation and index creation (CREATE TABLE, CREATE INDEX, DROP TABLE, DROP INDEX, etc.) • Subqueries (where a query returns data based on the results of another query) • Isolation levels. ODBC driver never locks the data on a read and does not guarantee repeatability of the read. This is equivalent to isolation level RU (Read Uncommitted). • HAVING clause on a GROUP BY. • Any SQL construct not explicitly referred to above. Special supported features The following features are supported even though they are not part of SQL, or are not usually supported by SQL engines such as ALLBASE/SQL: • CALL statement: can be used to call any function on the host that has a fixed number of parameters (e.g. option variable not supported) that has parameters of type integer, short integer, or character, and return results in the form of a result set with one row, and as many column as there are parameters in the CALL. • SQLRowCount function:. Returns an accurate count on queries that are read by means of TPI (Third-Party Indexing) keys. • INSERT INTO _LOGFILE VALUES (...): Used for inserting a record into the MBFSERVRlogfile. Can be used by a programmatic client to explicitly log connections or other activity. The following features are supported even though they are not part of SQL, or are not usually supported by SQL engines such as ALLBASE/SQL: MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 227 Supported SQL syntax MBF-UDALink • CALL statement: can be used to call any function on the host that has a fixed number of parameters (e.g. option variable not supported) that has parameters of type integer, short integer, or character, and return results in the form of a result set with one row, and as many column as there are parameters in the CALL. • SQLRowCount function:. Returns an accurate count on queries that are read by means of TPI (Third-Party Indexing) keys. • INSERT INTO _LOGFILE VALUES (...): Used for inserting a record into the ODBCLink logfile. Can be used by a programmatic client to explicitly log connections or other activity. Requirements for joins Even though SQL does not require it, ODBC driver requires a key field on the secondary joined table. For example, when using the syntax SELECT...FROM MEMBERSHIP T1 REGIONS_M T2 WHERE T1.REGION=T2.REGION, column T2.REGION must be a key item. Certain clients, in particular Impromptu and MS-Access, seem to reverse the order of tables in the FROM clause. To correct this problem, ODBC driver now internally attempts to find a join order such that the secondary joined table has a key item. This does not affect the result of the query. It affects the way that ODBC driver processes the query internally. Numeric and character expressions Numeric and character expressions are supported in the Select list, in the join condition, and in the WHERE clause. Numeric expressions consist of numeric data field or constants separated by arithmetic operations (+,-,*,/), and may be nested in parentheses (). All numeric expressions are converted to double float. Character expressions consist of character data fields or constants or SUBSTRING functions, separated by a “+” sign for concatenation. The syntax of SUBSTRING is SUBSTRING (Datafield, StartPos, Length). StartPos is 1 for the first byte. User-defined conversion functions You can write a procedure in “C” or another programming language to convert data from your database into specific output formats. To use this feature, you must modify the SQL generated by the client application. In the Select list, you add a column with the following syntax: CALL (“Function_Name”,DataType,Column1....) 228 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Supported SQL syntax Function_Name is the name of the conversion function that must be compiled into XLUSER.UDA.MBFOSTER, or you can access another XL by setting environment variable ODBC_XL before running the server. DataType is the expected datatype of the result and must be one of SQL_CHAR, SQL_SMALLINT, SQL_INTEGER, SQL_DATE or SQL_DOUBLE. Column1, etc., are the names of the column (or constant values) from which the result will be calculated. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 229 Supported SQL syntax 230 MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC driver client configuration ODBC driver client configuration Data sources Data sources are configured through the ODBC application in the Windows Control Panel. The data source defines the connection to the host. From Windows, Select Start, Settings, and Control Panel, then Double-click the Data Sources ODBC icon. The Data Source screen displayed. is This screen gives you a list of your installed data sources. Select Add on the right side of the screen to access the Add Data Source screen. Highlight MBFoster UDALink. Note: The MBFoster UDALink Driver is ODBC-3 compliant. The MBFoster UDALink2 Driver is ODBC-2 compliant. Select Finish. The ODBC driver Setup screen is displayed. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 231 ODBC driver client configuration MBF-UDALink The setup program prompts for information specific to the communication method you intend to use. Avoid using special characters, (i.e. “?”, “/”, “>”, “<“, “:”, “,”) when creating a data source name. In the Data Source Name field, Type the name of the data source (for example, TEST) The Description field is optional but for this purpose we have made an entry. Type MBF-UDALink. In both the HostConf User-ID and HostConf Password fields, Type ?. to be prompted for the ODBC user ID and password at connection time, or enter the ODBC user ID and Password assigned by your ODBC Administrator. Communications port Select the appropriate setting for your circumstances, e.g. Winsock. Winsock is the preferred method for networked installations. To use Winsock, you must have Winsock-compliant communication software on your desktop. Host server Info Host server name or IP address Enter the server name or IP address for the host you intend to connect to. This is either a name that has been assigned to the host, or an IP address (for example, 192.0.0.1). If you are not sure about your host name or IP address, or consult your System Administrator. 232 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC driver client configuration Note: If you are using Winsock, Reflection for Windows is not required. It is, however, helpful for debugging. Move the cursor to the host server name or IP address field, Type: the TCPIP address of the Host (e.g. 123.456.789.111 or the host name) Socket ID (port number on host) If your host will support multiple Winsock listeners, then each one must be identified by a unique socket ID. To accept the default socket ID (which is 21245), you can leave this field blank. Change Logon Change Logon allows the user to change the logon of the odbc server process created by the listener job. It could be a different logon or the same one the listener is using. Fill in the appropriate information and click OK. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 233 ODBC driver client configuration MBF-UDALink USE SSL This enables Secure Socket Layer. The following screen is displayed. SSL versions There are three different SSL protocols. Select one, based on the following descriptions: SP_PROT_TLS1 Encryption TLS1 Protocol provides privacy and data integrity between two communicating applications. The protocol is composed of two layers: the TLS Record Protocol and the TLS Handshake Protocol. SP_PROT_SSL2 - Encryption and Authentication The SSL 2.0 Protocol provides privacy between a client and a server. The protocol is designed to authenticate the server and, optionally, the client. SSL requires a reliable transport protocol (such as TCP) for data transmission and reception. The advantage of the SSL Protocol is that it is application protocol independent. A higher level application protocol (e.g. HTTP, FTP, TELNET, etc.) can layer on top of the SSL Protocol transparently. The SSL Protocol can negotiate an encryption algorithm and session key as well as authenticate a server before the application protocol transmits or receives its first byte of data. All of the application protocol data is transmitted encrypted, ensuring privacy. SP_PROT_SSL3 - Encryption, Authentication, and Certificates The SSL 3.0 Protocol provides privacy and reliability between two communicating applications. The protocol is composed of two layers. At the lowest level, layered on top of some reliable transport protocol (such as TCP/IP), is the SSL Record Protocol. The SSL Record Protocol is used for encapsulation of various higher level protocols. One such encapsulated protocol, the SSL Handshake Protocol, allows the server and client to authenticate each other and to negotiate an encryption algorithm and cryptographic keys before the application protocol transmits or receives its first byte of data. One advantage of SSL is that it is application protocol-independent. A higher level protocol can layer on top of the SSL Protocol transparently. 234 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC driver client configuration Exchange Key Mode CALG_DH_EPHEM and CALG_RSA_KEYX. These enable the server to communicate separately with a client on a separate setting, independent of the network which is on a common setting. Certificate Server Common Name This should match the “People Name” or “Common Name (CN)” of the certificate from the server such as: Subject: C=CA, ST=ONT, L=OTTAWA, O=MBF, OU=DEPTNAME CN=MYNAME/ Email = myname@mbf.com. This will put “MYNAME” in the CertificateServerCommonName parm. For additional information on creating certificates, contact MB Foster Technical Support. Server Certificate Authorization This activates the Server Certificate Authorization. Max Stmts Per Connection (1-48) Refers to the maximum number of threads on a connection. Keep Trailing Spaces The default is to eliminate the extra spaces in character columns. Some applications require that the columns be set to their expected size. Checking this box will add back the spaces. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 235 ODBC driver client configuration MBF-UDALink Timeouts command This is the maximum time in milliseconds the client waits on a request from the host, i.e., it is the maximum time the host is expected to take to process a command (other than a sort or a serial read -- see below). If this time is exceeded, the client produces the message "Timeout on data read". You can increase this parameter if you get frequent timeouts. The default value is 180 seconds. Timeouts sort This is the maximum time in milliseconds that the server takes to execute a sort or serial read of the database. After this time has elapsed, the server returns the message "Host database timeout". A default value of 0 (zero) indicates an indefinite timeout value. Using the native communication driver The native communication driver supports direct serial and modem connections for 32-bit clients. The dialog is shared by both the "Direct serial" and "Modem" selections. 236 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC driver client configuration Host configuration log-in HostConf User-ID This is the default user ID that will be used if the connection string created by the client application does not have a user ID. If the connection has a different user ID, a warning message is displayed, prompting for a new user ID. To be prompted for a user ID at connect-time, enter a single “?” in this field. HostConf Password This is the default password that will be used if the connection string does not contain a password. If the connection has a different password, a warning message is displayed, prompting for a new password. To be prompted for a password at connect-time, enter a single “?” in this field. Modem settings Communications port Select the appropriate setting for your circumstances. Speed Select the speed at which the port is to be used. Modem init string Either accept the default value or set to a value that matches your modem (For modem connection only.) Dial prefix If necessary, set to a value that is required by your phone system before the actual number can be dialed (For modem connection only). Phone number The number to be dialed to connect to the host. (For modem connection only.) MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 237 ODBC driver client configuration MBF-UDALink On Disconnect Exit Server, Exit Modem, Logoff Host If Exit Server and Logoff Host are not checked, the server is left running and the session remains active after disconnecting. If Exit Modem is off, the modem is left connected as well. Use these parameters to save time if you log on and off frequently, however you will have to logoff the server manually. If you plan to leave the modem connected, make sure the modem is set up so as not to respond to DTR changes. If you are connecting by modem, make sure the modem is configured as follows (through the modem init string): • Hardware flow control is on, and you are using an 8 bit, no-parity link to the host. • Carrier-detect signal from the modem reflects the true state of the carrier (otherwise, the client will think the host is connected even when it is not). • An error-correcting protocol is enabled (MNP5, V32 or V42). • Modem does not respond to DTR changes (otherwise, it will disconnect if you log on from a terminal emulator and then close the connection). • The DTE speed is locked (some modems change the DTE speed when connecting to a slower modem). Run Server The command to run the server on the host. If the driver finds the server already running, it will not run it again. Timeouts: Command This is the maximum time in milliseconds the client will wait on a request from the host, i.e., the maximum time the host is expected to take to process a command. If this time is exceeded, the client produces the message "Timeout on data read". You can increase this parameter if required. The default value is 180 seconds. Timeouts: Sort This is the maximum time in milliseconds that the server will take to execute a sort or serial read of the database. After this time has elapsed, the server will return the message "Host database timeout". A default setting of 0 indicates an indefinite timeout value. 238 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC driver client configuration Debug logging on the client Check this box to generate a log file called ODBCLINK.LOG on your desktop. The file is usually created in the subdirectory where the client application is located. For example, the log file for the HOSTCONF program is in \Program files\MBFoster. For MS Access, the logfile is usually created in the subdirectory where the database is located. Note: The ODBCLINK.LOG will use an enormous amount of space on your disk. recommended that this trace log be conducted on request from MB Foster Tech Support. It is Debug logging on the host Check this box to log all SQL sent to the host into ODBCLOG. This file is created in the directory where the server is running. Press OK when finished. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 239 ODBC driver client configuration 240 MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using ODBC driver with ODBC applications Using ODBC driver with ODBC applications Data access To access your host database through ODBC, first set up one or more data sources through the ODBC Datasource Administrator in the Control Panel. You must also Configure host security using the Host Configuration program (Programs->MB Foster->Host Configuration Utility). In order to connect from an ODBC client, you must specify a User-ID and Password that matches the User-ID and Password as defined in the Host Configuration. The host uses the User-ID to determine which tables the client can access. You can enter the information either in the Connect string sent from the desktop application or as part of the data-source configuration, or if the application provides a windows handle to the driver, you can specify a "?" in the Datasource setup so the driver will prompt for a User-ID and/or Password . Not all clients let you enter a User-ID and password, in particular MS Access, MS Query and Lotus Approach. For these clients, you must enter the User-ID and password in your data-source configuration. Alternatively, you may let your client application connect with a null (or blank) User-ID and set-up a User-ID on the host named "DEFAULT". Updating data Most ODBC applications require a unique primary key, existing on a table or data set, to be able to update the table. ODBC driver attempts to locate a primary key. For ALLBASE/SQL tables created with a unique primary key, this works, but in some cases you must enter the primary key name, if one exists, in the user-tables screen in HOSTCONF. You must also disable the "SnapShot Only" checkbox in HOSTCONF. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 241 Sample ODBC application MBF-UDALink Sample ODBC application The following example demonstrates how an application can update two databases through MS-DTC compliant ODBC drivers under the control of an MS-DTC transaction. The example introduces the OLE Transaction calls for initiating and committing MS-DTC transactions and the ODBC call for propagating an MS-DTC transaction from an application to a relational database. 1. The client application connects to MS-DTC by calling DtcGetTransactionManager. DtcGetTransactionManager returns an interface pointer to a transaction dispenser object. The transaction dispenser object is used to initiate subsequent transactions or to create multiple transactions. ITransactionDispenser *pTransactionDispenser; ITransaction *pTransaction; HRESULT hr = S_OK ; // Obtain an interface pointer from MS-DTC proxy. hr = DtcGetTransactionManager( 0, 0, IID_ITransactionDispenser, 0, 0, 0, (void **)&pTransactionDispenser ); if (FAILED (hr)) { printf("DtcGetTransactionManager failed: %x\n", hr); exit (1); } // LPTSTR pszHost // LPTSTR pszTmName // REFIID rid // DWORDdwReserved1 // WORD wcbReserved2 // void FAR * pvReserved2 // void** ppvObject It is not necessary for applications to call either CoInitialize or OleInitialize. These are called by the operating system. 2. The application connects to two databases using ODBC. These standard ODBC calls are not affected by usage of MS-DTC. Changing the application to use a different database is as simple as changing the DSN name to the name of the application to which it is connected. // Establish connection to database on server#1 LogonToDB(&gSrv1); // Establish connection to database on server#2 LogonToDB(&gSrv2); void LogonToDB(DBCONN *ptr) { RETCODE rc = 0; rc = SQLAllocConnect(gHenv, &(ptr->hdbc) ); if (ProcessRC("SQLAllocConnect",ptr,rc)) { 242 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Sample ODBC application rc = SQLConnect(ptr->hdbc, (unsigned char *)(ptr->pszDSN), SQL_NTS, (unsigned char *)(ptr->pszUser), SQL_NTS, (unsigned char *)(ptr->pszPasswd), SQL_NTS ); ProcessRC("SQLConnect",ptr,rc); } } 3. The application begins a transaction by invoking the ITransactionDispenser::BeginTransaction method on the transaction dispenser object obtained in Step 1. BeginTransaction returns a transaction object that represents the transaction. // Initiate an MS-DTC transaction hr = pTransactionDispenser->BeginTransaction( NULL, // [in] IUnknown __RPC_FAR *punkOuter, ISOLATIONLEVEL_ISOLATED, // [in] ISOLEVEL isoLevel, ISOFLAG_RETAIN_DONTCARE, // [in] ULONG isoFlags, NULL, // [in] ITransactionOptions *pOptions, &pTransaction // [out] ITransaction__RPC_FAR // *__RPC_FAR *ppTransaction ); if (FAILED (hr)) { printf("BeginTransaction failed: %x\n",hr); exit(1); } 4. The application associates the transaction object with the ODBC database connection, through the new ODBC enlistment interface that indicates that further work done on the ODBC connections is to be done under the auspices of the MS-DTC transaction. // Enlist each of the data sources in the transaction Enlist(&gSrv1,pTransaction); Enlist(&gSrv2,pTransaction); //-------------------------------------------------------------------------void Enlist(DBCONN *ptr, ITransaction *pTransaction) { RETCODE rc = 0; // Enlist database in the transaction rc = SQLSetConnectOption (ptr->hdbc, SQL_ATTR_ENLIST_IN_DTC, (UDWORD)pTransaction); } ProcessRC("SQLSetConnectOption",ptr,rc); MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 243 Sample ODBC application MBF-UDALink 5. The application associates a statement handle with each ODBC database connection. These ODBC calls are not affected by the use of MS-DTC. The application uses the ODBC database connections to do work on behalf of the transaction. // Generate the SQL statement to execute on each of the // databases. sprintf(SqlStatement, "update authors set address = '%s' where au_id = '%s'", gNewAddress,gAuthorID ); // Perform updates on both of the DBs participating in // the transaction ExecuteStatement(&gSrv1,SqlStatement); ExecuteStatement(&gSrv2,SqlStatement); // -------------------------------------------------------------------------void ExecuteStatement(DBCONN *ptr, char *pszBuf) { RETCODE rc = 0; // Allocate an ODBC statement handle rc = SQLAllocStmt(ptr->hdbc,&(ptr->hstmt)); ProcessRC("SQLAllocStmt",ptr,rc); rc = SQLExecDirect(ptr->hstmt, // Execute the passed string as a SQL statement (unsigned char *)pszBuf,SQL_NTS); ProcessRC("SQLExecDirect",ptr,rc); // Free the statement handle rc = SQLFreeStmt(ptr->hstmt, SQL_DROP); ptr->hstmt = SQL_NULL_HSTMT; ProcessRC("SQLFreeStmt",ptr,rc); } 6. After updating the databases, the application calls the commit method on the transaction object. MSDTC performs the Two-phase Commit Protocol to commit the transaction. If any Resource Manager is unable to commit the transaction, the transaction is aborted and its effects are undone from all databases that were modified. The ODBC database connections cannot be used until Commit completes and another SQLSetConnectOption call is made to enlist the ODBC connection in a new MS-DTC transaction or in the NULL transaction. Do not reuse the ODBC connection before this is done. When the application completes the transaction, it releases the transaction object. 244 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Sample ODBC application This example assumes that the execution of Step 5 passed. If this step failed, the application should call the abort method rather than Commit. // Commit the transaction hr = pTransaction->Commit(0,0,0); if (FAILED(hr)) { } // Release Transaction pTransaction->Release(); if (FAILED(hr)) { } printf("pTransaction->Commit() failed: %x\n",hr); exit(1); printf("pTransaction->Commit() failed: %x\n",hr); exit(1); 7. When no more transactions are needed, the application releases the transaction dispenser object and closes the ODBC connections. // release transaction dispenser pTransactionDispenser->Release(); // Free ODBC handles FreeODBCHandles(&gSrv1); FreeODBCHandles(&gSrv2); // Free the global ODBC environment handle. SQLFreeEnv(gHenv); // -------------------------------------------------------------------------void FreeODBCHandles(DBCONN *ptr) { SQLDisconnect(ptr->hdbc); SQLFreeConnect(ptr->hdbc); } ptr->hdbc = SQL_NULL_HDBC; ptr->hstmt = SQL_NULL_HSTMT; MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 245 Sample ODBC application MBF-UDALink Visual Basic sample Client EXE Project Filename: MTSADO.VBP Description: A sample ADO Test Client that shows how to connect using an ADO Connection and to fetch records with a timer to check performance. Option Explicit Private Const APP_ERROR = -2147467008 Dim obj As Object Timer Variables: Private Declare Function GetTickCount Lib “kernel32” () As Long Private Declare Sub Sleep Lib “kernel32” (ByVal dwMilliseconds As Long) Private StartTime As Long Private Elapsed As Long Private AvgResponseTime As Long Private minRespTime As Long Private maxRespTime As Long Private Res As Variant Private Sub Close_Click() End End Sub Private Sub Command1_Click(index As Integer) Screen.MousePointer = 11 On Error GoTo ErrorHandler Dim ProgID As String ProgID = "TestServices.TestService" Result = "" 'Create the appropriate ADO object On Error GoTo objError Set obj = CreateObject(ProgID) On Error GoTo ErrorHandler If obj Is Nothing Then Screen.MousePointer = 0 MsgBox "Create object " + ProgID + "failed." Exit Sub End If InitTimer ‘Call the object Dim i As Long For i = 1 To nTrans StartTimer 246 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Sample ODBC application Res = "" Res = obj.Test(CStr("DSN=" & DSNName & ";UID=" & UIDName & ";PWD=" & PWDName & ";")) EndTimer nCurTrans = i nCurTrans.Refresh Result = Res Next i FinishTimer nCurTrans.Refresh Set obj = Nothing Result = Res Screen.MousePointer = 0 Exit Sub objError: MsgBox "Error " & Err.Number & " " & Err.Description & " Could not create Object: Make sure the ADO Test package has been correctly installed in MTS." Screen.MousePointer = 0 Err.Clear Exit Sub ErrorHandler: Screen.MousePointer = 0 MsgBox Err.Number & "(" & Err.Source & ") :" & Err.Description Err.Clear End Sub Private Sub Command2_Click() Screen.MousePointer = 11 On Error GoTo ErrorHandler Dim ProgID As String ProgID = "TestServices.TestService" Result = "" ‘Create the appropriate ADO object On Error GoTo objError Set obj = CreateObject(ProgID) If obj Is Nothing Then Screen.MousePointer = 0 MsgBox "Create object failed." Exit Sub End If On Error GoTo ErrorHandler InitTimer 'Call the object MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 247 Sample ODBC application MBF-UDALink Dim i As Long For i = 1 To nTrans StartTimer Res = "" Res = obj.Fetch(CStr(SQLSTMT), CStr("DSN=" & DSNName & ";UID=" & UIDName & ";PWD=" & PWDName & ";")) EndTimer nCurTrans = i nCurTrans.Refresh Result = Res Next i FinishTimer Set obj = Nothing Result = Res Screen.MousePointer = 0 Exit Sub objError: MsgBox "Error " & Err.Number & ": Make sure the ADOMTS package has been correctly installed in MTS." Screen.MousePointer = 0 Err.Clear Exit Sub ErrorHandler: Screen.MousePointer = 0 MsgBox Err.Number & "(" & Err.Source & ") :" & Err.Description Err.Clear End Sub Private Sub Form_Load() DSNName = "MTSTEST" UIDName = "" PWDName = "" Result = "" nCurTrans = 0 nTrans = 1 MinResp = 0 MaxResp = 0 AvgResp = 0 End Sub Public Sub StartTimer() 'Start timer StartTime = GetTickCount() End Sub 248 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Sample ODBC application Public Sub EndTimer() 'Get timing values Elapsed = GetTickCount - StartTime If Elapsed < minRespTime Then minRespTime = Elapsed If Elapsed > maxRespTime Then maxRespTime = Elapsed AvgResponseTime = AvgResponseTime + Elapsed End Sub Public Sub FinishTimer() 'Format timer info AvgResponseTime = AvgResponseTime / nTrans AvgResp = Format(AvgResponseTime / 1000, "#0.###") MinResp = Format(minRespTime / 1000, "#0.###") MaxResp = Format(maxRespTime / 1000, "#0.###") Form1.Refresh End Sub Public Sub InitTimer() 'Initalize timer minRespTime = 99999999 maxRespTime = 0 AvgResponseTime = 0 End Sub MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 249 Sample ODBC application MBF-UDALink VB TestServices.DLL project sample for MTS Module - Service Utilities Option Explicit 'Open a connection 'open the connection each time as connection pooling 'takes care of the details. Public Function OpenConnection(objContext As ObjectContext, adoconnect As String) On Error GoTo OpenConnectionError Dim Connection As ADODB.Connection 'Create a connection and open it Set Connection = New ADODB.Connection Connection.Open (adoconnect) 'Return the open connection Set OpenConnection = Connection Exit Function OpenConnectionError: 'Log the error to the event log App.LogEvent Err.Description & "(" & Err.Number & ")", vbLogEventTypeError 'Indicate that the operation was aborted objContext.SetAbort 'Pass the error up the line Err.Raise Err.Number, "ServiceUtilities", Err.Description End Function Class – Test Service Option Explicit 'Object implements the MTS ObjectControl interface Implements ObjectControl 'Variable to store the MTS context Private objContext As ObjectContext 'Name of object Private Const ObjectName = "TestService" 'Called when the object is started under MTS Private Sub ObjectControl_Activate() 'Assign the MTS object context Set objContext = GetObjectContext End Sub 'Called by MTS to indicate whether the object can be pooled Private Function ObjectControl_CanBePooled() As Boolean 'This object can be pooled ObjectControl_CanBePooled = True End Function 250 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Sample ODBC application 'Called by MTS when the object is shut down Private Sub ObjectControl_Deactivate() 'Clear the MTS context Set objContext = Nothing End Sub 'Fetch a record from the database Public Sub Fetch(ByVal aQuery As String, ByVal adoconnect As String) On Error GoTo FetchError Dim rs As ADODB.Recordset 'Get the data Set rs = New ADODB.Recordset rs.ActiveConnection = OpenConnection(objContext, adoconnect) rs.Open aQuery Do While Not rs.EOF rs.MoveNext Loop 'Indicate that the operation is complete If Not objContext Is Nothing Then objContext.SetComplete Exit Sub FetchError: 'Log the error App.LogEvent Err.Description & "(" & Err.Number & ")", vbLogEventTypeError If Not objContext Is Nothing Then objContext.SetAbort 'Pass the error on Err.Raise Err.Number, ObjectName, Err.Description End Sub Public Sub Test(ByVal adoconnect As String) On Error GoTo FetchError Dim rs As ADODB.Recordset 'Get the data Set rs = New ADODB.Recordset rs.ActiveConnection = OpenConnection(objContext, adoconnect) 'Indicate that the operation is complete If Not objContext Is Nothing Then objContext.SetComplete Exit Sub FetchError: 'Log the error App.LogEvent Err.Description & "(" & Err.Number & ")", vbLogEventTypeError If Not objContext Is Nothing Then objContext.SetAbort 'Pass the error on Err.Raise Err.Number, ObjectName, Err.Description End Sub MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 251 Sample ODBC application 252 MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using Cognos Impromptu Working with Third-Party Products Using Cognos Impromptu Select Catalog, Database, Add. Enter HP 9000-1 as the logical database name, ODBC Gateway as the Gateway, and the name of your data source, e.g. HP 9000. Enter your user ID and password, and click OK. Select Catalog, New. Enter a catalog name and your logical database name. Impromptu establishes the connection displays the Edit Tables screen. The left side of the Edit Tables screen is a list of table owners. In ALLBASE/SQL, a table owner is the owner name assigned by the database administrator. To get a list of all the tables for a specific owner name, double-click on the owner name. You can now select the tables you want in your catalog. After you click OK, Impromptu loads the table definition into the catalog. To add tables from another database to your catalog, select Catalog, Edit Tables, and follow the same procedure. You can now create a report through the File, New command. You are prompted for the fields to include in your report, and Impromptu generates the report on your screen. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 253 Using Cognos Impromptu MBF-UDALink Special notes for users of Impromptu Viewing the SQL generated by Impromptu Enter a new report and select Report, Query, Profile, View SQL. You can also write your own SQL and override that generated by Impromptu. Search for help on the topic AWriting your own SQL.” Joins ODBC driver supports two kinds of joins: inner joins, sometimes called natural joins, and left outer joins. An inner join returns no records if any of the secondary records are not found. A left outer joins returns the primary record and gives nulls (or zeros) on the secondary table. To add or modify a join definition, select Catalog, Joins. The following figure illustrates this process by creating a left outer join from table MEMBERSHIP to table ACCT-HISTORY. To do left outer joins on the host (as opposed to Impromptu downloading both tables and doing the joins locally), modify file COGDMOD.INI in directory \COGNOS\COGAPPS as follows: [Exception tables] Joined=T Note: Occasionally Impromptu generates incorrect SQL when joining three or more tables using a left outer join. To correct this, modify the generated SQL and re-run the report. Changing the display format Impromptu has a limited number of display formats. To change the display format, highlight the column and select Format Data. You cannot specify edit masks; however, you have a choice of numeric display formats. To add dashes or other constants to your output, build an expression with SUBSTRING functions. To add a decimal point to a number that is not defined as a decimal, create a calculated field by dividing the number by 100. 254 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using Cognos Impromptu Creating joins using calculated columns Impromptu can create a join using a column that is calculated from two or more fields in one or more tables. To do this, select Catalog, Edit joins. Select your primary table and the table you want to join in the upper left part of the screen; click AView as Expression@ and enter an equation such as: Table3.Column3 = Table1.column1 + Table2.Column2 .... The left side of this expression is the table you want to join to, and the right side is the expression to generate the key. An expression can consist of concatenated fields, SUBSTRING statements, constants, or all of these. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 255 Using Lotus Approach MBF-UDALink Using Lotus Approach Select Create a New File Using a Smart Master. Click OK. The following screen is displayed. From the Create Type Drop Down Window, select ODBC Data Sources. The ODBC Data Sources is displayed. Select the required data source. 256 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using Lotus Approach The tables associated with the data source is displayed. You can now select fields to include in a query, set criteria, enter joins, etc. In subsequent connections, existing files can be opened. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 257 Using Microsoft Access MBF-UDALink Using Microsoft Access To access data using MS Access, open a blank database and click Create, New, Link Table, on the screens that are presented, and select ODBC Databases from the Afiles of type:@ pull-down list. The Data Sources Window is displayed. If the data source you need is not in the list, click on New and create a new data source. Note: You must click on the name of the data source you want to use even if there is only one in the list. Highlight one or more tables and then click OK. This creates an attached table that you can later open and modify. An attached table is treated like a local table in every way. You can read it, update it, delete it, import it, or join it to other local or remote tables. 258 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using Microsoft Access Notes for users of MS Access Check the SAVE PASSWORD box. This stores the user ID returned by the driver in the Table Properties field and allows you to connect afterwards with the same user ID. You should get a list of tables on the HP 9000. When you select a table, it loads the table structure and stores the table in the database as an attached table. You can examine the table by opening it in Design View. Once the table is attached, it is treated like a local table in every way, except that you may not modify it. You can open the table, run reports or queries against it, or link it to other local or remote tables. For a table to be updatable in Access, it must have a unique key that Access is aware of. If the table is defined in ALLBASE/SQL with a unique key, this is reported by ODBC driver (in the SQLStatistics call that Access makes) and the table becomes updatable. Note: If Access cannot locate a primary key, it prompts for the column or combination of columns that make up a unique key. You can ignore this prompt, and the table will not be updatable from Access, or you can specify one or more columns that make a unique key. If this combination of columns is not unique (i.e. if there are duplicate records with the same key combination), Access will not work properly. When you enter a unique key combination, ensure that it is unique in the table. To see the column or columns that Access uses as the unique key, look at the table in Design View. The column will have Akey@ symbol in the left-most column. • Access uses a different algorithm to access a table depending on whether a unique key exists. If it finds a unique key, it downloads the key values and then issues an SQL statement of the form Aselect...From...Where key=? Or key=?...@. It then displays a screenful of data and stops. (Note, however, that it may continue to download the keys in the background so long as the table is open in table view.) • If a unique key is not defined, Access does a regular Select statement to read the table. It displays a screenful of data but continues to read the table in the background. You can view the SQL that Access (and any ODBC application) generates by turning on logging in the ODBC Setup Screen. • To update a record in Access, highlight the column you want to change, make the change, and then click on any other record. Access uses an algorithm called AOptimistic concurrency control@ to verify that a record has not been changed by another user. This is a less secure method than the SELECT FOR UPDATE used by other applications, but it minimizes the number of locks held on the database. • Optimistic concurrency control works by Access generating an Update statement of the form AUpdate Table Set column1=?, column2=?,...WHERE column1=? AND column2=? AND column3=? And ....@. This ensures that the update succeeds if the record has been changed by another user since the time it was last read in by Access. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 259 Using Microsoft Access 260 MBF-UDALink • The default type of join used by Access is the Inner Join. When creating a query with a join between two tables, you can change this to a left outer join by double-clicking on the link between the tables. You can also use the edit joins screen to change the default join between specific tables, to avoid editing the join every time you create a new query. • To join a local table to a remote table efficiently in Access, there must be a one-to-one correspondence between records in the local table and records in the remote table. You must have all the columns in the local table necessary to form a unique key on the remote table. If this is not the case, Access attempts to download the remote table to the local machine. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using MS Query Using MS Query To Run MS Query from Microsoft Excel, select Data, Get External Data, Create New Query. The following screen is displayed. Select the data source you are going to connect to and press OK. (You must have previously configured a data source with ODBC administrator.) When connected, a list of the tables on the server that you have access to is displayed. A user ID and password cannot be configured in MS-Query. The ability to enter a user ID and password has been added to the ODBC driver as part of the data source specifications. Press ADD. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 261 Using MS Query MBF-UDALink Select one or more tables and click OK. You can join tables by dragging the column you want to join on from one table to another in the upper part of the screen. You can view the data by double-clicking on any column name or by dragging it from the upper to the lower part of the screen. Note: MS QUERY must be installed during the installation of Microsoft Excel. If necessary, do a custom installation selecting MS Query as one of the options. 262 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Using Visual Basic (4.0 or higher) Using Visual Basic (4.0 or higher) You can use ODBC driver either with Visual Basic (VB) database controls or with Database and dynaset variables. In addition, you can call ODBC functions directly from the DLL. VB database controls To use VB database controls, define a data control and assign it a Connect property of the form "DSN=HP 9000;UID=users;PWD=password" and a RecordSource property of the form "SELECT * FROM TableName". To create a SnapShot (no update), set the Options property to 64 (SQL_PASSTHROUGH). You can then place text controls on the screen, set the DataSource property to the name of the data control, and set the DataField property to the name of the column in the Select statement. When the application runs, it downloads all records qualified by the Select statement (or all primary key values, depending on the SQL_PASSTHROUGH option) and displays the first record on the screen. You can scroll through the records by using the "Up", "Down", "Top", "Bottom" buttons on the data control. Large tables may take a long time to load (perhaps hours). You may prefer to use direct calls to ODBC.DLL like the VBDEMO application. There is no way to tell Visual Basic to stop loading a table once it has started other than by closing the form. Dynaset variables A second option is to use dynaset variables, which gives the application more control, such as for loading a grid with data. Define a database object, assign it Connect and Options properties as above, and open it with an OpenDatabase call, as in SET DBVar=OpenDatabase(...). Then define a dynaset variable (DIM DSVar as DYNASET) and open it with a statement of the form "Set DSVar=DBVar.OpenDynaset (SQLstatement)." If SQL Statement is a Select statement, you can read the results from "DSVar.FieldName" and move to the next record with "DSVar.MoveNext". If SQLStatement is an Insert or Update statement, no results are returned. You can update records with the Update method, and get the selection count by calling SQLRowCount or with a query of the form "Select COUNT(*) From Table Where Conditions". To update the table, you need a primary key defined and you need to disable the SnapShot only button. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 263 Calling ODBC functions directly MBF-UDALink Calling ODBC functions directly You can call ODBC functions directly. Generally, do an SQLAllocEnv, SQLAllocConnect, and SQLDriverConnect to open the database, followed by SQLExecDirect, followed by multiple SQLFetch and SQLGetData calls. To use SQLBindCol to bind fetch results to local variables, use the following procedure: A - Declare strings variables as: Dim mystr as String B - Initialize the string variables before use: mystr=String(255,0) C - Use the ByVal keyword when passing the variable to the ODBC driver. Do not use the ByVal keyword in the AlpbBuf@ parameter except for character data because the goal is to pass the address of the parameter, not the value. Declare SQLBindCol as follows: Declare Function SQLFindCol Lib Aodbc.dll@ (ByVal hstmt AS long, ByVal col As Integer, By Val wConvType As Integer, lpdBuf As Any, ByVal dwbuflen As Long, lpcbout As Long) As Integer. Calling ODBC functions programmatically Any application that can call a DLL can use ODBC. This includes "C" and Visual Basic. Note that Visual Basic has built-in ODBC support through database and dataset objects; however, it is usually faster to call ODBC functions directly. First acquaint yourself with the ODBC 3.0 specification for information on all ODBC function calls. The ODBC specification is available from Microsoft Press. 264 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Connection examples Connection examples Connect using SQL API 1. Declare your variables for the connection. 2. Create your connection string. 3. Allocate an environment handle. 4. Allocate a connection handle. 5. Connect to your DSN with SQLDriverConnect. 6. Allocate a statement handle. 7. Query the datasource using SQLExecDirect. 8. Call an error routine if an error occurs. See Sub GetError. 9. Make sure you release any environment that you have created when errors occur (or on exiting). Connect using SQL API in VB 4.0-6.0 The following example demonstrates how to use SQLAPI in VB 4.0-6.0. It is to be used as a guideline for creating a project to use SQLAPI. This example assumes you have the necessary SQL declare functions and constants. etc. 1. Global sDSNConnect As String 'Connection string Global henv As Long 'handle to the environment Global hdbc As Long 'handle to the connection Global hstmt As Long 'handle to the statement Global rc As Integer 'Return code Dim outstr As String * 256 Dim outlen As Integer Function DBConnect() As Integer 2. ‘Add your connection string to be used Example “DSN=MEMBER;UID=USERPWD=PASSWORD;” DSNConnect = “YOUR_DSN_STRING” 3. 'First Allocate an Environment Handle rc = SQLAllocEnv(henv) If rc <> SQL_SUCCESS Then MsgBox ("SQLAllocEnv failed rc=" + Str(rc)) Exit Function End If MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 265 Connection examples 266 MBF-UDALink 4. 'Second allocate a connection handle rc = SQLAllocConnect(henv, hdbc) If rc <> SQL_SUCCESS Then MsgBox ("SQLAllocConnect failed rc=" + Str(rc)) Call GetError Call FreeEnv Exit Function End If 5. 'Third allocate the connection and pass in the Connection string rc = SQLDriverConnect(hdbc, Form1.hWnd, sDSNConnect, Len(sDSNConnect), outstr, 256, outlen, 3) If rc <> SQL_SUCCESS Then If rc = SQL_NO_DATA_FOUND Then Exit Function 'User cancelled dialog End If Call GetError Call Freeconnect Call FreeEnv Exit Function End If 6. 'After connecting, allocate a statement handle rc = SQLAllocStmt(hdbc, hstmt) If rc <> SQL_SUCCESS Then Call GetError Call Disconnect Exit Function End If 7. 'Now call an SQL query to select your data rc = SQLExecDirect("Select * from member.membership") If rc <> SQL_SUCCESS Then Call GetError MsgBox "Unable to connect to the Database Environment!", vbCritical Call Disconnect Exit Function End If End Function MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Connection examples 8. Sub GetError() Dim error_str As String * 256 Dim SQLState As String * 20 Dim outlen As Integer Dim NativeError As Long Dim msg As String rc = SQLError(henv, hdbc, SQL_NULL_HSTMT, SQLState, NativeError, error_str, 256, outlen)sDSNConnect = Space(256) If rc <> SQL_NO_DATA_FOUND Then msg = Left(error_str, outlen) If gl_SQLStatement <> "" Then msg = msg + " (" + gl_SQLStatement + ")" End If MsgBox msg End If End Sub 9. Sub Freeconnect() rc = SQLFreeConnect(hdbc) If rc <> SQL_SUCCESS Then Call GetError End If End Sub Sub FreeEnv() rc = SQLFreeEnv(henv) If rc <> SQL_SUCCESS Then Call GetError End If End Sub Sub Freestmt() rc = SQLFreeStmt(hstmt, SQL_DROP) If rc <> SQL_SUCCESS Then Call GetError End If End Sub Sub Disconnect() rc = SQLDisconnect(hdbc) If rc <> SQL_SUCCESS Then Call GetError End If rc = SQLFreeConnect(hdbc) MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 267 Connection examples MBF-UDALink If rc <> SQL_SUCCESS Then MsgBox ("SQLFreeConnect failed rc=" + Str(rc)) Exit Sub End If rc = SQLFreeEnv(henv) If rc <> SQL_SUCCESS Then MsgBox ("SQLFreeEnv failed rc=" + Str(rc)) Exit Sub End If End Sub 268 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Connection examples Connecting with DAOs 1. 2. 3. 4. 5. 6. Declare your variables for the connection. Set the DAO workspace. Set and open the connection to the database. Set and open the recordset for the table. Set the recordset information you need and process it accordingly. Make sure you close any objects that you have created when error occur (or when exiting). 1. Dim DAOWS As DAO.Workspace Dim DAORS As DAO.Recordset Dim DAODB As DAO.Database 'SET A WORKSPACE ENVIROMENT FOR YOUR CONNECTION 'AND SET THE TYPE TO DBUSEODBC 'Set DAOWS = CreateWorkspace("NewODBCWorkspace", "", "", dbUseODBC) 'OPEN THE CONNECTION PASS IN YOU CONNECTION STRING 'Set DAODB = Workspaces(0).OpenDatabase("", dbDriverComplete, True, "ODBC;DSN=YOURDSN;UID=YOURUID;PWD=YOURPASSWORD;") 'OPEN THE TABLE AND ENTER THE SQL QUERY 'Set DAORS = DAODB.OpenRecordset("Select * from membership", dbOpenDynaset, dbSQLPassThrough) While Not DAORS.EOF 'Insert your query processing code here. DAORS.MoveNext Wend ‘Close Resultset DAORS.Close 'Close Data Base Connection DAODB.Close 2. 3. 4. 5. 6. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 269 Connection examples MBF-UDALink Connecting with RDOs 1. 2. 3. 4. 5. 6. Declare your variables for the connection. Set the RDO environment. Set and open the connection to the database. Set and open the recordset for the table. Use the record set information you need and process it accordingly. Make sure you close any objects that you have created when errors occur (or when exiting). 1. Dim RDOEN As RDO.rdoEnvironment Dim RDOCN As New RDO.rdoConnection Dim RDORS As RDO.rdoResultset Dim RDOCL As RDO.rdoColumn 'Create an RDO Environment and specify the type 'of cursor we want. The Client Side cursor seems 'to give the most accurate results. Set RDOEN = rdoEngine.rdoEnvironments(0).CursorDriver = rdUseOdbc 'Open a connection to the database Set RDOCN = RDOEN.OpenConnection(YOURDSN) (“Select * from Member.Membership”,rdOpenKeyset) ‘Open the table Set RDORS = RDOCN.OpenResultset While Not RDORS.EOF ' Insert your query processing code here. RDORS.MoveNext Wend 'Close resultset RDORS.Close 'Close db connection RDOCN.Close 2. 3. 4. 5. 6. 270 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Connection examples Connecting with ADOs 1. 2. 3. 4. 5. 6. Declare your variables for the connection. Set the connection string. Set and open the connection to the database/table. Set and open the recordset for the table. Use the recordset information you need and process it accordingly. Make sure you close and objects that you have created when errors occur (or when exiting). 1 2 3 4 5 6 Dim ADORS As ADODB.Recordset Dim ADOCN As ADODB.Connection Dim strConnect As String StrConnect = "DSN=YOURDSN;UID=YOURUID;PWD=YOURPWD;" Set ADOCN = New ADODB.Connection 'Set cursor for the client or server end ADOCN.CursorLocation = adUseClient 'Open Connection ADOCN.Open strConnect 'Open the Recordset Set ADORS = New ADODB.Recordset With ADORS 'Set the cursor type to be used with the recordset .CursorType = adOpenForwardOnly .LockType = adLockReadOnly 'Open the recordset with query, connection .Open "SELECT * FROM TABLE", strConnect End With While Not ADORS.EOF ' Insert your query processing code here. ADORS.MoveNext Wend 'Close objects and set to nothing ADORS.Close ADOCN.Close Set ADORS = Nothing Set ADOCN = Nothing End Sub MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 271 Using FDGEN dictionaries with the Driver MBF-UDALink Using FDGEN dictionaries with the Driver The default open mode is 5 for TurboImage data bases defined in FDGEN dictionaries. To allow write access to these data bases, enter the following setvar statement SETVAR ODBC_IMAGE_OPEN 1 To open all files Read, Share, Lock, set the environment variable ODBC_AOPTIONS to another value before running the server. For example: SETVAR ODBC_AOPTIONS 229 272 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC driver and distributed transactions Two-Phase Commit ODBC driver and distributed transactions Businesses are expected to operate in a changing environment where speed and accuracy of the information is a distinct business differentiator. At present, computer environments offer a high degree of connectivity. Any applications running in these environments are expected to provide transactional control and data integrity. These characteristics are important not just from the technical point of view, but especially from the business point of view. This section explains how to use the transactional capabilities of the ODBC driver in conjunction with the Microsoft Distributed Transaction Coordinator (MS-DTC), to coordinate transactions involving ALLBASE databases on an HP 9000 and SQL*Server databases on a Microsoft NT platform. A transaction is an action, or series of actions, that transforms the system from one consistent state to another. For example, if $1 is transferred from a checking account to a savings account, a transaction takes place because the balance of each account has changed. Transactions are characterized by their ACID (atomicity, consistency, isolation, durability) properties: Atomicity. Atomicity refers to the all-or-nothing property of a transaction. When a transaction consists of a series of actions, either all the actions complete successfully or none of them complete successfully. If a transaction fails before completion, all the work done so far must be undone (rolled back). Consistency. The transaction transforms the system from one consistent state to another. Consistency of the system depends on the business rules and the semantics of the system. Consistency is enforced by the applications. Isolation. Even though multiple transactions can be executed concurrently, each transaction runs as if it were the only transaction on the system. It appears to each transaction that the other transactions are executed either before or after it. The effects of the transaction are not visible to the other transactions until the transaction either successfully completes (commits) or fails (aborts). Durability. Transactions, once committed, are durable—the effects of the transaction are permanent, despite system or network failures. Transactions are the essential building blocks of robust applications. They permit applications to update data while providing simple failure-recovery semantics. Distributed transactions update data on two or more network-connected computer systems. Distributed transactions are essential to successfully update distributed data. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 273 ODBC driver and distributed transactions MBF-UDALink The development of robust distributed applications is difficult because they are vulnerable to many failures, including failure of the client, failure of the server, and failure of the network connection between the client and server. In the absence of distributed transactions, the application is responsible for all aspects of detection and recovery from these failures. Distributed transactions eliminate this burden from the application. A transaction processing system consists of three distinct components: • applications • transaction manager • resource managers Transaction Processing System with XA-compliant RM These components may not be confined to independent nodes. Any or all of them can be distributed across multiple nodes on the network. Resource managers own the objects affected by the transactions and are responsible for the persistent storage of resource objects. Resource managers also guarantee the ACID properties of the transactions within themselves. Examples of resource managers include database systems such 274 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink ODBC driver and distributed transactions as Microsoft® SQL Server™ and ORACLE, and file systems such as Object File System in Windows NT®. An application can be an independent, self-contained component (with every piece of functionality, business rules and logic), or it can be a collection of cooperating components. The Transaction Manager is the manager of transaction objects. It creates transaction objects and manages their atomicity and durability. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 275 Two-Phase Commit MBF-UDALink Two-Phase Commit Guaranteeing the ACID properties of the transaction is relatively straightforward when the actions of a transaction are confined to a single resource manager. Facilities such as logging and locking are examples of features provided by resource managers to guarantee the ACID properties. However, when more than one resource manager is involved, guaranteeing the ACID properties is more involved and requires an additional Two-phase Commit Protocol. In the absence of a transaction manager, the application must implement the Two-phase Commit Protocol within itself. The Two-phase Commit Protocol has two distinct phases: the prepare phase and the commit phase. The application chooses a controlling agent — the commit agent. The commit agent can be one of the participating resource managers or another resource manager. The application performs the actions on the resource managers. After completing the actions, the application enters the prepare phase by sending a Prepare message to the resource managers. The resource managers record the fact that they are in prepare phase and respond to the application with Prepared messages. If any of the resource managers are not able to complete the prepare phase, then the application must abort the transaction. By responding with a Prepared message, a resource manager guarantees that its part of the transaction can be committed. After receiving Prepared messages from each of the participating resource managers, the application enters the commit phase, by sending a Commit message to the commit agent. The commit agent records this fact. The application must then send the Commit message to each of the participating resource managers. The Two-phase Commit Protocol is complex. As the number of participating resource managers increases, the complexity of the Two-phase Commit Protocol increases exponentially. Because of this, it is very difficult to write good applications that obey the Two-phase Commit Protocol rules when several resource managers are involved. Having the transaction manager implement the Two-phase Commit Protocol and handle all the relevant coordination issues speeds up and simplifies the application development process. The Microsoft Distributed Transaction Coordinator The Microsoft Distributed Transaction Coordinator (MS-DTC) provides one of the foundations for transaction processing. Some of its key capabilities are: MS-DTC provides features to create, destroy, manage, and monitor transactions. Transaction objects represent transactions. Any application following the rules of the MS-DTC programming model can create transaction objects and perform operations on them. 276 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Two-Phase Commit MS-DTC is built within the architectural framework of the Object Linking and Embedding (OLE) Component Object Model. Applications written using the OLE Component Object Model seamlessly integrate with MS-DTC. Because MS-DTC can be implemented as OLE objects and interfaces, any programming language supporting the OLE calling conventions can be used to develop applications. MS-DTC exposes various OLE interfaces to applications and the resource managers, providing the ability to interact with MS-DTC. Application model using the MS-DTC As object-oriented methods of design and development matured, the concept of the application as a collection of cooperating objects was born. The maturity of the object model, combined with the maturity of other technologies such as remote procedure calls, facilitated true distributed applications. While the cooperating objects in the application can be distributed across nodes in the network, the object-oriented model of the application does not confine the application objects to specific tiers. It is very convenient to classify the application objects into three different categories: user services, business services, and data services. The MS-DTC extends the object-oriented model of the application by adding objects needed for transaction processing. The MS-DTC provides objects to create, destroy, manage, and monitor transaction objects. The applications and resource managers can, in turn, act on these transaction objects. The application objects can use the services provided by MS-DTC objects to enable transaction processing. Transactions are characterized by their ACID properties. The MS-DTC objects guarantee the atomicity of the transactions when their actions span multiple resource managers using the Twophase Commit Protocol. The resource managers participating in the transaction guarantee the other characteristics of the transaction: consistency, isolation, and durability. Role of the MS-DTC The role of the Microsoft Distributed Transaction Coordinator is to guarantee the atomicity of the transactions. The transactions must be initiated by a component of the application. The component initiating the transaction receives a pointer to the transaction. The component cannot pass this pointer to another component. Therefore, the MS-DTC requires that the transaction be completed by the same component that initiated it. Two-tier programming model The two-tier model refers to the classical client-server model of programming. A client provides the user interfaces, and optionally data validation routines, for an application and interacts with MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 277 Two-Phase Commit MBF-UDALink other components on the database/application server. The business rules can be in the client application, in the database server components such as stored procedures, or in both. The client application uses application programming interfaces (APIs), such as Database Library (DBLIB) or Open Database Connectivity (ODBC), to communicate with the database server. While this is not object-oriented, numerous applications exist that were written in this fashion. When introducing the MS-DTC into this programming model, the transaction can be initiated and committed in two different places: the client application and, in some cases, from within the database server stored procedure. Note that this is generally done when the MS-DTC and the database server are on the same machine. At present, this is not possible with ALLBASE stored procedures. The application programmer’s view of transactions The application programmer's model of transactions is quite simple: applications either succeed or fail. The application begins a transaction by getting a transaction object. All subsequent work is associated with that transaction object. When the application reaches a consistent state, it calls the commit method. If the commit succeeds, the transaction is durably committed. If the commit fails, the transaction is aborted. If the application finds that it cannot successfully finish the transaction, it may call the abort method to undo the transaction's effects. This is a simple way to clean up complex failure cases. If the application fails before it commits the transaction, the transaction manager will abort the transaction and tell each enlisted resource manager to undo the transaction's effects. If a computer or resource manager fails, the transaction will also be aborted. Once the transaction has been successfully committed, the resource managers and transaction manager will ensure that the transaction's effects are durable, even if there are subsequent failures. Application-initiated transactions Most resource managers can participate in application-initiated transactions. Application-initiated transactions controlled by the MS-DTC are attractive for three reasons: • The application can invoke any OLE Transaction-compliant resource manager it requires. • The application can explicitly control the scope and duration of the transaction. • The application can be coded in any programming language that supports the OLE Transaction interfaces for initiating and controlling MS-DTC transactions. This includes applications developed in C and C++ as well as Visual BASIC 6.0. An application-initiated transaction works as follows: • 278 The application connects to MS-DTC and obtains a transaction dispenser interface, to initiate transactions. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Two-Phase Commit • The application opens the resource managers it wants to use, such as a connection to relational databases using ODBC. • The application initiates an MS-DTC transaction by calling BeginTransaction and obtains a transaction object representing the transaction. • The application propagates the transaction to each resource manager by invoking the resource manager’s transaction enlistment interface. For example, the application would use the ODBC SetSQLConnectOption to propagate the MS-DTC transaction object to resource managers that support ODBC. All subsequent work done on the ODBC connection is done under the auspices of the transaction. When the resource manager first sees the MS-DTC transaction, it enlists in the transaction with its local MS-DTC transaction manager. This permits the resource manager to participate in the Two-phase Commit Protocol and to receive transaction commit or to abort notifications from MS-DTC. • The application invokes the standard resource manager functions that update transactionprotected resource manager data. For example, the application might insert, delete, or update records in a relational database, or it might invoke a database-stored procedure that modifies the relational database. • When the work of the transaction is complete, the application calls Commit. In response to the Commit call, MS-DTC uses the Two-phase Commit Protocol to coordinate commitment of the transaction with all of the resource managers enlisted in the transaction. Alternatively, the application could call Abort to undo the effects of the transaction. The application can then go on to perform more MS-DTC transactions. • When the application is done, it releases the transaction dispenser object and closes the ODBC connections. To use MS-DTC, the client application establishes a connection to the MS-DTC service, running either on the same node as the application or on another node on the network. Once the connection is established, this instance of MS-DTC becomes the primary MS-DTC for this particular transaction. Other instances of MS-DTC running on resource managers participating in the transaction become subordinate MS-DTCs. As the application begins and commits transactions, the primary and subordinate MS-DTC exchange messages and cooperate to guarantee atomicity. Opening a connection to the primary in the HOSTCONF program is done using the DtcGetTransactionManager helper API call. Using this helper API, the application can obtain a pointer to the ITransactionDispenser interface. After opening a connection to the primary MS-DTC, the application can then proceed with the usual API calls to open connections to the resource managers. The application can initiate the transaction using the BeginTransaction member function in the ITransactionDispenser interface, obtaining a pointer to the ITransaction interface. The pointer to the ITransaction interface represents the transaction object. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 279 Two-Phase Commit MBF-UDALink The application must enlist the participating resource managers to the transaction object to tie the transaction object and the resource managers together. The enlistment is done via the function dbenlisttrans for DBLIB and the SQLSetConnectOption function call for ODBC. Other proprietary interfaces may have their own enlistment interface. For example, for the RPC mechanism in the ODBC driver, this is done with an RPCEnlist function call. After the participating resource managers are enlisted, the application can send commands to the resource managers for actions within the transaction. When the application is ready to commit the transaction, it calls the Commit member function of the transaction object or the Abort member function of the transaction object can be called to roll back or abort the transaction. The transaction and the transaction dispenser objects can be released at this time. Application-to-resource manager transaction propagation The propagation of a transaction between an application and a resource manager occurs when an application initiates a transaction, tells the resource manager to enlist in the transaction, and directs the resource manager to do work under the protection of the transaction. Application Program-to-Resource Manager Transaction Propagation In this example, ODBC driver is a proxy and a front-end resource manager (RM) for the ALLBASE RM. The RM Proxy is implemented in the UDALink3.dll. When the application invokes a resource manager function, the RM Proxy validates the input parameters, marshals the parameters into a request message, and sends the request message to the ODBC driver Server (RM front end). When the RM ODBC driver Server receives the request message, it un-marshals the parameters and calls the Allbase RM to perform the requested operation. 280 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Two-Phase Commit When the operation is complete, the ODBC driver Server marshals the output parameters into a response message, and sends the response message to the RM proxy. The RM Proxy un-marshals the response message and returns the output parameters to the application. To the client application or MS-DTC, the UDALink3.dll is the RM. To the ALLBASE RM, the ODBC driver Server looks like the application (or MS-DTC for the transactional calls). The resource manager’s view of transactions A resource manager first declares its presence to the local transaction manager. It then waits for execution requests from applications. When a request arrives, tagged with a new transaction object, the resource manager enlists in the transaction by invoking the enlist method on the transaction object. By enlisting, the resource manager ensures that it will get callbacks from the transaction manager when the transaction commits or aborts. The resource manager then performs the transaction's requests. For example, the transaction might insert, delete, or update records in a relational database. The resource manager keeps enough information so that it can either undo or redo the transaction. When the application commits the transaction, the transaction manager initiates the Two-phase Commit Protocol. The transaction manager first asks each enlisted resource manager if it is prepared to commit the transaction. The resource manager must now prepare to commit by making it ready to either commit or abort the transaction. Typically, the resource manager records the old and new data in stable storage so that the resource manager can recover even if the systems fail. If the resource manager cannot prepare successfully, it informs the transaction manager and the transaction manager aborts the transaction. If the resource manager can prepare, it does so, tells the transaction manager that it is prepared, and awaits the transaction manager's decision on whether to commit or abort the transaction. Once prepared, a resource manager must wait until it gets a commit request or abort request from the transaction manager. Most transactions commit. Aborts are infrequent. Typically, the entire prepare and commit Protocol completes in a fraction of a second. If there is a system or communication failure, the commit or abort notification may not arrive for minutes or even hours. During this period, the resource manager is uncertain of the outcome of the transaction, not knowing if the transaction committed or aborted. During this time, it keeps the data modified by locking the transaction, isolating these changes from any other transactions. Any locking should be done at the lowest level possible. If there is a failure, higher-level locks could inhibit others from accessing resources. The transaction manager’s view of transactions Applications ask the transaction manager to create a transaction object by calling the transaction manager's BeginTransaction method. A Method provides information about, and access to, a MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 281 Two-Phase Commit MBF-UDALink single method on a class or interface. The reflected method can be a class method or an instance method (including an abstract method). A Method permits widening conversions to occur when matching the actual parameters to invoke with the underlying method's formal parameters, but it produces an IllegalArgumentException if a narrowing conversion would occur. When a resource manager first participates in a transaction, it calls the transaction manager enlist method to enlist in the transaction. The transaction manager tracks the resource managers who enlist in the transaction. Later, the application commits or aborts the transactions, or a resource manager or a system failure aborts the transaction. Commit and Abort are additional methods on transaction objects. When asked to commit a transaction, the transaction manager initiates a Two-phase Commit Protocol. During phase one, it asks all enlisted resource managers to prepare. Then, during phase two, the transaction manger tells the resource managers whether the transaction committed or aborted. The Two-phase Commit Protocol has many optimizations, including the read-only optimization and the transfer of commit optimization. MS-DTC implements these optimizations, but the functionality remains the same: atomicity and durability. The transaction manager keeps a log in safe storage on a disk, recording transaction starts, enlistments, and commit decisions. The log is a sequential file that records transaction events. During normal processing, the transaction manager only writes the log. However, if the transaction manager fails, at restart it reads the log to reconstruct its most recent state. The transaction manager uses the log to make its state durable. The transaction manager also provides an operator interface to manage transactions. It maintains performance counters that can be displayed using the system performance monitor. It also records important operational events in the system log. These events can be displayed using the system event viewer. It has a graphical management interface that is integrated with the SQL Enterprise Manager. The graphical management interface lets the operator configure the system, view transactions, and abort or commit in-doubt transactions. For distributed transactions, each computer has a local transaction manager. When a transaction does work at multiple computers, the transaction managers track incoming and outgoing transactions. Each transaction manager performs all the enlist, prepare, commit, and abort calls for local resource managers (ones on that computer). When committing a transaction distributed among several computers, the transaction manager sends prepare, commit, and abort messages to all its outgoing transaction managers. When a transaction manager is in doubt about a distributed transaction, the transaction manager queries the incoming transaction manager. The root transaction manager is never in doubt. 282 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Two-Phase Commit Appropriateness of distributed transactions Generally, where an application requires transactions to be distributed between physically separate nodes and ACID properties are to be preserved, the Two-phase Commit distributed transaction is the preferred method. In other cases, alternate replication strategies have the advantage. Data replication for decision support Many customers are establishing data warehouses for their decision support applications. These customers need to replicate data from their operational database to their decision support database. MS-DTC is not intended for replicating decision support data. Typically, these database replication services asynchronously propagate changes from the operational database to the decision support database. This is more efficient than updating both databases synchronously using MS-DTC. Using the database replication service may also improve system availability. Database replication services permit the operational database to be updated when the decision support database is unavailable. Changes to the operational database are queued and applied to the decision support database when it becomes available. When MS-DTC is used for replication, both databases must be available whenever the operational database is updated. Alternatively, applications that update the operational database must tolerate decision support database failures. There must also be a way to re-synchronize the two databases following the failure. MS-DTC is not appropriate for replicating a database for high availability. The issues described for data replication for decision support also apply for data replication for high availability. In both cases, you should use the data replication services provided with your relational database. MS-DTC is appropriate for building a reliable queue for sending information from one system to another. An application could implement its own replication scheme using such a reliable queue. Whenever the application updated the operation database, it would queue an update request for the decision support database. A corresponding application on the data warehouses system would remove the update requests from the queue and update the decision support database. The applications would use MS-DTC transactions to keep the distributed queue consistent. Transaction commit and abort The rules for committing and aborting MS-DTC transactions are as follows: Transaction commit Only the party who called BeginTransaction can call Commit. No other participant in the transaction can commit the transaction. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 283 Two-Phase Commit MBF-UDALink An application should not call Commit while a resource manager operation is outstanding for the given transaction. An application that will invoke asynchronous operations must wait for all asynchronous operations to complete before committing the transaction. An application that violates this rule runs the risk of committing the transaction prematurely. MS-DTC does nothing to prevent transactions from committing prematurely. Resource managers must be capable of handling premature commit requests. If a resource manager receives a commit request while doing work on behalf of a transaction, it can either abort the transaction or complete the request before committing the transaction. Transaction abort Any participant in the transaction can abort the transaction. The transaction initiator can abort the transaction at any time by calling Abort, providing it has not called Commit. Any resource manager enlisted in the transaction can abort the transaction by calling Abort any time before responding “prepared” at phase one of the Two-phase Commit Protocol. A resource manager can also abort the transaction at phase one of the Two-phase Commit Protocol by responding E_FAIL to the prepare request from the transaction manager. If a statement that is executed as part of a transaction fails, it does not mean that the Resource Manager will abort the transaction. In many cases, the application could recover from this type of failure and still successfully commit the transaction. If the application developer wants the transaction to abort on the failure of a statement, it should monitor the return status and act accordingly. Limitations of the MS-DTC-compliant ODBC Driver The ODBC driver supports calls to an ALLBASE database to be executed as part of a distributed transaction. Explicit or implicit transactions Some OLE Transaction-compliant resource managers provide facilities for initiating and committing MS-DTC transactions explicitly, or implicitly, from within the resource manager (e.g. from stored procedures). Initiation of a transaction in this manner is not supported by the ODBC driver. Propagating MS-DTC transactions Some resource managers can propagate MS-DTC transactions from one OLE Transactioncompliant resource manager to another. This is not supported by the ODBC driver. To update multiple ALLBASE databases in the same transaction, you must create explicit connections to each database. 284 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Two-Phase Commit Calling applications Some resource managers are capable of calling application code from within the resource manager. This permits the application programmer to perform operations that the resource manager and its stored procedure programming language do not directly support. This is not supported by the ODBC driver. Transaction coordination Coordination of the transaction by a transaction monitor on the HP server is not supported by the ODBC driver. Concurrent transactions Multiple concurrent transactions on the same connection are not supported by the ODBC driver. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 285 Two-Phase Commit 286 MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink RPC Overview Remote procedure calls RPC Overview This chapter is a user-level description of the remote procedure call (RPC) capabilities. . Block diagram of RPC mechanism in ODBC driver MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 287 RPC Overview MBF-UDALink RPC Windows environment In a Windows Environment, the following are part of, or can interact with, the RPC environment: • UDALink3.dll • COM Component Builder • Transaction Monitor • MBF-Console • Secure Socket Layer • MS-DTC Each of these will be explained in further detail in this section. In addition, Com Component Builder and Secure Socket Layer each have an section of this manual dedicated to them. MBF-Console with Transaction Monitor is contained is a separate manual. Note: These instructions apply to ODBC driver version 6.02 and up. UDALink3.dll The UDALink3.dll consists of a series of functions providing the basic requirements for RPCs. When developing applications based on COM, these functions are called by a COM component built by the Component Builder. These functions can also be called directly by an application. If called by an application, the attributes of the remote procedure parameters (such as data type and length) have to be known and adhered to. The following are the application-callable RPC functions to invoke a remote procedure on an HP 9000 server WITHOUT using the COM Component Builder: 288 • RPCConnect • RPCDisconnect • RPCInvoke • RPCSetParam • RPCGetParam • RPCNumParams • RPCEnlist MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink RPC Overview Function return values All functions will return one of the following integer values: • SUCCESS(0) • SUCCESS_WITH_INFO(1) • ERROR(-1) • INVALID_HANDLE(-2). RPC server pool To ensure fast response from the RPC mechanism, the Driver listener creates a pool of RPC servers when the listener starts. When a connection request is received from the client, the listener hands the request off to the first available RPC server process in the pool. The RPC Servers are only created if the Security Catalog has the flag set allowing RPC to be used. The maximum number of servers is 100. Configuration A number of parameters can be set in the listener job file to control the nature of the RPC Server pool. There are defaults for all parameters. If no parameters are used, a pool with default characteristics is created. The following setvars control the characteristics of the pool: • RPC_INITIAL_SERVERS - Determines how many processes are initially created in the pool. The default value is 10. The maximum is 50. • RPC_MAXIMUM_SERVERS - Determines the maximum number of servers that the pool can have. The default is 100. The maximum is 100. • RPC_MIN_FREE_SERVERS - Determines the minimum number of free servers allowed. The default is 2. The minimum is 1. The maximum is half of the number of initial servers. • RPC_MAX_FREE_SERVERS - Determines the maximum number of free servers allowed (default is number of initial servers + min free servers (Default is 12) if all defaults are used). The minimum is the number of initial servers. If the parameters are set beyond acceptable values, the listener changes the value to the allowed limit. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 289 RPC Overview MBF-UDALink Pool expansion When a connection request is received, the listener determines that the number of free servers has diminished to the value of RPC_MIN_FREE_SERVERS environment variable. It then hands off the connection. Next, it creates another server to add to the pool. It only expands the pool one server at a time. Pool contraction If the listener expands the pool significantly, and the number of free RPC servers exceeds the RPC_MAX_FREE_SERVERS environment variable, the listener removes processes from the pool, keeping the pool within the prescribed limits. The listener contracts the pool from the end. The pool does not contract unless the last server in the pool has been freed. 290 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 291 Com Component Overview MBF-UDALink The COM Component Builder Com Component Overview The COM Component Builder is a Utility application used to generate COM components for calling remote procedures on the HP MPE or UNIX platforms through the ODBC driver. This type of COM Component supports MFC, MTS, Visual Basic script, Java script and other development environments. The COM Component Builder creates an OLE Object to allow applications to access the procedure. The OLE Object calls RPC functionality in the ODBC driver. The COM Component Builder also creates a Typelib file that describes the remote procedure. The COM Component Builder must compile and link files into an executable. For this reason it must be installed on a PC that has Microsoft Visual Studio 6.0 and Microsoft Visual Basic 6.0 installed. During the COM Component Builder install process, the system PATH parameter is modified to include the VC98\Bin and VB98 directories. If these directories are not set properly, for example if Visual Studio and VB are not installed until after the COM Component Builder, or if they are un-installed and re-installed, then the PATH may have to be edited manually. For a standard install, the PATH parameter will contain the following entries: • C:\Program Files\Microsoft Visual Studio\VC98\Bin; • C:\Program Files\Microsoft Visual Studio\VB98; After a new COM Component is built with the Component Builder it will be will be put in the directory C:\MBFosterCOM\<COM_Name>. <COM_Name> represents the name of the COM Component that was entered from the user interface. On successful completion, the directory will contain the following files: 292 • <COM_Name>.IDL • <COM_Name>.TLB • <COM_Name>.DLL • <COM_Name>.LIB • result.txt MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Com Component Overview The new COM component will be registered in the system registry. This entry will include the path of the .DLL, .LIB and .TLB files. Any subsequent relocation of the new COM component will result in an error during the load of the files. In addition, resource files such as the file that holds the structure descriptors are put into the Program Files\MB Foster\COM Component Builder\Sft subdirectory. Editing, removing or relocating these files or directories could also cause an error. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 293 Running the COM Component Builder MBF-UDALink Running the COM Component Builder To activate the COM Component Builder, select START - Program Files - MB Foster - MBF COM Component Builder. Main Window The Main Window is displayed when the COM Component Builder is activated. The first 3 fields of the Main Window are mandatory. These include: • Name of new COM • Name of lib • Name of RPC Call The "Name of New COM" is used to determine the name of the COM Component as well as the directory name under C:\MBFosterCOM where the resulting files are placed. When the new COM component is built, the "Name of lib" will be used as the interface name in IDL, as well as being a parameter sent to the server to determine the location of the shared library. If the shared library is not in the same directory as the listener, then the full path name of the library must be entered. The Name of RPC Call parameter will be used as the method name in the OLE Object. Every COM Component must have at least one method. Each method corresponds with an RPC. After you build the first method, and press OK, the COM Component Builder asks if they you to add a new method. If you are not in the Adding New Method mode, click Cancel to exit from COM Component Builder. 294 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Running the COM Component Builder Naming requirements The Name of New COM and the Name of XL Lib cannot be the same. The COM Component builder will use underscores “_” instead of special characters, i.e. “.” or “/” in the Name of XL Lib when creating the interface name because those special characters are not permitted in the IDL name. If the COM name entered has already been used, the COM Component Builder will force you to select an alternative name. Parameter definition The COM Builder supports up to twenty parameters in one RPC call. In the Definition of Parameters section, each parameter has three items: Type (data type) The data type must be selected from the drop down box. The user can select one of the defined simple types, or select a previously defined structure type (described below). The first empty type name field indicates that input is finished. Any items defined after an empty field will be ignored. IN/OUT/REF (Control Type) The second item is a control type. It supports IN, OUT, and INREF. INREF denotes an input with a pointer. Size If the parameter is an array, this field should be filled to indicate the number of elements in the array. Unlike the previous two items, this field can be empty. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 295 Running the COM Component Builder MBF-UDALink Structure Maker Enter a name in the Name of New Structure field and press Define to activate a structure definition window. If the structure name has been used previously, a confirmation window will advise you to redefine the structure name. Hundreds of structures can be defined on one system. The structure information is stored in \Sft\SM.mbf. If this file is removed, the COM Component Builder will no longer be able to see or use the defined structures. The COM Component Builder does not currently allow users to delete a defined structure. Similar to the main parameter definition window, each structure parameter also has three elements, Type, Name and Size of Array. It follows the same rule as the Main Window in that the first empty type or name field it encounters will terminate input. The "Size of array" field can be empty if the element is not an array. The Structure Maker Window, with data types listed. The Component Builder supports following data types in a structure: the • RPC_INTEGER - 16-bit integer • RPC_LONG - 32-bit integer • RPC_REAL - 32-bit floating point • RPC_DOUBLE - 64-bit integer • RPC_CHAR - 8-bit character • RPC_SMALLINT - 8-bit integer Each window supports ten entries. If more than ten members exist in the structure, additional windows will be displayed. There can be a maximum of 100 members in one structure. Click Cancel to remove all input in the current session. 296 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Running the COM Component Builder Add New Method After the first method is created, if the add option is accepted, the Main Window changes to the Add New Method mode. In this mode, only the "Name of RPC call" box is not greyed out. Click Cancel to exit this mode. In this mode, the last method’s parameter settings remain in the displayed windows. This is convenient if you need to add several similar RPCs. You may need to blank out some parameters remaining from the last RPC call. This is accomplished by selecting the last "empty" item in the Combo box. Once a method is added in the COM, it cannot be modified or deleted. It is important to check the confirmation windows carefully. The maximum number of methods that can be added is 10,000. When you no longer need to add more methods, reply NO to the Add New Method prompt, to exit from this mode. Providing the methods have been input properly and confirmed, the COM Component Builder will show a window that indicates the name of the COM component, the interface name, and the number of methods in the COM Component. To continue and build this component, click YES. The creation of the COM Component may take as much as a minute on slower machines. An audible ding may be heard periodically as the component is being built. If there is a problem with the build, an indication of the error can normally be determined by looking at the result.txt file in the C:\MBFoster COM\<COM_name> directory. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 297 Installing COM Component Builder MBF-UDALink Installing COM Component Builder Select: Start, Run. The Run window is displayed. Type:E:\Program_files\combuilder\setup.exe. "E" represents the drive letter of the CD-ROM which has the MB Foster software CD. As the Install prepares, the following screen is displayed. After the COM Component Builder prepares for installation, the Welcome screen is displayed. Select:NEXT 298 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Installing COM Component Builder The Destination Location screen is displayed. This screen enables you to change the default installation directory of the COM Component Builder. Enter a different location and press Next. The next screen allows you to change the default program group for the COM Component Builder Icon. Select a folder and press Next. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 299 Installing COM Component Builder MBF-UDALink Setup is ready to install COM Component Builder. If all the information you have entered is correct, press Next. The Installation Progress Bar is briefly displayed, followed by the Setup is Complete screen. Select Finish to complete the Setup. Note: Occasionally the installation of COM Component Builder will install newer versions of the .dll files on your PC. If this is the case, you will be prompted to reboot you computer before running COM Component Builder. For more information, contact the Technical Support Department at 1-800-ANSWERS or send email to support@mbfoster.com. 300 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Data types supported by Reporter Supported Data Types Data types supported by Reporter NOTE: A plus sign (+) following numeric data types is optional and, if present, indicates that the number can contain only positive values. X U 9 Z P I J K R F any ASCII character string upper case ASCII string numeric ASCII unsigned numeric zoned decimal numeric packed decimal numeric integer binary numeric integer binary (for COBOL) numeric logical binary unsigned numeric floating point numeric format (HP format) floating point scientific format (IEEE format) Special data types are available to identify date formats: DC DJ DP DY DM DD a day count from January 1, 1900 stored as a one- or two-word integer a Julian date stored as a one-word integer in the HP date format a PowerHouse date stored as a one word integer a character date format of “YYMMDD” or “YYYYMMDD” a character date format of “MMDDYY” or “MMDDYYYY” a character date format of “DDMMYY” or “DDMMYYYY” If a date is stored in a type that does not meet the requirements of the date data types shown above, enter a “&”. You will be prompted for the physical storage format of the date. Enter one of the following formats: YYMMDD or YYYYMMDD DDMMYY or DDMMYYYY MMDDYY or MMDDYYYY YYMM or YYYYMM MMYY or MMYYYY YYDDD or YYYYDDD DDDYY or DDDYYYY ASK CYMMDD year-month-day day-month-year month-day-year year-month month-year Julian year-day Julian day-year ASK manufacturing date format HP MPO date format (see below) MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 301 Data types supported by Reporter SQLDATE SQLTIME MBF-UDALink Allbase/SQL DATE and DATETIME Allbase/SQL TIME A date subtype can be defined for all field data types that are not date types. The date subtype indicates the date format of the numeric values stored in the field. Not all fields will have a date subtype defined. To display the subtype prompt, follow the data type with a “&”. The date data type or subtype used in edit field definitions can only be used to describe the actual storage format for the data. To change the format from one data type to another or to change the storage order from YYMMDD to DDMMYY, for example, you must create a computational field. If a date field is input to a computation, the date is converted to a day count (type DC). If a date field is the result of a computation, the day count is converted to the correct date field format. For data types DY, DM or DD, you can override the storage length of 6 with a lower number to obtain a truncated date value; to obtain the century format of the date set the storage length to 8. The HP MPO date format uses a letter code in the first position of a 6-digit date to indicate dates beyond 1999/12/31. The letter “A” represents the decade “2000–2009”, the letter “B” the decade “2010–2019”, the letter “C” the decade “2020–2029” and so on. The date will display with the letter code unless a date edit mask is added in field modification or report designer. In calculations, sorts, downloads and output files the date will be treated as if it were an 8-character format. For example: A00229 = 2000/02/29 B11231 = 2011/12/31 The SQLDATE and SQLTIME formats are automatically detected by Reporter when an SQL interface is used. If data is stored in “YYYY-MM-DD” format (including the dashes) this subtype can be used with other definition sources. 302 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Data types supported by Reporter Field storage length To determine the field length storage you require: DATA TYPE FOR A DISPLAY SIZE OF ENTER X n characters n* U n characters n* 9 n digits n* Z n digits n* P n digits (n+1) / 2 * I value <32767 value <2 billion value >2 billion 2 4 6 or 8 J 1 - 4 digits 5 - 9 digits 10 - 14 digits 2 4 8 K value <65535 value >65534 2 4 R 6 digits of precision 11 digits of precision 4 8 F 7 digits of precision 15 digits of precision 4 8 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 303 Data types supported by Reporter MBF-UDALink Edit masks Edit masks are combinations of the substitution and insertion characters that affect how a field is displayed on the output report. One character from the column is assigned to each substitution character in turn. Insertion characters (any character not in the following list) are printed as is. The following characters can be included in a field edit mask: SUBSTITUTION CHARACTER DEFINITION ^ Insert actual data character in this position. Z suppress leading zeros. $ Suppress leading zeros and place a dollar sign ($) before the left-most digit. * Replace all leading zeros with asterisks. . Align decimal point with decimal positions defined in the field. ! Put a decimal point in this position, regardless of the number of defined decimals for this field. mask( ) Format as indicated by the edit mask. If the value is negative, enclose it in parentheses. mask- Format as indicated by the edit mask. If the value is negative, itwill print with a trailing negative sign. maskCR Format as indicated by the edit mask. If the value is negative, it will print followed by “CR”. maskDR Format as indicated by the edit mask. If the value is negative, it will print followed by “DR”. Any other character is considered an insertion character, and will be displayed at that position in the field. When you specify an edit mask, you must be sure to allow a character for the sign position. For example, an edit mask of $$$$$$.^^ can hold a maximum value of 9999.99 because one character is taken up by the $ and another is reserved in case a minus sign is required. If your edit mask is not large enough to contain the field values, the field will be filled with ### characters. 304 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Data types supported by Reporter Date formatting If a field has a date type or subtype, the edit mask will be replaced by a date display format. Enter one of the choices shown below. Once a valid date format has been entered, a prompt for the separation character appears. Valid date formats are: YYMMDD, YYMMMDD, YYYYMMDD, or YYYYMMMDD (year-month-day) MMDDYY, MMMDDYY, MMDDYYYY, or MMMDDYYYY (month-day-year) DDMMYY, DDMMMYY, DDMMYYYY, or DDMMMYYYY (day-month-year) YYMM, YYMMM, YYYYMM or YYYYMMM (year-month) MMYY, MMMYY, MMYYYY or MMMYYYY (month-year) MMDD or MMMDD (month-day) DDMM or DDMMM (day-month) YYDDD or YYYYDDD (year-day) DDDYY or DDDYYYY (day-year) Enter a separation character for the date display format if required. Pressing Return indicates you do not want a separator and the date will print as 951231 (for example). Enter “0” (zero) to cancel any existing separator. This prompt only appears if you enter a date display format. To change the date separation character, re-enter the date display format. Built-in functions Date functions If the system date is Tuesday, November 30, 1999, the time is 2:30 P.M. the following values will be returned using these functions: $TODAY - the system date in the form YYMMDD with a DY data type; example: 991130 $DY[yymmdd] - allows entry of a date literal in the form YYMMDD or YYYYMMDD; example: $DY[991130] or $DY[19991130] $DM[mmddyy] - allows entry of a date literal in the form MMDDYY or MMDDYYYY; example: $DM[113099] or $DM[11301999] MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 305 Data types supported by Reporter MBF-UDALink $DD[ddmmyy] - allows entry of a date literal in the form DDMMYY or DDMMYYYY; example: $DD[301190] or $DD[31101999] $TIME - returns the current time in HHMMAM (12 hour format) example: 0127 PM $ITIME - returns the current time in HHMM (24 hour format) example: 1327 $WEEKDAY - returns the current day of the week as a number (1=Sunday...7=Saturday) $DAYNAME - returns the current day of the week by name $MONTHNAME - returns the current month name The $D[.......] functions perform date validity checks and display an error message if an invalid date is entered. String functions If the system date is Friday, June 1, 2001, the time is 2:30 P.M. , these functions return the values: $USER - the logon user ID; for example: MGR $TIME - the system time in HHMMPM format (12 hour format); for example: 0230PM $ITIME - the system time in HHMM format (24 hour format); for example: 1430 $DAYNAME - the system day of the week by name; for example: Friday $MONTHNAME - the system month name; for example: June Numeric functions If the system date is Friday, June 1, 2001, the time is 2:30 p.m. these functions return the following values: $YEAR - the system year; for example: 01 $MONTH - the system month; for example: 06 $DAY - the system day; for example: 01 $JDAY - the day of the year for the system date; for example: 152 $CYEAR - the system year as a four digit “century” year; for example: 2001 $WEEKDAY - the system day of the week, for example: Friday - 6 306 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Data types supported by ODBC driver Data types supported by ODBC driver The following table shows the correspondence between HP data types and ODBC data types. HP DATA TYPE ODBC DATA TYPE DESCRIPTION CHAR, max length <255 SQL_CHAR CHAR, max length >=255 SQL_LONGVARCHAR VARCHAR, max length <255 SQL_VARCHAR VARCHAR, max length >=255 SQL_LONGVARCHAR BINARY, length <256 SQL_BINARY BINARY, length >=256 SQL_LONGVARBINARY VARBINARY <256 SQL_LONGVARBINARY VARBINARY >=256 SQL-LONGVARBINARY LONG BINARY SQL_LONGVARBINARY LONG VARBINARY SQL_LONGVARBINARY INTEGER (32-bit) SQL_INTEGER SMALLINT (16-bit) SQL_SMALLINT DECIMAL (Internal representation is packed decimal) SQL_DECIMAL FLOAT(24) or REAL or SQL_REAL FLOAT(53) or DOUBLE PRECISION or SQL_DOUBLE DATE SQL_DATE 6-byte with year, month, day in 2byte binary fields TIME SQL_TIME 6-byte with hour, minute, second in 2-byte binary fields MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 Character representation with leading sign and decimal point 307 Data types supported by ODBC driver MBF-UDALink DATETIME SQL_TIMESTAMP 16-byte made up of year(2), month(2), day (2), hour (2), minute (2), second (2), fraction (4) INTERVAL SQL_CHAR Format is Addddddd hh:mm:ss.fff@ Note: When creating a table using CHAR and Binary data types that are greater than 255 characters, the resulting data types used will be LONGVARCHAR and LONGVARBINARY. This may not be the data type expected by the application. Notes on data types • Updates to LONGVARCHAR and LONGVARBINARY items are not supported. To retrieve them, call SQLFetch and SQLGetData in chunks. • When a zoned-decimal item is a key item in a dataset and qualifying data according the value of the item, the DBFIND is done twice, once for the signed value and, if no entries are found, again for the unsigned value. • This won’t work if both signed and unsigned values are present. Notes on ODBC data types • SQL_CHAR can only go up to 255 bytes, so everything longer must go into a LONGVARCHAR. • SQL_DECIMAL is a character-based value, with leading sign and decimal point. • SQL_DATE is a 6-byte binary value, with the year in bytes 0-1, the month in bytes 2-3, and the day in bytes 4-5. Determining data types Run MBFUTIL with the user ID and password you are using and do a SHOW <tablename>. Notes on using BLOBs When creating an ALLBASE table for storage of BLOBs, use a LONG VARBINARY column. ALLBASE allocates storage space according to the actual size of the BLOB. For example, Creating a table with a column defined as LONG VARBINARY (200000000) and writing a 10K BLOB to it results in only 10K of space being used (not the 2 GB specified when the column was created). 308 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Data types supported by ODBC driver Although you can store a BLOB using a LONGBINARY column, this is not recommended because ALLBASE will allocate storage space according to the specified column size for each BLOB regardless of the size of the actual data. Creating a table with a column defined as LONGBINARY(1000000) and writing a 10K BLOB will result in 1000000 bytes of space being used for each BLOB. You will quickly run out of space in your database. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 309 Data types supported by ODBC driver 310 MBF-UDALink MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors Error messages Common errors Three types of errors may be encountered: • User errors are user correctable. • System errors are usually correctable by system management. • Trap errors are not correctable but are not usually fatal. User errors The USER error message indicates an error probably caused by some user action but correctable by the user. (USER 1) INVALID OPTION NUMBER Probable Cause: Not a valid choice. What to Do: Enter a number associated with an option displayed on the menu. (USER 2) INVALID FILE NAME Probable Cause: File name does not begin with an alphabetic character, contains characters that are not alphabetic/numeric, or is longer than 8 characters. What to Do: Enter a correct file name. (USER 3) NUMBER NOT WITHIN RANGE OF <range> Probable Cause: You entered an invalid number. What to Do: Enter a number within the range. (USER 4) INVALID RESPONSE - EXPECTING <list> Probable Cause: You entered an incorrect choice. What to Do: Enter one of the choices given in the list. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 311 User errors MBF-UDALink (USER 5) TRANSFER FILE DOES NOT EXIST Probable Cause: You tried to access a procedure transfer file that does not exist. What to Do: Enter the name of an existing file. (USER 6) NOT A PROCEDURE TRANSFER FILE TYPE Probable Cause: You tried to access a file that is not a procedure transfer file. What to Do: Enter the name of a procedure transfer file. (USER 7) INVALID ARITHMETIC FORMAT FOR FIELD: <name> Probable Cause: The format of the file being read does not match the format specified in the procedure. An invalid format for a field of type Z, P, or 9 has been encountered. What to Do: Recreate the procedure with the proper format. This may require the revision of Dictionary definitions. (USER 8) ATTEMPT TO ASSIGN NEGATIVE VALUE TO FIELD: <name> Probable Cause: A computational field has been defined as accepting positive values only. What to Do: Recreate the procedure and either change the data type of the computational field or change the computational expression. (USER 9) ARITHMETIC OVERFLOW FOR FIELD: <name> Probable Cause: The value calculated for a computational field is too large to be stored in the field storage length specified. What to Do: Recreate the procedure and either increase the field storage length of the computational field or change the computational expression. (USER 10) ENTRY CANNOT BE NEGATIVE Probable Cause: You entered a negative value for a field defined as accepting positive values only. What to Do: Enter a positive value or change the data type definition for the field. 312 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 11) ENTRY MUST BE NUMERIC Probable Cause: You have entered a character other than a digit. What to Do: Enter numeric characters only. (USER 12) INVALID PRECEDING RELATIONAL OPERATOR Probable Cause: An invalid operator has been entered. What to Do: Use either LT, LE, GT, GE, NE, or EQ, or the equivalent arithmetic symbols of <, <=, >, >=, <>, or =. (USER 13) INVALID LOGICAL CONNECTOR Probable Cause: You have entered an invalid connector. What to Do: Use either TO, AND or OR. (USER 14) INVALID USER NAME Probable Cause: The user name contains an illegal character or is longer than 8 characters. What to Do: Enter a correct user name. (USER 15) EXPECTING AN ENTRY Probable Cause: No entry has been made to a prompt that requires a value. What to Do: Enter a value or escape character. (USER 16) LINKING FILE HAS NOT YET BEEN ACCESSED Probable Cause: You have entered a file reference number as a linking file specification and this file is not in the specified access order. What to Do: Enter a correct file access and linkage order specification. (USER 17) INPUT FIELD LONGER THAN <length> Probable Cause: You have entered a field value having more characters than are allowed. What to Do: Enter the value using no more than the allowed length. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 313 User errors MBF-UDALink (USER 18) NUMERIC INTEGER PART LONGER THAN <length> Probable Cause: You have specified a larger integer than the field is capable of holding. What to Do: Enter the value using no more than the allowed integer length. (USER 19) NUMERIC DECIMAL PART LONGER THAN <length> Probable Cause: You have entered more decimal positions than the field allows. What to Do: Enter a value using no more than the allowed length. (USER 20) NO PROCEDURE CURRENTLY EXISTS Probable Cause: You are trying to SAVE a procedure that does not exist. What to Do: Select an option of CREATE, REVIEW, MODIFY or RUN to access a procedure. (USER 21) INVALID HELP CHOICE Probable Cause: You have entered a number that does not appear on the menu list when you requested HELP. What to Do: Enter a single question mark ?, or a double question mark ??, and one of the numbers on the menu. (USER 22) ENTRY NOT FOUND IN CATALOG Probable Cause: Incorrect name entered or incorrect catalog specified. What to Do: Enter the correct name or catalog specification. (USER 23) INVALID DATA FIELD TYPE Probable Cause: You have entered a data type that is not supported. What to Do: Enter only a type of U, X, 9, I, J, K, Z, P, R, f, DC, DJ, DY, DM, or DD. Numeric types may be followed by a “+” sign to indicate positive values only and/or a “&” to specify a date storage format in a following prompt. 314 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 24) INVALID NUMBER Probable Cause: You have entered an invalid number for the prompt. What to Do: Enter a correct number. Check this manual or the associated help message if you need assistance. (USER 25) INVALID FIELD DISPLAY SIZE FOR DATA TYPE Probable Cause: You have entered an incorrect field display size for the specified data type. What to Do: Enter a correct value. Check this manual or the associated help message if you need assistance. (USER 26) INVALID FIELD STORAGE LENGTH FOR DATA TYPE Probable Cause: The field storage length you have specified for the field being defined is not valid for the data type you specified. What to Do: Enter a correct field storage length. Refer to the appropriate entry in Section 4 (i.e. “Enter your own file definitions” or “entering computational expressions”). If the problem is really with the data type, enter “/” until you are reprompted for the data type, then enter the correct data type. (USER 27) DATA SET DOES NOT EXIST IN GIVEN DATA BASE Probable Cause: The data set specified is not part of the database you specified. What to Do: Enter a set name that is part of the base, or enter Return to be prompted for another database name. (USER 28) DUPLICATE TO ITEM NAME: <item name> [(real name)] Probable Cause: You have entered a field name already in use. If the field has a different menu name from its real (physical) name, then the duplicate real name is shown in parentheses. What to Do: Enter a unique name. (USER 29) INVALID DATA BASE NAME Probable Cause: The database name you entered contains an illegal character and is longer than 6 characters. What to Do: Enter a correct database name. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 315 User errors MBF-UDALink (USER 30) DATA BASE OPEN: <error message> Probable Cause: You have entered a password incorrectly, or the password entered does not allow you to access the base, or your log on USER does not have read access. What to Do: If you entered the wrong password, enter the correct one. Otherwise, enter a double slash (“//”) to be taken back to the main menu; then see your System Administrator. (USER 31) INVALID FIELD NAME Probable Cause: The field name you entered contains an illegal character or is longer than 20 characters. What to Do: Enter a correct field name. (USER 32) EXPRESSION TOO LONG Probable Cause: You have entered too long a computational expression. What to Do: Split the expression to form one or more computational fields. (USER 33) EXPECTING A NUMERIC Probable Cause: A numeric value is expected here in a computational expression. What to Do: Enter a correct computational expression. (USER 34) INVALID NUMERIC OR CHARACTER STRING FORMAT Probable Cause: You have entered an invalid literal format in a computational expression. What to Do: Enter a correct computational expression. (USER 35) INVALID FIELD NUMBER Probable Cause: You entered a field number which is less than 1 or greater than the largest number of the menu list. What to Do: Enter only numbers corresponding to the item numbers of data fields in the menu. Separate numbers by a comma (“,”) or a slash (“/”). 316 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 36) DATA TYPE INCOMPATIBLE WITH DATA TYPE OF PREVIOUS FIELD(S) Probable Cause: In a computational expression, you have entered a field reference number of a data type incompatible with the type of expression (arithmetic or string) that has been determined for the computational expression. What to Do: Enter a compatible field reference number. (USER 37) NO CLOSING QUOTATION MARK Probable Cause: You omitted the beginning or ending quotation mark of a text string. What to Do: Re-enter the text string with opening and closing quotation marks. (USER 38) MISMATCHED PARENTHESES Probable Cause: You have omitted an opening or closing parenthesis in a computational expression. What to Do: Enter a correct computational expression. (USER 39) INVALID SUBFIELD NUMBER Probable Cause: You have specified an occurrence number less than 1 or greater than the number of occurrences defined for the field. What to Do: Enter a valid occurrence number. (USER 40) INVALID SUBFIELD POSITION OR LENGTH Probable Cause: You have specified a substring (i.e. position and length) that exceeds the upper boundary of the field. What to Do: Enter a valid start position and length. (USER 41) INVALID FIELD TYPE FOR SUBSTRING SPECIFICATION Probable Cause: You have specified a substring (i.e. position and length) for a field that is not a character type (X or U) or a numeric character type (9 or Z). What to Do: Enter a valid reference. You may have attempted to use a substring reference where a subfield reference (i.e. occurrence) is expected. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 317 User errors MBF-UDALink (USER 42) COMPUTATIONAL EXPRESSION SYNTAX Probable Cause: The computational expression is not in the correct form. Perhaps an arithmetic or string operator is missing or is in the wrong order. What to Do: Enter a correct computational expression. (USER 43) INVALID MENU SELECTION NUMBER OR CODE Probable Cause: You have entered a number that does not correspond to an entry in the menu list, or a code suffix that is invalid for the given type of menu selection. What to Do: Enter your selection using only the numbers that appear in the menu list above. Check the associated help message for valid codes if required. (USER 44) DUPLICATE MENU SELECTION NUMBER Probable Cause: You entered a field number twice. What to Do: Enter a non-duplicating selection. (USER 45) TOO MANY MENU SELECTION NUMBERS ENTERED Probable Cause: You entered more numbers than the menu list contains. What to Do: Enter a correct selection. (USER 46) INVALID ENTRY NAME Probable Cause: The catalog entry name you entered contains an illegal character or is longer than 10 characters. What to Do: Enter a correct entry name. (USER 47) INVALID FIELD TYPE FOR SPECIFIED FUNCTION Probable Cause: The specified function can only be performed on a numeric data type. What to Do: Enter a valid field reference number or change data type to numeric. (USER 48) Not Used 318 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 49) DATA BASE NOT DEFINED IN DICTIONARY Probable Cause: The definition for the specified database is not in this Dictionary. What to Do: Check the spelling or try another Dictionary. (USER 50) TABLE NOT DEFINED IN DICTIONARY Probable Cause: The definition for the specified table is not in this Dictionary. What to Do: Check the spelling or try another Dictionary. (USER 53) NO DATA FIELDS HAVE BEEN SELECTED Probable Cause: No fields were selected from any of the input files. What to Do: Redo the procedure creation and specify the data fields to be accessed. (USER 54) INVALID CHARACTER IN NAME Probable Cause: The name you entered contains a character that is not valid for this type of name. What to Do: Re-enter the name. For file names, use only the letters A-Z and numbers 0-9. For procedure or dataview names use only the letters A-Z, numbers 0-9 and special characters + - * / ‘ # % &. For field names, use only the letters A-Z, the numbers 0-9, and the following special characters: # & ‘ @ + - ? / * . (USER 55) NO COMPUTATIONAL FIELDS HAVE BEEN DEFINED Probable Cause: You specified that the file linkage to a file is a computational field. However, you have not defined any computational fields for this procedure. What to Do: Enter an appropriate file access order. (USER 56) NO DEFINED PATH EXISTS BETWEEN THESE TWO TABLES Probable Cause: You specified that two tables should be linked using the defined data path, however no path is defined for these two tables. What to Do: Enter the file access order and specify that you will not use the defined path for these two data sets; you will have to manually select the fields to use as the linkage. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 319 User errors MBF-UDALink (USER 57) INVALID DELETE INSTRUCTION Probable Cause: You specified an invalid delete command. Perhaps a character other than “D” in the delete text string or the delete text string is followed by a character other than “I” (for inserts). What to Do: Enter a correct delete command string. (USER 58) FIELD IS NOT NUMERIC TYPE Probable Cause: You specified a numeric computation on an alphanumeric field. What to Do: Enter a different field number or enter a computational instruction that applies to alphanumeric fields. (USER 59) NOT AN FD FILE TYPE Probable Cause: The file name you entered is not a File-Definition (FD) file. What to Do: Enter the name of an FD file. (USER 60) NOT AN SD FILE TYPE Probable Cause: The file name you entered is not a Self-Describing (SD) file. What to Do: Enter the name of an SD file. (USER 61) INVALID PASSWORD Probable Cause: The password entered is not valid. What to Do: Enter the correct password. (USER 62) FILE ALREADY DEFINED Probable Cause: A duplicate file name has been entered for a File-Definition (FD) file. What to Do: Enter a unique name for the file. 320 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 63) CANNOT REPLACE/DELETE A CATALOG ENTRY THAT YOU DID NOT CREATE Probable Cause: You have specified a procedure entry for replacement (after modification) or deletion that you did not create. Only the creator can replace or delete a catalog entry. A system administrator can perform this function if they are in the DXSysMgr or DXAdmin group. What to Do: Enter the name of a catalog entry that you created, or save the modified entry under a different name. (USER 64) MUST BE A SORT FIELD Probable Cause: The field you specified for summary selection is not a sort field. What to Do: Enter the correct field number or add the desired field to the sort list. (USER 65) MUST BE AN OUTPUT FILE FIELD Probable Cause: The field you specified for summary function (such as Average) is not an output field. What to Do: Enter the correct field number or add the desired field to the list of fields to be included in the output file. (USER 66) DISPLAY OVERFLOW FOR FIELD: <field name> Probable Cause: When this field is converted to numeric ASCII characters for display, it is longer than the specified display length for the field. What to Do: Increase the field display length. (USER 67) INVALID PAGE PART IDENTIFIER Probable Cause: Page part specified does not exist. What to Do: Enter a valid page part identifier (e.g.. A, B, etc.). (USER 68) FIELD FUNCTION MUST BE THE ONLY ITEM IN EXPRESSION Probable Cause: This version of the product does not allow a functional value to be used in a computational expression. The computational field can therefore only take on the computed functional value. What to Do: Enter one field reference number followed by function code (i.e. P or R). MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 321 User errors MBF-UDALink (USER 69) CANNOT DELETE THE FOLLOWING FILE(S) BECAUSE OF FIELD USAGE: <list> Probable Cause: One or more files are needed in the access order because they contain one or more fields still used in the procedure. What to Do: Enter all of the file reference numbers needed, or remove the field(s) from procedure usage. (USER 70) FUNCTIONAL FIELD NOT PERMITTED IN THIS TYPE OF SPECIFICATION Probable Cause: A field defined as having a functional value, such as percentages or ratio, cannot be used in this selection (for example, as a sort field). What to Do: Enter a correct field selection list. (USER 71) USER DOES NOT HAVE THE CAPABILITY TO SPECIFY FIXED SELECTION Probable Cause: The user or system profile is not set to allow fixed (“F”) selection criteria. What to Do: Request the System Administrator to change the profile if appropriate or use the predefined (“P”) selection criteria specification. (USER 72) COMPUTATIONAL EXPRESSION OVERFLOW Probable Cause: You have created a computational expression that is too long for the internal buffers. What to Do: Split the expression to form one or more intermediate computational fields. (USER 73) NOT A PowerHouse SUBFILE TYPE Probable Cause: The file name you entered is not a PowerHouse subfile. What to Do: Enter a valid PowerHouse subfile name. (USER 74) INVALID DATE FORMAT FOR FIELD: <name> Probable Cause: An invalid date format has been encountered for the field. The value does not correspond to permitted value(s) for the particular date type of the field. What to Do: Correct the field value or date type. 322 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 75) DATE FORMAT OVERFLOW FOR FIELD: <name> Probable Cause: A resultant date value from a conversion or computational process will not fit the available storage space for the field. This typically occurs for the “years” part where century has been included. What to Do: Correct the field value or date type. (USER 76) INVALID DEVICE SPECIFICATION Probable Cause: Device name or number is not valid for your system. What to Do: Enter a valid device name or number. (USER 77) NO FILE ACCESS CAN FOLLOW A MISSING OPTION Probable Cause: One or more file reference numbers follow a “report if missing” record access option (negative sign in front of a file reference number). What to Do: Enter the file access order correctly. (USER 79) AN UNNAMED PROCEDURE CANNOT BE BATCH PROCESSED Probable Cause: You have tried to set up a batch run for a new procedure that has not yet been saved to a procedure catalog. What to Do: Save the procedure and repeat the batch run setup. (USER 80) EXPECTING AN ALPHABETIC CHARACTER Probable Cause: You have specified a non-alphabetic character. What to Do: Enter an alphabetic character. (USER 81) INVALID EMULATOR IDENTIFIER Probable Cause: You have specified an invalid emulator type. What to Do: Refer to PC interchange parameters. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 323 User errors MBF-UDALink (USER 82) ‘OR’ NOT ALLOWED ON THIS FIELD SELECTION Probable Cause: There is predefined selection on another field in this procedure. An ‘OR’ operator in this case would override the desired selection. What to do: Modify the selection criteria using the MODIFY procedure menu or write a new procedure. (USER 83) FILE HAS ALREADY BEEN SELECTED Probable Cause: Duplicate file selection not allowed. What to Do: Correct the file selection. (USER 84) Not used at present (USER 85) INVALID SYSTEM VARIABLE IDENTIFIER Probable Cause: Invalid system variable reference of the form ‘$name’ found in a computational expression. What to Do: Correct the computational expression. (USER 86) INVALID DATE LITERAL FORMAT Probable Cause: A date field to be displayed, output or used in a calculation contains an invalid date format for the field data type. What to Do: Check the source data and correct the data or field data type. (USER 87) INVALID DATE YEAR Probable Cause: You have entered a date with an invalid year specified. What to Do: Enter a correct date format. (USER 88) INVALID DATE MONTH Probable Cause: You have entered a date with an invalid month specified. What to Do: Enter a correct date format with a month number between 01 and 12. 324 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 89) INVALID DATE DAY Probable Cause: You have entered a date with an invalid day specified. What to Do: Enter a correct date format with a day number between 01 and the maximum day for the given month. (USER 90) - (USER 97) Not used as present. (USER 98) PROCEDURE CATALOG TRANSFER FILE Probable Cause: You have accessed a procedure catalog transfer file for importing entries to a catalog that does not contain procedures. What to Do: Use a correct import file. (USER 101) APPEND FILE HAS INCOMPATIBLE RECORD LENGTH: Probable Cause: The existing file has a different record length from the new extract file record length. What to Do: select the correct append file. (USER 104) INVALID CHARACTER IN NUMERIC KEYWORD Probable Cause: A non-digit character found in a numeric keyword. What to Do: Enter a correct numeric keyword. (USER 105) EXPECTING A USER CLASS NAME Probable Cause: You did not enter a name starting with a $ character. What to Do: Enter an existing class name (starting with a $). (USER 106) INVALID DATE TYPE FORMAT Probable Cause: You have entered an invalid date format. What to Do: Enter a ‘??’ help request to see a list of valid formats, or consult this manual. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 325 User errors MBF-UDALink (USER 107) INVALID DATE DISPLAY FORMAT Probable Cause: You have entered an invalid date display format. What to Do: Enter a ‘??’ help request to see a list of valid formats, or consult this manual. (USER 108) INVALID BIT STRING POSITION OR LENGTH Probable Cause: You have specified a bit string (i.e.: position and length) that exceeds the upper boundary of the field. What to Do: Enter a valid start position and length. (USER 109) - (USER 111) Not used at present. (USER 112) DATE SUBTYPE NOT VALID FOR A DATE TYPE Probable Cause: You cannot specify a date subtype for an existing date field type. What to Do: Change the date field type to the equivalent alpha or numeric type then add the date subtype. (USER 113) FORMAT EXCEEDS PAGE DEPTH AND WILL BE TRUNCATED Probable Cause: The report page format designed with ReportDesigner cannot display headings and the field values for at least one detail record within the specified page depth. What to Do: Change the format or page depth. (USER 114) NO SORT FIELDS MAY BE SPECIFIED WITH THE REPORT TOTALS OPTION Probable Cause: You have entered one or more sort field references in addition to a ‘0’. Entering a zero on its own will generate a ‘summarize by’ prompt to which an entry of ‘0’ will specify report level summaries only. What to Do: Enter ‘0’ for report level totals only or enter one or more sort field reference numbers. (USER 115) CANNOT DELETE AN OUTPUT FIELD Probable Cause: You cannot delete a field used in the procedure output list. What to Do: Remove the field from the output list. 326 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 116) CANNOT DELETE A SORT FIELD Probable Cause: You cannot delete a field used in the procedure sort list. What to Do: Remove the field from the sort list. (USER 117) CANNOT DELETE A SELECTION FIELD Probable Cause: You cannot delete a field used in the procedure selection criteria list. What to Do: Remove the field from the selection criteria list. (USER 118) CANNOT DELETE A FIELD USED IN ANOTHER COMPUTATION Probable Cause: You cannot delete a field required by a computed field. What to Do: Delete the computed field if appropriate. (USER 119) CANNOT DELETE A FIELD USED AS A FILE LINKAGE KEY Probable Cause: You cannot delete a field needed as a linkage key between two files on the access path. What to Do: Change the file access linkage. (USER 120) CANNOT DELETE A FIELD USED IN THE VIEW Probable Cause: You cannot delete a field used in the View menu list. What to Do: Remove the field from the menu list. (USER 121) FILE HAS ALREADY BEEN SELECTED AS A SOURCE FILE Probable Cause: FD output file name is the same as the definition source input file name. What to Do: Enter a correct file name. (USER 122) VALUE TOO LARGE FOR FIELD STORAGE SIZE Probable Cause: Data value entered is too large to store in field. What to Do: Enter a smaller correct value. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 327 User errors MBF-UDALink (USER 123) NOT A MBF-UDALink SUBFILE TYPE Probable Cause: The file name you entered is not a MBF-UDALink subfile. What to Do: Enter a valid MBF-UDALink subfile name. (USER 124) CANNOT ACCEPT PowerHouse SUBFILE FORMAT Probable Cause: The subfile format ‘number’ is not supported by MBF-UDALink. What to Do: Generate a subfile of format 0, 3 or 5. (USER 125) PC FILE DOES NOT EXIST Probable Cause: The file named for an upload transfer does not exist in the PC file directory. What to do: Enter the name of an existing PC file. (USER 126) UNRECOGNIZABLE PC FILE FORMAT FOR CONVERSION Probable Cause: The PC file format found cannot be converted. What to do: Use a file whose format can be converted, for example: PRN or WKS. (USER 127) INVALID FIELD REFERENCE FORMAT Probable Cause: You have entered an incorrect field reference format in a computational expression. For example, the field reference number is not within square brackets (`[n]’) What to do: Correct the computational expression (if necessary, refer to the feature documentation). (USER 129) USER DID NOT SUPPLY CORRECT PASSWORD TO OPEN DATA BASE Probable Cause: User of dictionary database needs a valid password for access. What to do: Enter a valid password or cancel the operation. (USER 130) COLUMN NUMBER NOT WITHIN RANGE OF: <range> Probable Cause: The field number specified in the report heading is no longer a display field. What to do: Use the DEFAULT function key under the MOVE function to return the field to the display line. 328 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User errors (USER 131) CANNOT DELETE A FIELD USED FOR SELECTION VALUES Probable Cause: You cannot delete a field used in the procedure to supply selection values for another field. What to do: Remove the field as a selection value target, if appropriate. (USER 132) FOLLOWING SQL COLUMNS ARE NOT SELECTABLE: <NUMBERS> Probable Cause: Not all SQL data types are supported. Columns whose names are surrounded by [....] are not supported. What to do: Enter “n?” to display the data type of the column not selected. The columns indicated were ignored in the procedure. (USER 133) INVALID FILE REFERENCE FORMAT Probable Cause: The file name was not a valid file name enclosed in square brackets ([filename]). What to do: Re-enter the file name enclosed in square brackets. (USER 134) SQL TABLES MUST BE ACCESSED AND LINKED BEFORE ANY OTHER FILES Probable Cause: You have specified a table/file access order that is not currently supported. What to do: You must specify all SQL tables before any other type of file in the access order. (USER 135) NO DEFAULT ORACLE SID EXISTS Probable Cause: The environment variable ORACLE_SID is missing. What to do: Add the appropriate SETVAR to your session startup routine or contact your ORACLE database administrator. (USER 136) NO CATALOG EXISTS Probable Cause: The location specified was correct but no MBF-UDALink catalog was found. What to do: Verify the location of the catalog and re-enter the location (USER 137) INVALID CATALOG LOCATION Probable Cause: The directory name specified does not exist. What to do: Enter a valid directory name. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 329 System errors MBF-UDALink System errors The SYSTEM error messages indicate a system resource problem that normally needs the System Administrator to correct it. (In some organizations this may be the same person.) This section refers to the utility program MBFMAINT. If you get one of these error messages, or if the System Administrator is unable to solve the problem, contact MB Foster Technical Support. (SYSTEM 1) CATALOG FILE RENAME FAILURE Probable Cause: File system error occurred during the update of a catalog. What to Do: Contact your System Administrator. (SYSTEM 2) INCOMPATIBLE PROCEDURE VERSION: <version> Probable Cause: You attempted to access a procedure created by an earlier version of the program, and the earlier file format cannot be interpreted by the current version. What to Do: Contact your System Administrator. (SYSTEM 3) CANNOT OPEN PRINT FILE Probable Cause: File system error in opening the DXLIST print file. What to Do: Contact your System Administrator. (SYSTEM 4) TEMPORARY FILE, <error message> Probable Cause: File system error in accessing a temporary file. What to Do: Contact your System Administrator. (SYSTEM 5) SORT INITIALIZATION: INSUFFICIENT WORKSPACE Probable Cause: Not enough workspace is available for the sorting buffers. What to Do: Request that your System Administrator use MBFMAINT to increase the “Maximum Workspace Buffer Size”. (SYSTEM 6) SORT FILE, <error message> Probable Cause: File system error in writing to the DXSORT sort file. What to Do: Contact your System Administrator. 330 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 7) SORT OUTPUT: SORT FILE ERROR Probable Cause: File system error during sorting. What to Do: Contact your System Administrator. (SYSTEM 8) SORT END Probable Cause: SORTEND system intrinsic error. What to Do: Contact your System Administrator. (SYSTEM 9) OLD CATALOG, <error message> Probable Cause: File system error on input catalog during a catalog conversion process. What to Do: Contact your System Administrator. (SYSTEM 10) DXOUT FILE ACCESS Probable Cause: File system error in writing to the DXOUT (terminal output) file. What to Do: Contact your System Administrator. (SYSTEM 11) CATALOG , <error message> Probable Cause: File system error in accessing a catalog. What to Do: Contact your System Administrator. (SYSTEM 12) PROCEDURE ROLL FILE, <error message> Probable Cause: File system error in accessing a temporary file used to save a procedure during certain maintenance functions. What to Do: Contact your System Administrator. (SYSTEM 13) MESSAGE CATALOG, <error message> Probable Cause: File system error in accessing the DX0XCAT or DX0YCAT message catalog. What to Do: Contact your System Administrator. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 331 System errors MBF-UDALink (SYSTEM 14) CATALOG (TEMPORARY), <error message> Probable Cause: File system error in accessing a temporary file created during the update of a catalog. What to Do: Contact your System Administrator. (SYSTEM 16) OUTPUT FILE, <error message> Probable Cause: File system error in accessing the output (extract) file. What to Do: Contact your System Administrator. (SYSTEM 17) LISTING FILE, <error message> Probable Cause: File system error in accessing the DXLIST listing file. What to Do: Contact your System Administrator. (SYSTEM 18) DATA BASE ROOT FILE, <error message> Probable Cause: File system error in accessing an Eloquence root file. What to Do: Contact your System Administrator. (SYSTEM 19) FILE, <error message> Probable Cause: File system error in accessing a general file. What to Do: Contact your System Administrator. (SYSTEM 20) SELECT TABLE OVERFLOW Probable Cause: Too many items have been encountered to fit in the item list part of a menu display. This will only occur while creating a procedure. It indicates that the maximum number configured for databases, or files, or fields has been exceeded. What to Do: Depending on the menu where the error occurred, request that your System Administrator increase: the “Maximum Number of Data Bases” for data base names; the “Maximum Number of Data Files” for file names; the “Maximum Number of Data Fields” for data field names. 332 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 21) FIELD TABLE OVERFLOW Probable Cause: Too many fields have been specified for the working set of the procedure. What to Do: Request that your System Administrator increase the “Maximum Number of Data Fields”. (SYSTEM 22) BASE TABLE OVERFLOW Probable Cause: Too many databases have been specified for the procedure. What to Do: Request that your System Administrator increase the “Maximum Number of Data Bases”. (SYSTEM 23) FILE TABLE OVERFLOW Probable Cause: Too many files have been specified for the procedure. What to Do: Request that your System Administrator increase the “Maximum Number of Files”. (SYSTEM 24) LINK TABLE OVERFLOW Probable Cause: Too many file-field linkages have been specified for the procedure. What to Do: Request that your System Administrator increase the “Maximum Number of Field Links”. (SYSTEM 25) MENU TABLE OVERFLOW Probable Cause: Too many files or fields are defined to fit into a fixed size menu. What to Do: Request that your System Administrator reduce the “Maximum Number of Files” or the “Maximum Number of Data Fields”. (SYSTEM 26) MISSING BASE IN DICTIONARY Probable Cause: The Dictionary being accessed is corrupted. What to Do: Contact your System Administrator. (SYSTEM 27) MISSING SET IN DICTIONARY Probable Cause: The Dictionary being accessed is corrupted. What to Do: Contact your System Administrator. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 333 System errors MBF-UDALink (SYSTEM 28) MISSING ELEMENT IN DICTIONARY Probable Cause: The Dictionary being accessed is corrupted. What to Do: Contact your System Administrator. (SYSTEM 29) MISSING KEY IN DICTIONARY Probable Cause: The Dictionary being accessed is corrupted. What to Do: Contact your System Administrator. (SYSTEM 30) INVALID TEST MODE PARAMETER Probable Cause: You are in an internal test mode and have entered an incorrect command word. What to Do: Contact your System Administrator or MBFoster Technical Support if this mode has been made available to your copy of the MBF-UDALink. (SYSTEM 31) WORKSPACE ENTRIES OVERFLOW Probable Cause: The maximum number of entries that can be written to the Workspace Buffer has been exceeded. What to Do: Request that your System Administrator increase the “Maximum Number of Workspace Entries”. (SYSTEM 32) WORKSPACE BUFFER OVERFLOW Probable Cause: The size of the workspace buffer, which holds data for runtime temporary variables such as keys, arguments, and match criteria, has overflowed. What to Do: Request that your System Administrator increase the “Maximum Workspace Buffer Size”. (SYSTEM 33) INTEGER OVERFLOW Probable Cause: An integer overflow has occurred during a computational process. What to Do: Contact your System Administrator. 334 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 36) DATA BUFFER OVERFLOW Probable Cause: The data buffer, which holds all fields retrieved from data sets and files, has overflowed. What to Do: Request that your System Administrator increase the “Maximum Data Buffer Size”. (SYSTEM 37) NEW CATALOG: <error message> Probable Cause: File system error on output catalog during a catalog conversion process. What to Do: Contact your System Administrator. (SYSTEM 38) INSUFFICIENT STACK FOR FUNCTION: <number1(number2)> Probable Cause: Cumulative table sizes exceed data stack available: “number1" is the stack size requested; ”number2" is the increase in stack requested (if zero then a decrease was requested). What to Do: Request that your System Administrator reduce the size of one or more of the tables. (SYSTEM 39) DECIMAL OVERFLOW: <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: Contact your System Administrator. (SYSTEM 40) DECIMAL DIVIDE BY ZERO <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: No action is required: this is a warning message. (SYSTEM 41) EXTENDED PRECISION DIVIDE BY ZERO <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: No action is required: this is a warning message. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 335 System errors MBF-UDALink (SYSTEM 42) EXTENDED PRECISION UNDERFLOW <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: Contact your System Administrator. (SYSTEM 43) EXTENDED PRECISION OVERFLOW <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: Contact your System Administrator. (SYSTEM 44) FLOATING POINT OVERFLOW <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: Contact your System Administrator. (SYSTEM 45) FLOATING POINT UNDERFLOW <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: Contact your System Administrator. (SYSTEM 46) INTEGER DIVIDE BY ZERO <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: No action is required: this is a warning message. (SYSTEM 47) FLOATING POINT DIVIDE BY ZERO: <name> Probable Cause: A packed decimal overflow has occurred for the given field during a computational process. What to Do: No action is required: this is a warning message. 336 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 48) INTERNAL-TO-ASCII FORMAT CONVERSION FOR FIELD: <name> Probable Cause: The format of a field read from a file does not match the format specified when the procedure was created. For example: a field may have been defined as type Z+ in the Dictionary, but negative zoned decimal values were found in the file. What to Do: Recreate the procedure with the proper field definitions. This may imply revisions of the Dictionary definitions. (SYSTEM 49) ASCII-TO-EBCDIC TRANSLATION Probable Cause: CTRANSLATE system intrinsic error. What to Do: Contact your System Administrator. (SYSTEM 50) INVALID ARITHMETIC FORMAT: <name> Probable Cause: An invalid value format has been found for the given field. This may be caused by a data error or the incorrect field mapping of the data record. What to Do: Correct the input file data or definition. (SYSTEM 51) TABLE ENTRIES OVERFLOW Probable Cause: The table buffer, which holds all fields specified in the “working set” for a procedure, has too many entries. What to Do: Request that your system manager increase the “Maximum Number of Table Entries”. (SYSTEM 52) TABLE BUFFER OVERFLOW Probable Cause: The table buffer, which holds all fields specified in the “working set” for a procedure, has overflowed. What to Do: Request that your System Administrator increase the “Maximum Table Buffer Size”. (SYSTEM 53) PCODE BUFFER OVERFLOW Probable Cause: The pcode buffer, which holds the transaction logic of a procedure, has overflowed. What to Do: Request that your System Administrator increase the “Maximum Pcode Buffer Size”. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 337 System errors MBF-UDALink (SYSTEM 54) INVALID COMMAND: <command> Probable Cause: You are in an internal test mode and have entered an incorrect command. What to Do: Contact your System Administrator or MBFoster Technical Support if this mode has been made available to your copy of MBF-UDALink. (SYSTEM 55) TERMINAL STATUS TIMEOUT Probable Cause: Your HP terminal has a hardware or software fault, or your HP terminal emulator program is not properly transmitting a reply to a status request, or the timeout in MBFMAINT has been set too low. What to Do: Request that your System Administrator use MBFMAINT to increase the “Terminal Status Timeout”. If using a terminal emulator program try running without XON/XOFF. If the error persists contact your System Administrator. (SYSTEM 56) INVALID DOWNLOAD STATUS RESPONSE: <error code> Probable Cause: Your HP terminal has a hardware or software fault, or your HP terminal emulator program is not transmitting a valid reply (“error code”) to a status request. What to Do: Contact your System Administrator. (SYSTEM 57) DOWNLOAD WRITE: <error message> Probable Cause: This occurs only when downloading to a terminal emulator that can automatically store the file to a disk. The error is caused by a failure of the emulator to return a successful completion code to MBF-UDALink and a timeout has occurred. This may happen for several reasons. If this happened on the first record sent (causing the terminal emulator to prompt for the name of the local file to open), you may have exceeded the time interval while entering the file name. Or the emulator may have been unable to reply to the request because (a) some error in the emulator occurred while writing to the local file, or (b) the DC1 trigger for the completion code may have been lost during transmission. The terminal emulator may have replied that the saving of the data was unsuccessful: this will usually be preceded by a local error message generated by the terminal emulator. Reasons for this include (a) attempting to write to a write-protected file or disk, (b) a file or disk that is full, or (c) the target disk is not properly online. What to Do: Redo the download. If the probable cause was a timeout on receiving the first record, try opening the file before indicating that you are ready to receive the data. If this error persists contact your System Administrator. 338 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 68) CATALOG IS FULL Probable Cause: Too many entries have been saved into the catalog currently being accessed. What to Do: Request that your System Administrator remove any deleted entries from the catalog (compact the catalog) or increase the “Maximum Catalog Size”. (SYSTEM 69) OUTPUT BUFFER OVERFLOW Probable Cause: The output buffer, which holds the output file record, has overflowed. What to Do: If the procedure cannot be created using a smaller output record, request that your System Administrator increase the “Maximum Output Buffer Size”. ((SYSTEM 71) NO USER PROFILE CATALOG EXISTS Probable Cause: User profiles have been enabled in the system parameters and no user profiles have been created for the account you are logged on to. What to Do: Contact your System Administrator to create a user profile for your user ID. (SYSTEM 72) USER CATALOG, <error message> Probable Cause: File system error in accessing the user profile catalog DX0UCAT. What to Do: Contact your System Administrator. (SYSTEM 73) RELEASE FILE COMMAND FAILED: <number> Probable Cause: System error in issuing a “release” command for a catalog. What to Do: Contact your System Administrator. (SYSTEM 74) INVALID COMMAND IN DXIN FILE: <command> Probable Cause: Invalid command record using tutorial/demo mode. What to Do: Correct the DXIN file. (SYSTEM 75) READ ERROR ON DXIN FILE Probable Cause: File system error in reading from a DXIN (input) file. What to Do: Contact your System Administrator. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 339 System errors MBF-UDALink (SYSTEM 76) FORCED TERMINATION: BAD DATA RECORD IN DXIN FILE Probable Cause: Error encountered during a batch mode run. What to Do: Correct the DXIN file. (SYSTEM 77) USER PROFILE ALREADY EXISTS IN CATALOG Probable Cause: You are attempting to create a user profile for a user for whom a user profile has already been created. What to Do: If needed, use “Change an existing user profile” to customize the existing user profile. (SYSTEM 79) USER DOES NOT HAVE ACCESS CAPABILITY TO THIS PROGRAM Probable Cause: You are attempting to run a MBF-UDALink program for which access permission must be granted in your user profile. What to Do: Request your System Administrator to grant access if appropriate. (SYSTEM 80) MAINTENANCE CATALOG, <error message> Probable Cause: File System error in accessing the maintenance message catalog. What to Do: Contact your System Administrator. (SYSTEM 85) NO ACCESSIBLE DATA SETS IN THIS DATA BASE Probable Cause: Inappropriate data base password has been used for accessing an Eloquence root file. What to Do: Enter a password that allows read access to all data sets required for this procedure. (SYSTEM 86) NO ACCESSIBLE DATA FIELDS IN THIS DATA SET Probable Cause: Inappropriate data base password has been used for accessing an IMAGE root file. What to Do: Enter a password that allows read access to all data fields required for this procedure. (SYSTEM 89) PROCEDURE ACCESSES MORE FILES THAN USER IS PERMITTED Probable Cause: A procedure has been selected that exceeds user capabilities. What to Do: Contact your System Administrator for changes to your access capabilities. 340 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 90) INVALID SD LABEL VERSION Probable Cause: Incompatible SD file version or file system error. What to Do: Contact your System Administrator (SYSTEM 91) PROCEDURE NAME OWNED BY ANOTHER USER (custom feature message) Probable Cause: User is not permitted functional access to this procedure because it was created by another user. What to Do: Contact your System Administrator or the creator of the procedure. (SYSTEM 92) PROCEDURE NOT ACCESSIBLE BY USER (custom feature message) Probable Cause: User is not permitted to run this procedure. What to Do: Contact your System Administrator. (SYSTEM 93) USER DOES NOT HAVE VALID CLASS TO RUN PROGRAM (custom feature message) Probable Cause: User needs class 0, 1, 2 or 3 to run MBFMAINT program. What to Do: Contact your System Administrator. (SYSTEM 94) CANNOT ACCESS A PROFILE WITH HIGHER OR EQUAL CLASS (custom feature message) Probable Cause: You have tried to access a user profile on the same, or a higher level than your own; you may only access User Profiles that are on a lower level. What to Do: Contact your System Administrator. (SYSTEM 95) MISSING PROFILE FOR CLASS: <number> (custom feature message) Probable Cause: No user profile has been defined for the specified class. What to Do: Contact your System Administrator if necessary. (SYSTEM 96) PROFILE NOT ACCESSIBLE BY USER (custom feature message) Probable Cause: You do not own the user profile you specified. What to Do: Contact your System Administrator. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 341 System errors MBF-UDALink (SYSTEM 97) INCOMPATIBLE MESSAGE CATALOG VERSION: <number> Probable Cause: Message catalog has not yet been upgraded by the MBFMERGE utility that is supplied with each new release. What to Do: Contact your System Administrator and have the MBFMERGE program run. (SYSTEM 98) INCOMPATIBLE USER PROFILE VERSION: <number> Probable Cause: User profile catalog has not yet been upgraded by the MBFMERGE utility that is supplied with each new release. What to Do: Contact your System Administrator and have the MBFMERGE program run. (SYSTEM 99) CATALOG SAVED AS SESSION TEMPORARY FILE: <name> Probable Cause: System error occurred during a catalog update operation and the new catalog could only be saved as a temporary file under the specified name. What to Do: Contact your System Administrator immediately and DO NOTHING until this problem is handled. If the catalog file is not saved into the permanent domain before you log off, the catalog will be lost. Correct the problem indicated by the previous error message but DO NOT SIGN OFF this account. Issue the following commands: SAVE <name> The System Administrator should then copy this file into the group and account where the MBFUDALink programs and catalog normally reside. The System Administrator must then issue the following command: RELEASE <name>/{lockword} (SYSTEM 100) CATALOG FILE IS FULL Probable Cause: A catalog has overflowed during the saving of an entry, and an automatic file expansion process could not be invoked. What to Do: Contact your System Administrator to compact the catalog using MBFMAINT. 342 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 101) SPECIFIED FORMAT IS NOT INSTALLED Probable Cause: You are trying to run a procedure with an output file format not supported in this version of MBF-UDALink. What to Do: Contact MBFoster Technical Support about the required version. (SYSTEM 105) ACTIVE CATALOG COUNT EXCEEDS MAXIMUM: <number> Probable Cause: Attempt to compact a catalog where the remaining entry count exceeds maximum specified (the maximum has likely been recently reduced). What to Do: Use MBFMAINT to increase the maximum value for entries in given catalog type. (SYSTEM 106) MISSING COMPLETION CODE - CHECK REFLECTION CONFIGURATION Probable Cause: MBF-UDALink has not received a “success” completion code on the last operation with the terminal emulator. What to Do: Check the configuration and operation of the terminal emulator. (SYSTEM 107) CATALOG ENTRY IS IN MAINTENANCE BUSY MODE Probable Cause: Attempt to access or update an entry that is currently being changed or audited. What to Do: Try again later or contact the System Administrator. (SYSTEM 108) ARITHMETIC OVERFLOW: <name> Probable Cause: Arithmetic overflow occurred for the given field during a computation. What to Do: Change the definition to allow larger numbers or correct the input value(s). (SYSTEM 109) ARITHMETIC NEGATIVE VALUE: <name> Probable Cause: Attempt to assign a negative value to a field defined as having positive values only. What to Do: Change the field definition or correct the input value(s). (SYSTEM 110) EXTERNAL PRINTER OPERATION FAILED: <code> Probable Cause: A system or terminal printer returned an error condition of “code”. If code is an “E” then this is followed by a system file error number (fser) MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 343 System errors MBF-UDALink What to Do: Check the printer and, if necessary, contact the System Administrator. (SYSTEM 111) JOB FAILED: <error message> Probable Cause: An interactive batch job could not be launched by MBF-UDALink. What to Do: Check the batch stream status and, if necessary, contact the System Administrator. (SYSTEM 112) FD FILE: <error message> Probable Cause: File system error in accessing an FD file. What to Do: Contact the System Administrator. (SYSTEM 113) INVALID CATALOG FILE CODE Probable Cause: Catalog file being accessed is not a valid catalog file type. What to Do: Contact the System Administrator. (SYSTEM 115) CREATE FILE TRANSFER PROCESS FAILED: ERROR = <number> Probable Cause: The CREATEPROCESS intrinsic returned the given error number and could not create the file transfer process. What to Do: Consult the error descriptions under the CREATEPROCESS intrinsic in the appropriate HP manual. (SYSTEM 116) FORCED TERMINATION: INPUT ERROR IN BATCH MODE Probable Cause: An error occurred on one of the input commands to a batch run. What to Do: Check the job stream file (or DXIN input file, if used). (SYSTEM 117) A CATALOG MUST BE CREATED BY THE MBF-UDALink SYSTEM MANAGER Probable Cause: The MBF-UDALink catalog must be created by the System Administrator (automatic creation is not possible). What to Do: Contact the System Administrator and request that the particular catalog be created. 344 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 118) CATALOG MUST BE COMPACTED BY THE MBF-UDALink SYSTEM MANAGER Probable Cause: The catalog being accessed is full and must be compacted by the System Administrator before any more entries can be saved. What to Do: Contact your System Administrator and request that the particular catalog be compacted with MBFMAINT. (SYSTEM 119) CATALOG SAVED AS FILE: <name> Probable Cause: A system file error has occurred and the existing catalog has been saved under the name shown. What to Do: Rename the file to the correct catalog name. (SYSTEM 120) USER SECURITY BUFFER OVERFLOW Probable Cause: User security expression for a given field exceeds buffer space available. What to Do: Correct the expression and/or contact MBFoster Technical Support. (SYSTEM 121) SECURED FIELD ALREADY EXISTS FOR THIS USER Probable Cause: A security definition already exists for this user’s access to this field. What to Do: Delete the existing definition, if appropriate. (SYSTEM 122) SECURED FIELD NOT FOUND FOR THIS USER Probable Cause: No security definition currently exists for this user’s access to this field. What to Do: Enter a correct field or user name. (SYSTEM 123) DXMSGIN FILE, <error message> Probable Cause: File system error occurred in using an input message file. What to Do: Contact your System Administrator. (SYSTEM 124) DXMSGOUT FILE, <error message> Probable Cause: File system error occurred in using an output message file. What to Do: Contact your System Administrator MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 345 System errors MBF-UDALink (SYSTEM 125) CREATE SPOOL PROCESS FAILED, ERROR= <number> Probable Cause: The CREATEPROCESS intrinsic returned the given error number and could not create a SPOOK process. What to Do: Consult the error descriptions under the CREATEPROCESS intrinsic in the appropriate HP manual. (SYSTEM 126) ‘DX0NEWS’ NEWS FILE NOT FOUND Probable Cause: The DX0NEWS file could not be opened. What to Do: Restore the DX0NEWS file from the MBF-UDALink installation tape. (SYSTEM 128) PAGE FORMAT BUFFER OVERFLOW Probable Cause: Too many characters have been put on a report page. What to Do: Reduce the page character width or the number of lines per page. (SYSTEM 136) FORCED TERMINATION: FATAL ERROR OCCURRED Probable Cause: An unrecoverable error has been encountered. What to Do: See the previous error message for your session. (SYSTEM 138) PROFILE NOT FOUND FOR YOUR USER NAME Probable Cause: A profile does not exist for your user name or for a valid default name. What to Do: Contact your System Administrator. (SYSTEM 139) CANNOT DELETE, USER CLASS HAS ATTACHED PROFILES= <number> Probable Cause: “number” of user profiles are attached to this user class What to Do: Delete all the user profiles in order to delete the user class. (SYSTEM 140) SORT INPUT Probable Cause: An error occurred during the sort file preparation. What to Do: Contact your System Administrator. 346 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 141) NO ACCESSIBLE KEY FIELD EXISTS IN DATA SET: <name> Probable Cause: No key field can be found for the given data set during file linkage. What to Do: Contact your System Administrator. (SYSTEM 142) PROFILE NOT FOUND FOR YOUR PROCESS USER NAME Probable Cause: A profile does not exist for the user name supplied in the ‘INFO’ parameter of the RUN statement. What to Do: Contact your System Administrator. (SYSTEM 143) DOWNLOAD STATUS READ: <error message> Probable Cause: File system error during file transfer to a PC. What to Do: Contact your System Administrator. (SYSTEM 146) SQL, message Probable Cause: File system error in accessing an SQL database or table. What to Do: Contact your System Administrator. (SYSTEM 147) Allbase/SQL INTERFACE IS NOT ACTIVE Probable Cause: The SQL server did not respond to an access request. What to Do: Contact your System Administrator. (SYSTEM 148) NO DATA FIELDS ARE DEFINED IN SQL DBE: <name> Probable Cause: No table columns have yet been defined in this SQL database environment. What to Do: Contact your System Administrator. (SYSTEM 149) NO ACCESSIBLE TABLES IN THIS DATABASE ENVIRONMENT Probable Cause: You have not been granted the authority to access any tables in this SQL database environment. What to Do: Contact your System Administrator. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 347 System errors MBF-UDALink (SYSTEM 150) NO ACCESSIBLE DATA FIELDS (COLUMNS) IN THIS TABLE Probable Cause: You have not been granted the authority to access any columns in this SQL table. What to Do: Contact your System Administrator. (SYSTEM 151) Allbase/SQL INTERFACE IS NOT INSTALLED Probable Cause: A procedure has requested access to an SQL table and the SQL interface has not been installed in your version of MBF-UDALink. What to Do: Contact your System Administrator. (SYSTEM 152) MENU ADDRESS TABLE OVERFLOW Probable Cause: The menu address table, used in displaying files defined in an HP Dictionary, has overflowed. What to Do: Contact your System Administrator. (SYSTEM 153) AUTO PASSWORD FAILED Probable Cause: Generation of passwords for a batch job submission has failed. What to Do: Enter them manually or contact your System Administrator. (SYSTEM 154) DICTIONARY INFORMATION FOR FILE NOT AVAILABLE Probable Cause: A dictionary source for the given file cannot be found — modification of this file in the procedure or dataview cannot be permitted. What to Do: If available, enter the name of the dictionary source file during the modify, save the entry in a catalog and then enter modify again. (SYSTEM 155) THIS PROGRAM REQUIRES Microsoft Windows Probable Cause: You are trying to use the MBF-UDALink server as a program. What to Do: Contact your System Administrator. 348 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 156) FILE NOT FOUND IN DICTIONARY: <name> Probable Cause: In accessing a dictionary during the modification of a procedure or dataview, a file definition is no longer present in the dictionary. What to Do: Contact your System Administrator to find if the file definition has been moved to another dictionary or needs to be re-entered in this dictionary. (SYSTEM 157) USER NOT AUTHORIZED TO ACCESS USER CLASS NAMES Probable Cause: You cannot access a user class ($name) profile from your logon account. What to Do: You must run MBFMAINT from the account in which it resides in order to access a user class profile. (SYSTEM 158) SYNTAX NOT SUPPORTED IN THIS PRODUCT EDITION Probable Cause: You are trying to use a feature or option that is not available in your version of MBF-UDALink. What to Do: Enter the correct syntax for your version. (SYSTEM 159) DUPLICATE PHYSICAL FILE NAME FOUND IN DICTIONARY: <name> Probable Cause: In accessing a dictionary during modification of a procedure or dataview, a file could not be verified because of duplicate physical name entries. What to Do: Contact your System Administrator. (SYSTEM 161) TRANSFER FAILED, Reflection ERROR CODE= <number> Probable Cause: A file download has failed and the Reflection terminal emulator has reported an error. What to do: Use the Reflection Reference Manual to look up the meaning of the given error code. (SYSTEM 162) HOST FILE, <error message> Probable Cause: A file system occurred in accessing a host (HP 9000) file for a transfer to or from a PC. What to do: Take action on the given error message or contact your System Administrator. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 349 System errors MBF-UDALink (SYSTEM 163) UPLOAD FILE IS EMPTY Probable Cause: File uploaded from a PC is empty. What to do: Use another PC file or correct the current one. (SYSTEM 164) TEXT OVERFLOW: <fieldname> Probable Cause: Receiving field has overflowed in converting a numeric field into a textual representation using the $TEXT function What to do: make the receiving field larger. (SYSTEM 165) DX0TRAN FILE, <error message> Probable Cause: A file system error occurred in accessing a translation/conversion file. What to do: Take action on the given error message or contact your System Administrator. (SYSTEM 166) MISSING PROCESS FILE: <filename> Probable Cause: Given program does not exist and is required as a process by MBF-UDALink. What to do: Investigate why the program file is not in the same file group as the MBF-UDALink program you are running. It may be in a different group, may not have been correctly installed or may not have been purchased by your company. If you are unsure then contact your System Administrator. (SYSTEM 168) DXREPORT FILE, <message> Probable Cause: File system error during the building of a report SD file. What to do: Contact your System Administrator. ((SYSTEM 171) ACCESS NOT PERMITTED TO DATA BASE: <file name> Probable Cause: You are using an edition of MBF-UDALink that is restricted to certain databases. What to do: Choose a database that is permitted or contact your System Administrator for further information. 350 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors (SYSTEM 174) CANNOT GET EXTRA DATA SEGMENT Probable Cause: MBF-UDALink could not get an extra data segment. What to do: Contact your system manager. (SYSTEM 175) EXTRA DATA SEGMENT DATA TRANSFER Probable Cause: An error was encountered transferring data between data segments. What to do: Contact your system manager. (SYSTEM 176) INVALID CATALOG TYPE SPECIFIED Probable Cause: You have specified an invalid catalog type for processing or conversion. What to do: Check the reference manual for valid catalog type names or codes. (SYSTEM 177) SORT INITIALIZATION: SORTLIB <number>: <error message> Probable Cause: An error has occurred in the sortlib system. What to do: Check the error message for the probable cause. (SYSTEM 178) SQL SERVER NOT FOUND Probable Cause: The SQL Server required for the specified SQL database access cannot be found. What to do: Check with your System Administrator to try and locate or replace the server program file. (SYSTEM 180) PC COMMAND: <text> Probable Cause: The specified PC command generated by MBF-UDALink failed. What to do: Check your PC for possible causes (such as missing command file). (SYSTEM 181) HELP MESSAGES NOT AVAILABLE FOR THIS MENU Probable Cause: This menu does not have any help text available for the numbered items. What to do: Do not ask for help for this menu. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 351 System errors MBF-UDALink (SYSTEM 184) FIELD LIST OVERFLOW Probable cause: Insufficient field table space was specified for this user for procedure CREATE/ MODIFY. What to do: Increase the MAXIMUM NUMBER OF DATA FIELDS for this user with MBFMAINT. (SYSTEM 185) Oracle/SQL interface is not active Probable cause: The SQL server did not respond to an access request. What to do: Contact your System Administrator. (SYSTEM 186) Informix/SQL interface is not active Probable cause: The SQL server did not respond to an access request. What to do: Contact your System Administrator. (SYSTEM 187) Sybase/SQL interface is not active Probable cause: The SQL server did not respond to an access request. What to do: Contact your System Administrator. (SYSTEM 188) Ingres/SQL interface is not active Probable cause: The SQL server did not respond to an access request. What to do: Contact your System Administrator. (SYSTEM 189) SQL DATA BASE CANNOT BE OPENED: <sqlerr> Probable cause: The SQL interface encountered a problem opening the database. What to do: Refer to the error message manual for the SQL database. (SYSTEM 191) DATA SET OR FILE RECORD LENGTH (fd=nn/db=mm) Probable cause: All bytes in an Eloquence data set must be accounted for in a file definition. The password used must have access to all fields in the data set. The value ‘nn’ is the length of the record defined in the FD file. The value ‘mm’ is the actual length of the record in the data base. 352 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink System errors What to do: Correct the FD file and recompile it. Use FILL commands to mask areas of the record that are not required or that are to be inaccessible to users. (SYSTEM 192) GETHEAP PROCESS FAILED Probable Cause: You have run out of virtual memory for the program. What to do: Contact your System Administrator. (SYSTEM 193) SOURCE FILE, <error message> Probable Cause: A file system error occurred while opening or accessing an input file to this utility. What to Do: Verify the correct name for the input (source) file. Otherwise, contact your System Administrator. (SYSTEM 194) INVALID SYNTAX OR CONTENT IN LIBRARY RECORD Probable Cause: The change library contains an invalid entry record. What to Do: Contact your System Administrator. (SYSTEM 195) DXSTREAM FILE, <error message> Probable Cause: A file system error occurred while opening or accessing the stream (batch) file. What to Do: Contact your System Administrator. (SYSTEM 196) DXSTREAM ACCESS MODE CHANGE ERROR=<number> Probable Cause: The access modes for the stream (batch) file could not be changed for the batch management facility. (Unix only) What to Do: Contact your System Administrator and/or look up the error number in the appropriate manual. (SYSTEM 197) BATCH PROCESS FAILED, ERROR=<number> Probable Cause: The batch job could not be launched. (Unix system only) What to Do: Contact your System Administrator and/or look up the error number in the appropriate manual. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 353 System errors MBF-UDALink (SYSTEM 198) VERSION NOT SUPPORTED: <version> Probable Cause: The version of the dictionary or data file is not supported by this version of the program or utility. What to Do: Contact your System Administrator. 354 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Trap errors Trap errors The TRAP error message indicates that an internal error has occurred and that the System Administrator and/or MBFoster Technical Support should be informed. (DXTRAP 1) KEY FIELD NOT FOUND IN LIST (DXTRAP 2) NO PRIMARY ACCESS FILE (DXTRAP 3) INSUFFICIENT STACK FOR WORKSPACE RELOAD (DXTRAP 4) BROKEN WORKSPACE CHAIN (DXTRAP 5) INVALID PROMPT RECORD: <message-number> (DXTRAP 6) FIELD NOT FOUND IN LIST: <name> (DXTRAP 8) PARENT ITEM NOT FOUND IN LIST FOR: <name> (DXTRAP 9) LIST IS EMPTY (DXTRAP 10) FIELD NOT INITIALIZED: <name> (DXTRAP 11) EMPTY FIELD TABLE (DXTRAP 12) INVALID DATA TYPE FOR FIELD: <name> MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 355 Trap errors MBF-UDALink (DXTRAP 13) MATCH FIELD LINK PROCESSING ERROR (DXTRAP 14) ARITHMETIC CONVERSION FOR TABLE LITERAL (DXTRAP 15) SEARCH IN FIELD OR FILE TABLE (DXTRAP 16) FILE BUFFER NOT ON WORD BOUNDARY (DXTRAP 17) COMPUTED FIELD LINK PROCESSING ERROR <number:name> (DXTRAP 18) INVALID CUC INDEX: <number> (DXTRAP 19) REPORT FORMAT IS CORRUPTED AND CANNOT BE USED (DXTRAP 20) not used at present (DXTRAP 21) CATALOG ITEM SELECTION OVERFLOW (DXTRAP 22) FIELD EXTENDS BEYOND DATA BUFFER:<fieldname> (DXTRAP 23) EXCEEDED MAXIMUM PERFORMS (DXTRAP 24) FATAL PROCESSING ERROR : <number> (DXTRAP 25) SORT KEY NOT IN SORT FILE: <name> 356 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Trap errors (DXTRAP 26) PARENT OF SORT KEY NOT IN SORT FILE FOR: <name> (DXTRAP 27) UNIMPLEMENTED CODE/OPERAND ENCOUNTERED (DXTRAP 28) DATA BASE BUFFER NOT ON WORD BOUNDARY (DXTRAP 29) SORT BUFFER NOT ON WORD BOUNDARY (DXTRAP 30) INVALID/MISSING IMAGE KEY (DXTRAP 31) INVALID/MISSING KSAM KEY (DXTRAP 32) WORKSPACE UNDERFLOW FOR KEY VALUE (DXTRAP 33) SUB-FIELD EXTENDS BEYOND DATA BUFFER (DXTRAP 34) KEY REGISTER IS EMPTY (DXTRAP 35) ARGUMENT REGISTER OVERFLOW (DXTRAP 36) SUB-FIELD NOT ALLOWED IN LIST: <name> (DXTRAP 37) INVALID RETURN OPERATION (DXTRAP 38) OUT-OF-RANGE PCODE ADDRESS MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 357 Trap errors MBF-UDALink (DXTRAP 39) ARITHMETIC CONVERSION FOR FIELD: <name> (DXTRAP 40) ARITHMETIC TRAP (DXTRAP 41) UNEXPECTED ARITHMETIC (DXTRAP) IN COMPUTATION: <number> (DXTRAP 42) FILE SYSTEM FAILURE - CATALOG HAS BEEN LOST (DXTRAP 43) FILE SYSTEM FAILURE - CATALOG HAS BEEN CORRUPTED (DXTRAP 44) FIELD LIST OVERFLOW (DXTRAP 45) DATE CONVERSION PARAMETER FOR FIELD: <name> (DXTRAP 46) INVALID PAGE FORMAT BUFFER LINE NUMBER: <number> (DXTRAP 50) SYSTEM BOUNDS TRAP (DXTRAP 51) INVALID FIELD REFERENCE NUMBER (DXTRAP 52) INVALID PARENT FIELD REFERENCE FOR FIELD: <fieldname> (DXTRAP 53) FATAL CODE TRAP: <number> (DXTRAP 54) SEARCH IN PDL TABLE 358 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Trap errors (DXTRAP 55) UNEXPECTED CATALOG ERROR: <number> (DXTRAP 56) MISSING SOURCE FILE FOR INPUT FIELD VALUE: <filename> (DXTRAP 57) SQL SERVER FATAL ERROR MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 359 Warning messages MBF-UDALink Warning messages A Warning message is usually just informative and serves as a reminder that a situation has occurred. Where necessary, the appropriate user action is indicated. WARNING: ARITHMETIC TRAP NOT ENABLED, USER REQUEST Probable Cause: You have run the program with PARM=6 to suppress the enabling of arithmetic traps. WARNING: ARITHMETIC TRAP NOT ENABLED, XARITRAP FAILURE Probable Cause: The arithmetic trap has not been enabled by the system. What to Do: Contact your System Administrator, if appropriate. WARNING: AUTOMATIC SUMMARIZATION WILL OCCUR ON ALL NUMERIC FIELDS Probable Cause: You have requested “suppressed details” and have not specified the summary record content for the lowest sort level. What to Do: Specify the summary record content for the lowest level sort field if you do not want all numeric fields summarized (for example, phone numbers and unit prices would not normally be summarized so they would not be included in the summary record). WARNING: CATALOG AUDIT ERROR FOUND, CALL SUPPORT IMMEDIATELY Probable Cause: A non-fatal problem has been found during a catalog audit process. What to Do: Contact your System Administrator. WARNING: CATALOG IS COMPLETELY FULL Probable Cause: The catalog is full and no deleted entries exist to provide compaction space. What to Do: Contact your System Administrator to enlarge the catalog or delete any unnecessary catalog entries. WARNING: CATALOG IS NEARLY FULL Probable Cause: This catalog is almost full. What to Do: Advise your System Administrator. 360 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Warning messages WARNING: CATALOG NEEDS TO BE COMPACTED Probable Cause: The catalog is full. What to Do: Contact your System Administrator to compact the catalog to allow more entries to be made. WARNING: CONTACT YOUR MBF-UDALink SYSTEM MANAGER IMMEDIATELY Probable Cause: A serious or fatal error has occurred. What to Do: Contact your System Administrator immediately. WARNING: CONTROL(Y) NOT ENABLED, XCONTRAP FAILURE Probable Cause: The Control/Y and STOP functions have not been enabled by the system. What to Do: Contact your System Administrator, if appropriate. WARNING: ERROR OCCURRED DURING PROCEDURE EXECUTION Probable Cause: An unrecoverable error occurred during procedure execution. What to Do: Correct the error or contact your System Administrator. WARNING: NO EXTRACT FILE HAS BEEN GENERATED Probable Cause: An error occurred that prevented the extract file from being generated. What to Do: Correct the error or contact your System Administrator. WARNING: NO RECORDS HAVE BEEN SELECTED Probable Cause: No records met the selection criteria or there are no records in the input file(s). What to Do: Enter a different set of selection values, if appropriate. WARNING: PROCEDURE REPORT FORMAT WILL BE UPDATED BY SPECIFICATION CHANGES Probable Cause: You have modified one or more properties of a procedure that affect a report format. What to Do: Verify new output format to be sure it is suitable, or contact your System Administrator. MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 361 Warning messages MBF-UDALink WARNING: THE FOLLOWING COMPUTATIONAL ERRORS HAVE OCCURRED: Probable Cause: Computational errors have occurred during procedure execution and are summarized below this message. What to Do: See if a serious error occurred (for example, a divide by zero can normally be ignored), and take appropriate action. WARNING: USER MAXIMUM FOR DIF FILE COLUMNS IS EXCEEDED Probable Cause: You have exceeded the maximum DIF file columns (fields). What to Do: Change the limit set in the SET configuration menu. WARNING: USER MAXIMUM FOR DIF FILE ROWS HAS BEEN REACHED Probable Cause: You have exceeded the maximum DIF file rows (records). What to Do: Change the limit set in the SET configuration menu. WARNING: USER MAXIMUM FOR FILES ACCESSED IN A PROCEDURE RUN IS EXCEEDED Probable Cause: This procedure accessed more files than permitted. What to Do: Contact your System Administrator to raise the limit. WARNING: USER MAXIMUM FOR OUTPUT FILE RECORDS HAS BEEN REACHED Probable Cause: You have reached the maximum output record count permitted. What to Do: Use the extract file prepared to this point or contact your System Administrator to raise the limit. WARNING: USER MAXIMUM FOR RECORDS READ HAS BEEN REACHED Probable Cause: You have reached the maximum record read count permitted. What to Do: Use the extract file prepared to this point or contact your System Administrator to raise the limit. 362 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Index A Add additional computational fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -99 Adding files for selection - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -87 Adjust Field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -133 Align Field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -132 ALLBASE Detection of keys on Allbase/SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Allbase SQL interface - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -76 ALLBASE/SQL - Unsupported statements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -223 ALLBASE/SQL LongVarBinary items reading or writing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -218 ALLBASE/SQL restrictions on ODBC grammar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -221 ALLBASE/SQL statements replaced by client functions - - - - - - - - - - - - - - - - - - - - - - - - - - -224 Alternate Names For Selection Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -71 Alternate names for selection fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -55 ANSI character set - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -222 AOPTIONS ODBC_IMAGE_OPEN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -272 Application model using the Microsoft Distributed Transaction Coordinator - - - - - - - - - - - - -277 Application program-to-resource manager transaction propagation - - - - - - - - - - - - - - - - - - -280 AutoCommit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -210 Automatic masters in TurboIMAGE not reported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 B Basic Driver Architecture - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -167 BLOBs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 213, 308 Built-in functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -305 C Calculated columns - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -255 Calling applications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -285 Change logon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -233 CHANGE output file format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -103 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 363 MBF-UDALink CHANGE output file specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -102 CHANGE procedure specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -98 Changing the display format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -254 Character expressions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -228 Character set conversion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 CIUPDATE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 Client environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -202 Client requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 Cognos Impromptu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -253 COM Component Builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 com.mbf.jdbc.ssl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -185 Command timeouts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -236 Communication driver - Native - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -236 Communications port - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 232, 237 Complementary products - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12 Computational Expressions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 Computational expressions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -107 Concurrent transactions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -285 Conditional expressions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -111 Connect using SQL API - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -265 Connect using SQLAPI in VB 4.0-6.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -265 Connecting link - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -202 Connecting with ADOs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -271 Connecting with DAOs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -269 Connecting with RDOs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -270 Connection closing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 161, 177 Connection Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -173 optional - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -161 required - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -161 Connection Pooling using - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -181 Connections example with pooling - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -181 example without pooling - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -181 Conversion functions - User-defined - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -228 CONVERSION/MAPPING - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 101, 114 Convert dollar values to words - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -116 Create a Special Output Format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -73 364 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Create a special output format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -57 Creating a DBEnvironment on the HP 9000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -225 Creating a procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -43 Creating computational fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -112 Creating group headers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -149 Creating joins using calculated columns - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -255 Creating procedures from SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -75 Critical Item Update - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 Customizable system profile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 D Data replication for decision support - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -283 Data Sources calling - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -180 connecting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -179 Data sources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -231 properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -182 Data types - Notes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 212, 308 Data Types - ODBC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -308 Data types - ODBC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -212 Data types supported By ODBC Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -307 Data types supported by ODBC Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -211 Databases supported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 Date formatting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -305 Date support - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 Debug logging on client - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -239 Debug logging on host - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -239 Default PD file directory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 Defining Computational Fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -63 Delete an existing procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -88 DELETE Existing Procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -105 Designing a report - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -118 DIF FILE QUOTATION MARK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -25 Display format - Change - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -254 Display formats - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -143 DISPLAY Procedure Catalog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -32 Distributed transaction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -283 Downloading the output file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -39 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 365 MBF-UDALink Driver - Supported data types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -307 Driver - Supported functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -205 Dynaset variables - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -263 E Edit field definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -87 Edit mask - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -304 Edit masks - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -140 EDIT names and attributes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -94 Edit Names/Locations Of Data Bases And Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -72 Edit names/locations of databases and files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -55 Editing Field Definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -62 EJB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -169 Embedded SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -224 Enter Designer mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -119 ENTER file definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -81 Entering field definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -82 Environment Variable ODBC_AOPTIONS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -272 ODBC_CONCATENATE_SUBFIELDS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 ODBC_DEBUG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 ODBC_IMAGE_OPEN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -272 ODBC_SHOW_AUTOMATIC_MASTERS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 environment variables - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -175 Error - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -311 Error messages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -311 European Currency Symbol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -215 EUROPEAN DECIMAL FORMAT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -25 Executing a Query - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -177 Explicit transactions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -284 Extended features of ODBC Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 F Field edit keys - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -151 FIELD names and definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -96 Field storage length - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -303 Field types supported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -204 366 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink FILE definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -81 Format parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -24 Fully supported SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 Function keys - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -18 G Global format specifications - Enter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -122 Group Edit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -134 H Host server name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -232 HostConf password - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -237 HostConf user ID - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -237 HP 9000 server requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 HP Eloquence - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 HP Eloquence character fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 HP Eloquence Details - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 HP Eloquence subfielded fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 I Implementation Notes Multiple connections - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -219 TurboIMAGE character fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Implicit transactions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -284 Impromptu - Special notes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -254 Input Specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 Installation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -172 IP address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -232 Isolation levels - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -214 J J2EE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -168 Java environment variables - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -158 Java Requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 157, 172 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 367 MBF-UDALink Java Socket Extension (JSSE) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -183 JDBC 2 extensions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -171 JDBC driver architecture - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -155 JDBC Level 2 Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 JDBC1 Connection opening - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -159 JDBC1 driver loading - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -159 JDBC1 Driver - Using - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -155 JDBC1 Installation and Setup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -157 JDBC1 Samples - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -163 JDBC2 Background - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -167 JDBCLink-UX examples - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -187 transaction support - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -191 JNDI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -170 Joins - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -254 Joins - Requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -228 JTS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -170 Justification - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -138 L Limitations of MS-DTC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -284 Linking Files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -69 Lotus Approach - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -256 M MAINTAIN an existing procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -88 Maximum number of statements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -218 Maximum statements per connection - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -235 MBF-UDALink Overview - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 MBF-UDALink Product Features - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 Menu parts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -14 Menu types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -15 Microsoft Access - Notes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -259 Microsoft Access - Using - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -258 Modem Init string - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -237 368 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink Modify procedure definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -88 MODIFY procedure definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -92 Move Field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -132 MS-Query - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -261 Multiple connections - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -219 Multiple line formats - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -145 N Naming Service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -169 Native communication driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -236 Navigational commands - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -27 Networks supported - Client - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 Networks supported - Server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 New SQLGetInfo types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -219 Numeric functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -306 O ODBC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -201 ODBC - Calling functions programmatically - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -264 ODBC 3.5 Compliant Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 ODBC compliancy level - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -201 ODBC Driver overview - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -201 ODBC Driver - Extended features - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 ODBC Driver - Using with ODBC applications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -241 ODBC Driver client configuration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -231 ODBC Driver requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 ODBC transactions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -273 ODBC Translator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -215 Online help - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 Opening a Connection - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -176 Operating systems required - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 Operating systems supported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 Optional Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -173 Output file characteristics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -25 Output specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -86 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 369 MBF-UDALink P Packages importing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -179 Page parts and multiple line formats - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -145 Partially supported SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 PC DRIVE - Default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 PC FILE DOWNLOAD DELAY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 PC FILE TERMINATION CODE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 PC interchange parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 Percent and ratio operators - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -109 Performance considerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -209 Platform required - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 Port number on host - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -233 Port speed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -237 PowerHouse interface for MPE-IX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -11 Primary key name returned by SQLStatistics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 Procedure Catalog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -33 PROCEDURE PREPARATION PHASE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 54, 71 Profiles - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 Prompts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -17 Propagating MS-DTC transactions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -284 Q query executing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -160 R Remote procedure calls - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 ReportDesigner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -11 ReportDesigner option - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -117 Reporter - Using - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -13 Resource manager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -281 Result Set closing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 160, 177 processing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 160, 177 returning - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -177 370 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink REVIEW procedure definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -89 Review procedure definitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -88 Review reports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -28 Role of the Microsoft Distributed Transaction Coordinator - - - - - - - - - - - - - - - - - - - - - - - - - -277 RPC pool contraction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -290 RPC server configuration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -289 RPC server pool - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -289 RPC server pool expansion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -290 Runtime decision on output file format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -37 S Saving a modified procedure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -103 Saving the file definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -84 Saving the output file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -41 Secure Socket Layer (SSL) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 Sending a file to the host - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -218 Server environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -202 Setup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -172 Socket ID - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -233 Software provided - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -203 Sort timeouts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -236 Specify Output File Format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -73 Specify output file format - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -57 SQL - Fully supported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 SQL - Partially supported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 SQL - Unsupported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -227 SQL commands supported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -204 SQL interface - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -11 SQL interfaces - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -75 SQLGetDataCol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 SQLPutData - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 SQLSetCursorName - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -220 SSL mode connections using - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -183 Statement object creating - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -159 String functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -306 Substring and subfield manipulation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -110 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 371 MBF-UDALink Supported SQL syntax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -226 System errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -330 T TERMINAL EMULATOR - Default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 The application programmer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -278 The Microsoft Distributed Transaction Coordinator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -276 Timeouts - Sort - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -236 Timeouts command - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -236 Transaction abort - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -284 Transaction ACID rules - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -273 Transaction commit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -283 Transaction coordination - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -285 Transaction manager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -281 Transactions control - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -191 example - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -197 handling - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -191 interface support - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -194 tech tips - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -192 Translator - Roman9 to PC-ANSI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -215 Trap errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -355 TurboIMAGE character fields - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 216, 217 TurboIMAGE locking strategy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 TurboIMAGE query - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Two-Phase Commit Protocol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -276 Two-phase Commit Protocol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 Two-tier programming model - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -277 U UDALink3.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -288 Unsupported data types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217 Unsupported SQL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -227 Updating data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -241 Updating search and sort items - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 URL Syntax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 162, 174 User - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -311 372 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 MBF-UDALink User ID - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -237 Using a connection URL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -176 Using Cognos Impromptu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -253 Using Lotus Approach - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -256 Using MS-Query - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -261 Using ODBC Driver with ODBC applications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -241 Using Reporter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -13 Using stored procedures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -210 Using the JDBC1 driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -158 Using Visual Basic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -263 V Viewing the SQL generated by Impromptu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -254 Views - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 Visual Basic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -263 Visual Basic database controls - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -263 W Warning messages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -360 What is a JavaBean? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -168 What is JDBC? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -155 What is JDBCLink-UX? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -167 What is Reporter? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -13 What is the JDBC1 Driver? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -155 Y Year 2000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -216 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004 373 MBF-UDALink 374 MBF-UDALink User Reference (Unix) ©M.B. Foster Associates Limited 1995-2004