(*) indicates items that are subject to change. (+) New ddlCommand() command (-) Do not publish ddlCommand() in user document (o) Old form; do not publish ddlCommand is user document I. EXEC Command Syntax: ddlCommand(ctl,ArgString) ArgString is: EXEC[ [ ... [ ]]] is the file name containing the procedure; without the path; but with the extension (*); from 1 to 9 optional parameters; blank delimited; [no "s or 's or embedded blanks (*)] Procedures may be nested 10 deep (*); Parameters are dereferenced as %1, %2 ... %9. Parameters cannot be passed recursively (*). II. Limits on TB API internal functions The following TB API CALC Functions are not operable: . _PRLINE() - return printer line number; . _REMAIN() - return number of lines on page; . _STORAGE() - return amount of available storage on a drive; . NURAND() - random number generator; . _RECNO() - record number; . _ABSRECNO() - absolute record number; The following TB API SET functions are not operable: . _TEXT() - memo field control; . _PRSELECT() - name of selected printer; . _METAPHONE() - metaphone function . _PORTER() - porter function; . _SOUNDEX() - soundex function III. Special Clauses There are two clauses that must be given special treatment. A. The RESULTSET Clause contains the commands that are required to build the final Result Set. They are delimited by the statements BEGIN RESULTSET END RESULTSET For example: BEGIN RESULTSET GETCALC ... END RESULTSET The END RESULTSET statement also acts as an END statement to exit the current procedure. [However, if the current procedure is a nested procedure, the lower level procedures do not exit.] The total length of the commands in the RESULTSET Clause is returned in ctl->Ans2 of the initial ddlCommand() EXEC call. The contents of the RESULTSET Clause can be retrieved with the ddlGetExecClause(). B. The ATEND Clause contains the commands that are required to remove unneeded objects after the Result Set is discarded. They are delimited by the statements BEGIN ATEND END ATEND For example: BEGIN ATEND DESTROYTABLE ... END ATEND The END ATEND statement does not act as an END statement to exit the current procedure. If there are multiple ATEND Clauses, the last one encountered is the one that is returned. The total length of the commands in the ATEND Clause is returned in ctl->Ans3 of the initial ddlCommand() EXEC call. The contents of the RESULTSET Clause can be retrieved with the ddlGetExecClause(). C. A new API function, ddlGetExecClause() can be used to retrieve the RESULTSET and/or the ATEND Clauses. The prototype is void ddlGetExecClause( CONTROL *ctl, char *buffResultSet, /* buffer to receive RESULTSET Clause, or NULL */ int buffResultSetSize, /* size of buffResultSet */ char *buffAtend, /* buffer to receive ATEND Clause, or NULL */ int buffAtendSize); /* size of *buffAtend */ ctl->Ans2 contains the size of the RESULTSET Clause (including NULL terminator); ctl->Ans3 contains the size of the ATEND Clause (including NULL terminator); IV. Current List of Commands 1) ATTACH: ddlAttach(ctlp,OptnString,ArgString); 2) BEGIN ATEND (+) Control 3) BEGIN RESULTSET (+) Control 4) BREAK: Control 5) CALC: ddlCalc() + "CALC" 6) CATRD: (-) ddlCatRD(ctlp,OptnString,ArgString); 7) CHANGE: ddlChange(ctlp,OptnString,ArgString); 8) CLEAR: ddlClear(ctlp,OptnString,ArgString); 9) CLOSE: (-) ddlClose(ctlp); 10) COMPILERDMEM: (+) ddlCompileRdMem(ctlp,OptnString,ArgString,NULL); 11) CONSTRUCT: ddlConstruct(ctlp,OptnString,ArgString); 12) COPYDATA: ddlCopyData(ctlp,OptnString,ArgString); 13) CREATEALIAS: (+) ddlCreateFieldAlias(ctlp,OptnString,ArgString); 14) CREATECALCOBJECT: (+) ddlCreateCalcObject(ctlp,OptnString,ArgString,NULL); 15) CREATECOLL: (+) ddlCreateColl(ctlp,OptnString,ArgString); 16) CREATETABLE: (+) DoCreateTempTable(ctlp,OptnString,ArgString); 17) CREATETEMPTABLE: (o) DoCreateTempTable(ctlp,OptnString,ArgString); 18) DBDCOMP: (-) ddlCompileDBD(ctlp,OptnString,ArgString); 19) DELETE: ddlDelete(ctlp,OptnString,ArgString); 20) DESTROYALIAS: (+) ddlDestroyFieldAlias(ctlp,OptnString,ArgString); 21) DESTROYCALCOBJECT: (+) ddlDestroyCalcObject(ctlp,OptnString,ArgString); 22) DESTROYCOLL: (+) ddlDestroyColl(ctlp,OptnString,ArgString); 23) DESTROYRDMEM: (+) ddlDestroyRdMem(ctlp,OptnString,ArgString); 24) DESTROYTABLE: (+) ddlDestroyTempTable(ctlp,OptnString,ArgString); 25) DESTROYTEMPTABLE: (o) ddlDestroyTempTable(ctlp,OptnString,ArgString); 26) DESTRUCT: ddlDestruct(ctlp,OptnString,ArgString); 27) DETACH: ddlDetach(ctlp,OptnString,ArgString); 28) ELSE: Control 29) END: Control 30) END ATEND (+) Control 31) END RESULTSET (+) Control 32) ENDIF: Control 33) ENDWHILE: Control 34) EXEC: DoProcedure(ctlp,OptnString,ArgString,ExecInfo); 35) FILL: ddlFill(ctlp,OptnString,ArgString); 36) FIND: ddlFind(ctlp,OptnString,ArgString); 37) FINDCALC: (+) ddlFindCalc(ctlp,OptnString,ArgString); 38) GETCALC: ddlGetCalc(ctlp,OptnString,ArgString,NULL); 39) GETRDTYPE: ddlGetRDType(ctlp,OptnString,ArgString); 40) GETTYPE: ddlGetType(ctlp,OptnString,ArgString); 41) IF: ddlCalc() + "IF" 42) INFO: ddlInfo(ctlp,OptnString,ArgString); 43) LOAD: ddlLoad(ctlp,OptnString,ArgString); 44) LOCK: (-) ddlLock(ctlp,OptnString,ArgString); 45) MATCH: ddlMatch(ctlp,OptnString,ArgString); 46) MODE: ddlMode(ctlp,OptnString,ArgString); 47) MPICK: (-) ddlMpick(ctlp,OptnString,ArgString); 48) OPEN: (-) ddlOpen(ctlp,OptnString,ArgString); 49) ORDER: ddlOrder(ctlp,OptnString,ArgString); 50) PICK: ddlPick(ctlp,OptnString,ArgString); 51) PICOMP: ddlCompileAI(ctlp,OptnString,ArgString); 52) PON: [Debug] Enable print to diagnostic window 53) POF: [Debug] Negate print to diagnostic window 54) RAZE: ddlRaze(ctlp,OptnString,ArgString); 55) REDUCE: ddlReduce(ctlp,OptnString,ArgString); 56) RELATE: ddlRelate(ctlp,OptnString,ArgString); 57) RELATEX: DoRelateEx(ctlp,OptnString,ArgString); 58) RPR: ddlRpr(ctlp,OptnString,ArgString); 59) SAVECOLL: (+) ddlSaveColl(ctlp,OptnString,ArgString); 60) SET: ddlCalc() + "SET" 61) SHOW: ddlShow(ctlp,OptnString,ArgString); 62) SMATCH: (-) ddlSuperMatch(ctlp,OptnString,ArgString); 63) SORT: ddlSort(ctlp,OptnString,ArgString); 64) STRUCTURE: ddlStructure(ctlp,OptnString,ArgString); 65) TALLY: ddlTally(ctlp,OptnString,ArgString); 66) TYPE: Control 67) UNCALC: (+) ddlCalc() + "UNCALC" 68) UNSET: (+) ddlCalc() + "UNSET" 69) UNLOAD: ddlUnload(ctlp,OptnString,ArgString); 70) UNLOCK: (-) ddlUnlock(ctlp,OptnString,ArgString); 71) USERS: ddlUsers(ctlp,OptnString,ArgString); 72) VERIFY: ddlVerify(ctlp,OptnString,ArgString); 73) VLIST: ddlCalc() + "VLIST" 74) WHILE: ddlCalc() + "IF" + Control 75) WRITE: ddlWrite(ctlp,OptnString,ArgString);
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.