HP c-tree-SQL ISQL and Tools manual Data File Formats, Data Load Utility dbload

Page 73

Data Load Utility: dbload

-l logfile

Specifies the file into which the error logging is done. stderr is the default. dbload also writes statistics to the file:

Number of records read

Number of records skipped

Number of records loaded

Number of records rejected

-b badfile

The file into which the bad rows that were not loaded, are written. By default badfile is put in the current directory.

-c commit_frequency

Store the specified number of records before committing the transaction. The default frequency is 100 records.

-e maxerrs

The maximum number of tolerable errors. The default number is 50 errors.

-s skipcount

Skip the specified number of rows in the first data file. If multiple files are specified, the rows are skipped only in the first file. The default number is zero rows.

-m maxrows

Stop storing rows at the specified number.

-n

Parse the commands file and display errors, if any, without doing the database load. If the pars- ing is successful a message, No errors in the commands file. displays on stdout.

database

Name of the database.

4.4DATA FILE FORMATS

Data files must be in one of the following record formats:

Variable length records

Fixed length records

For both these types of records an optional field delimiter and an optional record delimiter can be specified. The field delimiter, when specified, should be a single character. By default, comma is the field delimiter. The record delimiter can be specified in the commands file and it can be more than one character. By default, the newline character, \n, is the record delimiter.

FairCom Corporation

4-3

Image 73
Contents For use with c-treeSQL Server Isql and Tools Reference GuidePage Table of Contents Data Load Utility dbload Iii Tutorial Source CodeFairCom Corporation Documentation Overview Syntax Diagram ConventionsPurpose of this Manual AudienceIsql and Tools Related DocumentationOverview IntroductionIsql and Tools FairCom Corporation Introductory Tutorial Quick TourInit IsqlManage DefineIsql Create Table Custmast Isql Commit Work CustmastComplete Introductory Tutorial Code DoneQuick Tour ISQLTutorial2.sql Relational Model and Indexing TutorialQuick Tour Values Insert Into Insert IntoValues QTY Price Commit WorkComplete Relational Model and Indexing Tutorial Source Code ISQLTutorial3.sql Locking Tutorial@ISQL @iSQLTutorial3.sql Isql Delete from Custmast Complete Locking Tutorial Source Code ISQLTutorial4.sql Transaction Processing TutorialTransaction Rollback Work Complete Transaction Processing Tutorial Source Code Starting Interactive SQL Isql StatementsSyntax ArgumentsStatement History Support PasswordUsername ConnectstringIsql Statements Formatting Output of Isql QueriesIsql Statements for Statement History Support Statement SummaryDisplay Isql Statements for Query Formatting SummaryCustomername Customercity Orderid Ordervalue Example 3-1 Unformatted Query Display from IsqlExample 3-2 Controlling Display Width of Character Columns Formatting Column Display with the Column StatementOrdervalue Example 3-3 Customizing Format of Numeric Column DisplaysCustomername Customercity Example 3-4 Specifying Column Breaks and Values with Display Numorders Customername Example 3-6 Specifying a Query Header and Footer with Title Transaction Support Help and Table Statements1 @ Execute Syntax Isql ReferenceDescription ExampleBreakspec Break SyntaxSkip n ExamplesCustomername History Clear SyntaxColumn Syntax ArgumentOption Break Column Compute Display TitleFormat formatstring ColumnnameHeading headingtext Character Description Date-Time Format Strings for the Column StatementNot Null INT Null ? Type Length ColnameChar Amount OrderinfoSysdate Column Title FLDNEW Title ComputeVariablename AVG MAX MIN SUM CountValue Define SyntaxDisplayvalue ColpositionCOL columnnumber @columnnameEdit Syntax Related Statements Exit or Quit SyntaxExit Isql GET query.sql 10 GET SyntaxIsql RUN Help Syntax Help CommandsclausesHistory Syntax Orderstate LotlocationFollowing example illustrates usage of the History statement Host or SH or Syntax HostcommandFrom List Syntax 16 RUN Syntax Quit or Exit SyntaxQuit Isql History18 SET Syntax Save SyntaxPagesize LinesizePagesize numberlines Transaction Isolation Level isolationlevel Connection databasename DefaultIsql Break on Isql Select TBL from Systables TBL TBLShow Syntax Spool Syntax Is Default ?Filename on Database ConnectionsArgument … Start SyntaxIsql Spool STK on Isql Spool OFFNot Null Varchar Null ? Type Length Colname Not Null INTType Length Colname Null ? TablenameDate Left Center Right COL n Title SyntaxText DoubleIsql Clear Title Isql and Tools FairCom Corporation Introduction Data Load Utility dbloadCommandsfile Dbload Command Line SyntaxPrerequisites for Dbload OptionsData Load Utility dbload Data File FormatsVariable Length Records Commands FileFixed Length Records Next RecordChar Short Long Float Double Define Record StatementNull For Each StatementExamples Example 4-1 Sample dbload commands filesRecord name redefined Compilation ErrorsPosition not specified for fixed length record Fatal Errors Isql and Tools FairCom Corporation Prerequisites for Dbdump Data Unload Utility dbdumpDbdump Command Line Syntax Short Long Float Double Data Unload Utility dbdumpFor Record Statement Define Record custrec of Fixed Length 37 AS Isql and Tools FairCom Corporation Schema Export Utility dbschema Outfile Username.procedurenameUsername.tablename Username.triggernameDbschema Schema Export Utility dbschemaImport Begin ENDIsql and Tools FairCom Corporation Commit Work Select * from Custmast Delete from Custmast Tutorial Source CodeMoney IntegerVARCHAR6 Commit Work Delete from Custmast Tutorial Source CodeImdesc VARCHAR48 Select * from orderlist Select * from orderitems Isql and Tools FairCom Corporation Index-i SymbolsIndex-ii FairCom Corporation IsqlIndex-iii FairCom Corporation Index