void ddlCommand( CONTROL *ctl, char *ArgList);
Performs the command as described below.
Values returned in the Control Structure are the values returned by the specific command. |
1.0 ddlCommand() Commands that correspond directly to TB API Functions 1.1 ATTACH Syntax: ATTACH <DB-path-name> <table-name-1> [ AS <table-alias-1>] ... Description: ATTACH one or more tables from an externam database Reference: ddlAttach() 1.2 CALC Syntax: CALC %numeric-var = <numeric-expression> Description: Evaluate a numeric expression Reference: ddlCalc() 1.3 CHANGE Syntax: CHANGE <cx> <table-name> <field-name-1> = <value-1> [<field-name-2> = <value-2> ...] Description: Modify records in a table Reference: ddlChange() 1.4 CLEAR Syntax: CLEAR <cx-name> [<table-name>] Description: Clear a collection Reference: ddlClear() 1.5 CLOSE Syntax: CLOSE <no-arg> Description: If data base is open, close it. Reference: ddlClose() 1.6 COMPILERDMEM Syntax: COMPILERDMEM <RD-Name> <Image> Description: Create an RD from a symbolic memory image Reference: ddlCompileRdMem() Example: COMPILERDMEM/D RdTest "RD RdTest // - String2 X(15) //" 1.7 CONSTRUCT Syntax: CONSTRUCT [<table-name>] [<key-name>] Description: Initial or incremental structure build Reference: ddlConstruct() 1.8 COPYDATA Syntax: COPYDATA <source-cx> <source-table> <dest-cx> <dest-table> Description: Copy data from a table to another or same table Reference: ddlCopyData() 1.9 CREATECALCOBJECT Syntax: CREATECALCOBJECT <Calc-Object-Name> <cx> { <Table-Name> | NULL } <Calc-Object-Definition> Description: Create a Calc Object from a symbolic memory image Reference: ddlCreateCalcObject() 1.10 CREATECOLL Syntax: CREATECOLL <cx-name> [<table1> [<table2> ... [<alias1>=<table1> [<alias2>=<table2> ...]]]] Description: Create a temporary collection Reference: ddlCreateColl() 1.11 CREATETEMPTABLE Syntax: CREATETEMPTABLE <temp-table-handle> <Image> Description: Create a temporary table from a symbolic memory image Reference: ddlCreateTempTable() Example (non TokenMap case): CREATETEMPTABLE/D TT1 "Data Base Name Is TT1 // - TD TT1 100 records TEMP GROW // - Name X(20) //" Example (TokenMap case): CREATETEMPTABLE/D TT1 "Data Base Name Is TT1 // - TD "TT1" AS TT1_I 100 records TEMP GROW // - "TT1"."Name" AS Name_I X(20) //" 1.12 DBDCOMP Syntax: DBDCOMP <DBD-path-name> Description: Create or modify a data base from a symbolic schema Reference: ddlCompileDBD() 1.13 DELETE Syntax: DELETE <cx-name%gt; <table-name> Description: Delete records from a table based on the contents of a collection Reference: ddlDelete() 1.14 DESTRUCT Syntax: DESTRUCT [<table-name>] [<key-name>] Description: Destroy the structure of selected keys Reference: ddlDestruct() 1.15 DESTROYCALCOBJECT Syntax: DESTROYCALCOBJECT <Calc-Object-Name> Description: Destroy a Calc Object created by a previous CREATECALCOBJECT Reference: ddlDestroyCalcObject() 1.16 DESTROYCOLL Syntax: DESTROYCOLL <cx-name> Description: Destroy a collection created by a previous CREATECOLL Reference: ddlDestroyColl() 1.17 DESTROYRDMEM Syntax: DESTROYRDMEM <RD-Name> Description: Destroy an RD created by a previous COMPILERDMEM Reference: ddlDestroyRdMem() 1.18 DESTROYTEMPTABLE Syntax: DESTROYTEMPTABLE <temp-table-handle> Description: Destroy a Temp Table created by a previous CREATETEMPTABLE Reference: ddlDestroyTempTable() 1.19 DETACH Syntax: DETACH [<DB-name>] Description: Detach tables from a previous ATTACH Reference: ddlDetach() 1.20 FETCH Syntax: FETCH &cx-name-1> [<table-name-1>] <column-name> TO %<variable-name> ... Description: Read data to variables Reference: ddlFetch() 1.21 FILL Syntax: FILL &cx-name> [<table-name>] Description: Populate a collection with all records of a table Reference: ddlFill() 1.22 FIND Syntax: FIND &cx-name> [<table-name>] <expression> Description: Populate a collection with records that satisy <expression> Reference: ddlFind() 1.23 FINDCALC Syntax: FINDCALC &cx-name> [<table-name>] <expression> Description: Populate a collection with records that satisy <expression> using Calc-Object IF Reference: ddlFindCalc() 1.24 GETCALC Syntax: GETCALC <cx> [<Table-Name>] { <RD-Name> | NULL } <Calc-Object-Name> Description: Perform a Calc Object against each record of a collection Reference: ddlGetCalc() 1.25 INC Syntax: INC { %string-variable | %numeric-variable } Description: For a string variable, if the rightmost character is a digit, increment it by one. For a numeric variable, unconditionally increment it by one. Reference: ddlCalc() 1.26 INFO Syntax: INFO [<table-name>l] [<field-name>] Description: Display meta information about data base items Reference: ddlInfo() 1.27 INVERT Syntax: INVERT [<source-cx>] <key-name> [<dest-cx>] <dest-table-name> <dest-field-name> [{ INCLUDE | EXCLUDE } [NULL] [<value-list>]] Description: Construct a table that corresponds to an index Reference: ddlInvertIndex() 1.28 LOAD Syntax: LOAD <cx> <table-name> <RD-Name> <File-path-name> Description: Import data from an external file to a table Reference: ddlLoad() 1.29 MATCH Syntax: MATCH <cx> <source-table> [THRU] <source-field> [WITH] <target-table> [[ON] <target-field>] Description: Project from one table to another [or same] table Reference: ddlMatch() 1.30 MODE Syntax: MODE [See Reference] Description: Query and/or set internal mode settingss Reference: ddlMode() 1.31 OPEN Syntax: OPEN <DB-path-name> Description: Opens a data base Reference: ddlOpen() 1.32 PICK Syntax: PICK <cx> [<table-name>] { <recno> | <lo-recno>,<hi-recno> } Description: Populate a collection with specific records of a table Reference: ddlPick() 1.33 PICOMP Syntax: PICOMP <AI-path-name> Description: Create or modify an application interface Reference: ddlCompileAI() 1.34 RAZE Syntax: RAZE [<table-name>] Description: Reset the end-of-data pointer for a table. This effectively discards all data in the table. Also, destroy all structures associated with the table. Reference: ddlRaze() 1.35 REDUCE Syntax: REDUCE <cx> [<table-name>] <field-name-1> [<field-name-2> ...] Description: Eliminate duplicate records from the collection. Reference: ddlReduce() 1.36 RELATEX Syntax: RELATEX <cx> [PRESENT BY <field-name-1> [<fild-name-2> ...]] / <table-1> / <table-2> / <join-type-1> / <join-condition-1> [// <table-2> / <table-3> / <join-type-2> / <join-condition-2> ...] Description: Order the records of the source collection according to the specified conditions Reference: ddlRelateEx() 1.37 RETURN Syntax: RETURN <cx> { <table-name> | NULL } <Calc-Object-Definition> Description: Combined CREATECALCOBJECT and GETCALC Reference: ddlReturn() 1.38 RPR Syntax: RPR <cx> [<table-name>] <field-name-1> [<field-name-2> ...] Description: Raw Print - Simple print function Reference: ddlRpr() 1.39 SAVECOLL Syntax: SAVECOLL <cx> <table> #<file-path-name> Description: Save a collection to an external file Reference: ddlSaveColl() 1.40 SET Syntax: SET %string-var = <string-expression> Description: Evaluate a string expression Reference: ddlCalc() 1.41 SHOW Syntax: SHOW <key-name> Description: Display the contents of a structure Reference: ddlShow() 1.42 SORT Syntax: SORT <cx> [<table-name> <field-name-1> [<field-name-2> ...] Description: Order the records of the collection according to the specified conditions Reference: ddlSort() 1.43 STRUCTURE Syntax: STRUCTURE [<key-name>] Description: Initial build or incremental build data structures Reference: ddlStructure() 1.44 SUB Syntax: SUB %string-variable /<from-value-1>/<to-value-1>/ [<from-value-2>/<to-value-2> ...] Description: Perform string substitution in a variable Reference: ddlCalc() 1.45 TALLY Syntax: TALLY <cx-name> [<table-name>] Description: Display a count of the number of records in a collection Reference: ddlTally() 1.46 UNCALC Syntax: UNCALC [<%numeric-variable-1> [<%numeric-variable-2> ...]] Description: Delete all or selected numeric variables Reference: ddlCalc() 1.47 UNLOAD Syntax: UNLOAD <cx> <table-name> <RD-Name> <File-path-name> Description: Export records from a table to an external file Reference: ddlUnload() 1.48 UNSET Syntax: UNSET [<%string-variable-1> [<%string-variable-2> ...]] Description: Delete all or selected string variables Reference: ddlCalc() 1.49 USERS Syntax: USERS Description: Display a list of all connections to this data base Reference: ddlUsers() 1.50 VERIFY Syntax: VERIFY [See Reference] Description: Programattic query of data base meta information Reference: ddlVerify() 1.51 VLIST Syntax: VLIST <no-arg> Description: Display all variables and their contents Reference: ddlCalc() 1.52 WRITE Syntax: WRITE <cx> <table-name> <field-name-1> = <value-1> [<field-name-2> = <value-2> ...] Description: Insert records into a table Reference: ddlWrite() 2.0 ddlCommand() Commands that do not correspond directly to TB API Functions 2.1 POF Syntax: POF <no-arg> Description: Turn off print to file, and close file. Options: NA 2.2 PON Syntax: PON [<file-name>] Description: PON <file-name> - print to file PON <No-Arg> - print to WhamDiag Options: /A - append /T - write to both console and file 2.3 TYPE Syntax: TYPE [<message>] Description: Displays a message Options: /F - suppress leading CR-LF [this is work-around for unwanted leading CR-LF] /L - suppress initial leading blank [this is work-around for unwanted leading blank] 3.0 ddlCommand() Commands for Procedures 3.1 BEGIN ATEND END ATEND Syntax: BEGIN ATEND END ATEND Placement: At end of procedure Description: These two statements bracket a set of statements that are defined as the ATEND clause. The contents of the ATEND clause can be retrieved by the ddlGetExecClause() API, defined as: void ddlGetExecClause( CONTROL *ctl, WtChar8 *buffResultSet, /* destination buffer for RESULTSET clause */ WtInt32 buffResultSetSize, /* size of buffResultSet */ WtChar8 *buffAtend, /* destination buffer for ATEND clause */ WtInt32 buffAtendSize); /* size of buffAtend */ 3.2 BEGIN RESULTSET END RESULTSET Syntax: BEGIN RESULTSET END RESULTSET Placement: At end of procedure Description: These two statements bracket a set of statements that are defined as the RESULTSET clause. The contents of the RESULTSET clause can be retrieved by the ddlGetExecClause() API, defined above. 3.3 END Syntax: END <no-arg> Description: Stop executing commands from the current USE file. If the current procedure was invoked from a lower level procedure, resume executing commands from that procedure. If the current procedure was invoked from the DDTL command line, return to the DDTL command line. 3.4 EXEC Syntax: EXEC <procedure-file-name> [<param-1> [<param-2> ... <param-9>]] Description: Begin executing commands from <procedure-file-name>. At present, %lt;param-N> can be referenced only as {%N} or '{&N}'. Procedures can be nested up to 10 levels. 3.5 IF ELSE ENDIF Syntax: IF <expression> [ELSE] ENDIF Description: Test for a condition. IF's and WHILE's may be nested up to 16 levels (aggregate) within a procedure. Reference: ddlCalc() 3.6 WHILE BREAK ENDWHILE Syntax: WHILE <expression> [BREAK] ENDWHILE Description: Test for a condition. IF's and WHILE's may be nested up to 16 levels (aggregate) within a procedure. Reference: ddlCalc()
Copyright © 2019 , WhamTech, Inc. All rights reserved. This
document is provided for information purposes only and the contents hereof are
subject to change without notice. Names may be
trademarks of their respective owners.