# Place this file in your home directory, that is, the same directory
# as the user options file.
# Contains a list of entries of the form abbreviation=expansion
# Type the abbreviation and press Ctrl+B to insert the expansion
# The '|' marks the position the caret will be after expansion.

adodatabasedn=oAdoD = new adoDatabase()\noAdoD.databasename = "|"\noAdoD.active  = true
adodatabasecon=oAdoD = new adoDatabase()\noAdoD.connectionString = "|"\noAdoD.sql = ""\noAdoD.active  = true

adotabledn=oAdoT = new adoTable()\noAdoT.databasename = "|"\noAdoT.active  = true
adotablecon=oAdoT = new adoTable()\noAdoT.connectionString = "|"\noAdoT.sql = ""\noAdoT.active  = true

adoquerydn=oAdoQ = new adoQuery()\noAdoQ.databasename = "|"\noAdoQ.sql = ""\noAdoQ.active  = true
adoquerycon=oAdoQ = new adoQuery()\noAdoQ.connectionString = "|"\noAdoQ.sql = ""\noAdoQ.active  = true

adostoredprocdn=oAdoSP = new adoStoredProc()\noAdoSP.databasename = "|"\noAdoSP.procedureName  = ""\noAdoSP.active  = true
adostoredproccon=oAdoSP = new adoStoredProc()\noAdoSP.connectionString = "|"\noAdoSP.procedureName  = ""\noAdoSP.active  = true

alttable=ALTER TABLE <tablename> ADD <column name> <data type> DROP <column name> ...

appendfile=APPEND FROM <filename> FOR <condition> TYPE DBASE | PARADOX | SDF | DELIMITED WITH <char> | BLANK REINDEX

appendarray=APPEND FROM ARRAY <array> FIELDS <field list> FOR <condition> REINDEX

appendmemo=APPEND MEMO <memo field> FROM <filename> OVERWRITE

array=oArray = new Array(|)
array2=oArray = new Array(|1,1) //two dimentional array

assocarray=oAssocArray = new AssocArray()\noAssocArray[ "|" ] = ""

build=BUILD <filename>, <filename> ICON <filename> SPLASH <filename> TO <exe-filename> [WEB] [INI ON | OFF | ROAM] [UAC]

class=Class | \n \nendclass

copytoarray=COPY TO ARRAY |\n   \nFOR \nWHILE \nFIELDS

createindex=CREATE INDEX <index name> ON <table name> (<column name> [, <column name>...])

createtable=CREATE TABLE <table name> (<column name> <data type> [,<column name> <data type>...] [, PRIMARY KEY(<field name>)])

database=oDatabase = new Database()\noDatabase.databaseName = "|"\noDatabase.active=true

date=oDate = new Date()
date1=oDate = new Date(|<date expC>)
date2=oDate = new Date(|<msec expN>)
date3=oDate = new Date(|<year expN>, <month expN>, <day expN> [, <hours expN> , <minutes expN> , <seconds expN>])
date4=oDate = new Date(|<year expN>, <month expN>, <day expN> [, <hours expN> , <minutes expN> , <seconds expN>, <timez expC>])

designer=oDesigner = new Designer()
designer1=oDesigner = new Designer( |[<object>] )
designer2=oDesigner = new Designer( |[<object>] [,<filename expC>] )

docase=DO CASE\nCASE |\n   \nCASE\n   \nOTHERWISE\n   \nENDCASE
dowhile=DO WHILE |\n   \nENDDO
dountil=DO\n   |\nUNTIL 

exception=class oException of Exception\n   |\nendclass

field=oField = new Field()\noField.fieldName = "|"\noQuery.rowset.fields.add(oField)

filecreateR=oFile = new File()\noFile.create("|","R") // Read-only text file 
filecreateW=oFile = new File()\noFile.create("|","W") // Write-only text file 
filecreateA=oFile = new File()\noFile.create("|","A") // Append-only text file 
filecreateRW=oFile = new File()\noFile.create("|","RW") // Read and write text file 
filecreateRA=oFile = new File()\noFile.create("|","RA") // Read and append text file 
filecreateRB=oFile = new File()\noFile.create("|","RB") // Read-only binary file 
filecreateWB=oFile = new File()\noFile.create("|","WB") // Write-only binary file 
filecreateAB=oFile = new File()\noFile.create("|","AB") // Append-only binary file 
filecreateRWB=oFile = new File()\noFile.create("|","RWB") // Read and write binary file 
filecreateRAB=oFile = new File()\noFile.create("|","RAB") // Read and append binary file 

fileopenR=oFile = new File()\noFile.open("|","R") // Read-only text file 
fileopenW=oFile = new File()\noFile.open("|","W") // Write-only text file 
fileopenA=oFile = new File()\noFile.open("|","A") // Append-only text file 
fileopenRW=oFile = new File()\noFile.open("|","RW") // Read and write text file 
fileopenRA=oFile = new File()\noFile.open("|","RA") // Read and append text file 
fileopenRB=oFile = new File()\noFile.open("|","RB") // Read-only binary file 
fileopenWB=oFile = new File()\noFile.open("|","WB") // Write-only binary file 
fileopenAB=oFile = new File()\noFile.open("|","AB") // Append-only binary file 
fileopenRWB=oFile = new File()\noFile.open("|","RWB") // Read and write binary file 
fileopenRAB=oFile = new File()\noFile.open("|","RAB") // Read and append binary file 

forend=FOR x = | TO n\n   \nENDFOR
forstep=FOR x = | TO n STEP 1\n   \nENDFOR
fornext=FOR x = | TO n\n   \nNEXT
fornextstep=FOR x = | TO n STEP 1\n   \nNEXT

function=Function | ()\n   return

header=/*\n   --------------------------------------------------------\n   Filename.....: |\n   ClassName....: \n   Purpose......: \n   Programmer...: \n   Date.........: \n   Note........: .\n   Written for..: \n   Rev. History.: \n   Dependencies.: \n   HelpFile.....: \n   Example:.....: \n   --------------------------------------------------------\n   Notes: \n   --------------------------------------------------------\n   */

if=if\n   |\nendif
ifelse=if\n   |\nelse\n   \nendif

listcov=LIST COVERAGE <filename1> | ? | <filename skeleton 1> [ALL] [SUMMARY] [TO FILE <filename2> | ? | <filename skeleton 2>] [TO PRINTER]
listmem=LIST MEMORY [TO FILE <filename> | ? | <filename skeleton>] [TO PRINTER]
liststat=LIST STATUS [TO FILE <filename> | ? | <filename skeleton>] [TO PRINTER]
liststru=LIST STRUCTURE [IN <alias>] [TO FILE <filename> | ? <filename skeleton>] [TO PRINTER]

locate=LOCATE [<scope>] [FOR <condition 1>] [WHILE <condition 2>]

number=oNum = new Number(|)

object=oObj = new Object()

oleautoclient=oOLE = new OleAutoClient("|")

preifelse=#if\n   | \n#else \n#endif
preifend=#if\n   | \n#endif

preifdef=#ifdef |\n   \n#else\n   \n#endif

query=oQuery = new Query()\noQuery.database = |\noQuery.sql = ""\noQuery.active = true

replacefromarray=REPLACE FROM ARRAY |<array> FOR WHILE FIELDS REINDEX

tryall=Try \n   | \ncatch (Exception e)\n   \ncatch (dbexception db) \n   \nendtry
trye=Try \n   | \ncatch (Exception e)\n   \nendtry
trydb=Try \n   | \ncatch (dbException db)\n   \nendtry

with=With |oObj\n   \nendwith

Web Example 1=//\n// dmWeb Example # 1 (Save As dmweb-example-1.prg)\n//\n// 		 A barebones skeleton of a dBASE PLUS 11 web application\n//           displays only the current version of dBASE PLUS\n//\n// 		 Files Required in the local webserver directory:\n//           WebClass.cc, css/normalize.css, css/skeleton.css\n//\n//       To build dmweb-example-1.exe, enter these commands in the \n//           dBASE PLUS 11 command window - confirm the Navigator directory \n//           is set to the webserver local directory\n//               COMPILE WebClass.cc\n//               COMPILE dmweb-example-1.prg\n//               BUILD dmweb-example-1, WebClass.co TO dmweb-example-1.exe WEB\n\nSET TALK OFF   // turn off interactive mode\nSET CENTURY ON // Y2K\n\nTry  // Error trap entire CGI applet.\n\n   SET PROCEDURE TO WebClass.cc ADDITIVE\n\n   myc = version(1) // get the dBASE version\n\n   ////// Create new instance of the Web Class\n   oCGI = new CGISession()\n\n   ////// Connect to the Web Server (StdIn/StdOut)\n   oCGI.Connect()\n\n   oCGI.streamHeader("Hello from dBASE!")\n   oCGI.streamBody()\n   oCGI.streamResponsiveCenter("You are using -> " + myc)\n   oCGI.streamFooter()\n\ncatch (exception e)\n   oCGI.errorPage(e)\nendtry\n\n////// all done -- always quit so we're not tying up resources\n\nQuit\n

Web Example 2=//\n// dmWeb Example # 2 (Save As dmweb-example-2.prg)\n//\n// 		 Expands on the first dbWeb example and add special error handling\n//           and starts to explore the dbWeb application class: WebClass.cc\n//           by formatting the display of the current version of dBASE PLUS\n//\n// 		 Files Required in the local webserver directory:\n//           WebClass.cc, dmweb-error.htm, images/dBaseLogo.png,\n//           css/normalize.css, css/skeleton.css\n//\n//       To build dmweb-example-2.exe, enter these commands in the \n//           dBASE PLUS 11 command window - confirm the Navigator directory \n//           is set to the webserver local directory\n//               COMPILE WebClass.cc\n//               COMPILE dmweb-example-2.prg\n//               BUILD dmweb-example-2, WebClass.co TO dmweb-example-2.exe WEB\n\nSET TALK OFF   // turn off interactive mode\nSET CENTURY ON // Y2K\n\n// Create application specific Logfile and Error HTML page\nlAppName = substr(_app.exename,rat('\',_app.exename)+1)\nAppName = substr(lAppName,1,rat('.',lAppName)-1)\n\n_app.errorlogfile = '.\' + appname + '.log'\n_app.errorhtmfile = '.\dmweb-error.htm'\n_app.errorAction = 3\n\nTry  // Error trap entire CGI applet.\n\n   SET PROCEDURE TO WebClass.cc ADDITIVE\n\n   myc = version(1) // get the dBASE version\n\n   ////// Create new instance of the Web Class\n   oCGI = new CGISession()\n\n   ////// Change the default values for the dmWeb app\n   cBackImage = "" // background image\n   cBackColor = "0xD5FFFF" // default background color in dBASE color format\n   cTextColor = "RED" // default color of text\n   cLinkColor = "BLUE" // default link color (default is blue)\n   cVLinkColor = "" // default Visited link color\n   cALinkColor = "" // default Active color\n\n   ////// Connect to the Web Server (StdIn/StdOut)\n   oCGI.Connect()\n\n   oCGI.streamHeader("Hello from dBASE!")\n   oCGI.streamBody(cBackImage, cBackColor, cTextColor, cLinkColor, cVLinkColor, cALinkColor)\n   oCGI.streamLogo() // Default image is dBASE Logo\n   oCGI.streamTitle("dBASE Runtime Version Check")\n   oCGI.streamResponsiveCenter("You are using -> " + myc)\n   oCGI.streamFooter()\n\ncatch (exception e)\n   oCGI.errorPage(e)\nendtry\n\n////// all done -- always quit so we're not tying up resources\n\nQuit\n

Web Example 3=//\n// dmWeb Example # 3 (Save As dmweb-example-3.prg)\n//\n// 		 Displays all customers and creates links to\n//           choose which customer to display all the orders for\n//\n// 		 Files Required in the local webserver directory:\n//           WebClass.cc, dmweb-error.htm, images/dBaseLogo.png,\n//           css/normalize.css, css/skeleton.css\n//           customers.dbf\n//\n//       To build dmweb-example-3.exe, enter these commands in the \n//           dBASE PLUS 11 command window - confirm the Navigator directory \n//           is set to the webserver local directory\n//               COMPILE WebClass.cc\n//               COMPILE dmweb-example-3.prg\n//               BUILD dmweb-example-3, WebClass.co TO dmweb-example-3.exe WEB\n\nSET TALK OFF   // turn off interactive mode\nSET CENTURY ON // Y2K\n\n// Create application specific Logfile and Error HTML page\nlAppName = substr(_app.exename,rat('\',_app.exename)+1)\nAppName = substr(lAppName,1,rat('.',lAppName)-1)\n\n_app.errorlogfile = '.\' + AppName + '.log'\n_app.errorhtmfile = '.\dmweb-error.htm'\n_app.errorAction = 3\n\nTry  // Error trap entire CGI applet.\n\n   SET PROCEDURE TO WebClass.cc ADDITIVE\n\n   ////// Create new instance of the Web Class\n   oCGI = new CGISession()\n\n   cBackImage = "" // background image\n   cBackColor = "0xD5FFFF" // default background color in dBASE color format\n   cTextColor = "RED" // default color of text\n   cLinkColor = "BLUE" // default link color (default is blue)\n   cVLinkColor = "" // default Visited link color\n   cALinkColor = "" // default Active color\n\n   ////// Connect to the Web Server (StdIn/StdOut)\n   oCGI.Connect()\n\n   ////// Open Query\n   customers = new Query()\n   customers.sql = 'Select CustomerID, Company from "customers.DBF" ORDER BY Company'\n   customers.active = true\n\n   ////// Process Customer name and IDs to display in link for drilldown\n\n   custRows = customers.rowset\n   nMax = custRows.count()\n\n   custRows.first()\n   custNames = new Array()\n\n   do while not custRows.endOfSet // process table ...\n      custNames.add( '<a href="dmweb-example-4.exe?CustomerID=' +;\n                       custRows.fields["CustomerID"].value +;\n                       '"><strong>' +;\n                       trim(custRows.fields["Company"].value) +;\n                       '</strong></a>')\n      custRows.next()          // move to next row\n   enddo\n\n   oCGI.streamHeader("dBASE Customer Listing")\n   oCGI.streamBody(cBackImage, cBackColor, cTextColor, cLinkColor, cVLinkColor, cALinkColor)\n   oCGI.streamLogo() // Default image is dBASE Logo\n   oCGI.streamTitle("dBASE Realtime Customer List")\n\n   ////// Process 3 customers per row\n   oCGI.streamDetail('          <div class="container">')\n\n   nCol = 1\n   for nRow = 1 to aLen( custNames, 1)\n\n       if (nCol = 1)\n           oCGI.streamDetail('        <div class="row">')\n       endif\n       oCGI.streamDetail('          <div class="four columns" style="text-align:center">' +;\n           custNames[nRow] + '</div>')\n       nCol += 1\n       if (nCol = 4)\n           nCol = 1\n           oCGI.streamDetail('        </div> <!-- end of row -->')\n       endif\n\n   next\n\n   // if not a complete row then close it out\n   if (nCol < 4)\n       if (nCol = 1)\n           oCGI.streamDetail('          <div class="twelve columns">&nbsp;</div>')\n       elseif (nCol = 2)\n           oCGI.streamDetail('          <div class="eight columns">&nbsp;</div>')\n       elseif (nCol = 3)\n           oCGI.streamDetail('          <div class="four columns">&nbsp;</div>')\n       endif\n       oCGI.streamDetail('        </div> <!-- end of row -->')\n   endif\n\n   oCGI.streamDetail('      </div> <!-- end of container -->')\n\n   ////// add a little room at the bottom\n   oCGI.streamDetail('      <p>&nbsp;</p>')\n\n   oCGI.streamFooter()\n\ncatch (exception e)\n   oCGI.errorPage(e)\nendtry\n\n////// all done -- always quit so we're not tying up resources\n\nQuit\n

Web Example 4=//\n// dmWeb Example # 4 (Save As dmweb-example-4.prg)\n//\n// 		 Called from dbWeb Example # 3 passing a customer id to\n//           display all the orders for that customer\n//\n// 		 Files Required in the local webserver directory:\n//           WebClass.cc, dmweb-error.htm, images/dBaseLogo.png,\n//           css/normalize.css, css/skeleton.css\n//           customers.dbf, orders.dbf\n//\n//       To build dmweb-example-4.exe, enter these commands in the \n//           dBASE PLUS 11 command window - confirm the Navigator directory \n//           is set to the webserver local directory\n//               COMPILE WebClass.cc\n//               COMPILE dmweb-example-4.prg\n//               BUILD dmweb-example-4, WebClass.co TO dmweb-example-4.exe WEB\n\nSET TALK OFF   // turn off interactive mode\nSET CENTURY ON // Y2K\n\n// Create application specific Logfile and Error HTML page\nlAppName = substr(_app.exename,rat('\',_app.exename)+1)\nAppName = substr(lAppName,1,rat('.',lAppName)-1)\n\n_app.errorlogfile = '.\' + appname + '.log'\n_app.errorhtmfile = '.\dmweb-error.htm'\n_app.errorAction = 3\n\ntry  // Error trap entire CGI applet.\n\n   SET PROCEDURE TO WebClass.cc ADDITIVE\n\n   ////// Create new instance of the Web Class\n   oCGI = new CGISession()\n\n   cBackImage = "" // background image\n   cBackColor = "0xD5FFFF" // default background color in dBASE color format\n   cTextColor = "RED" // default color of text\n   cLinkColor = "BLUE" // default link color (default is blue)\n   cVLinkColor = "" // default Visited link color\n   cALinkColor = "" // default Active color\n\n   ////// Connect to the Web Server (StdIn/StdOut)\n   oCGI.Connect()\n\n   ////// Create query variable for response reports to use\n   Public cSearch\n\n   if oCGI.isKey('CustomerID')     // if key exists\n      cSearch = oCGI['CustomerID'] // set value of cSearch\n   else\n      oCGI.SorryPage("Did not received CustomerID information", "Link Parameters")\n      cSearch = "N/A"\n   endif\n\n   ////// Find Customer Query\n   cSQL = 'SELECT Company FROM "customers.DBF" ' +;\n          'WHERE CustomerID=' + cSearch\n\n   customers = new Query()\n   customers.sql = cSQL\n   customers.active = true\n\n   ////// Process Customer name\n\n   custRows = customers.rowset\n   custRows.first()\n   cCompany = trim(custRows.fields["Company"].value)\n\n   ////// Find Orders Query\n   oSQL = 'SELECT * FROM "orders.DBF" ' +;\n          'WHERE CustomerID=' + cSearch + ' ORDER BY OrderDate DESC'\n\n   orders = new Query()\n   orders.sql = oSQL\n   orders.active = true\n\n   ////// Process Customer name and IDs to display in link for drilldown\n\n   orderRows = orders.rowset\n   nMax = custRows.count()\n\n   orderRows.first()\n   custOrders = new Array()\n\n   do while not orderRows.endOfSet // process table ...\n       custOrders.add( 'Order # ' + orderRows.fields["OrderID"].value +;\n                            ' :: Ordered on ' + orderRows.fields["OrderDate"].value )\n\n       orderRows.next()          // move to next row\n   enddo\n\n   if (orderRows.count() < 1)\n      custOrders.add ('No Orders on file!')\n   endif\n\n   oCGI.streamHeader("dBASE Order Listing for "+cCompany)\n   oCGI.streamBody(cBackImage, cBackColor, cTextColor, cLinkColor, cVLinkColor, cALinkColor)\n   oCGI.streamLogo() // Default image is dBASE Logo\n   oCGI.streamSubTitle("Order Listing for "+cCompany)\n\n\n   oCGI.streamDetail('          <div class="container">')\n\n   for nRow = 1 to aLen( custOrders, 1)\n      oCGI.streamDetail('        <div class="row">')\n      oCGI.streamDetail('          <div class="four columns" style="text-align:center">&nbsp;</div>')\n      oCGI.streamDetail('          <div class="four columns" style="text-align:left"><strong>' +;\n                        custOrders[nRow] + '</strong><br /></div>')\n      oCGI.streamDetail('          <div class="four columns" style="text-align:center">&nbsp;</div>')\n      oCGI.streamDetail('        </div> <!-- end of row -->')\n\n   next\n\n   oCGI.streamDetail('      </div> <!-- end of container -->')\n\n   ////// add a little room at the bottom\n   oCGI.streamDetail('      <p>&nbsp;</p>')\n\n   oCGI.streamFooter()\n\ncatch (exception e)\n   oCGI.errorPage(e)\nendtry\n\n////// all done -- always quit so we're not tying up resources\n\nQuit\n

Web Example 5=<!DOCTYPE html>\n<html>\n<head>\n	<meta content="text/html" http-equiv="Content-Type">\n	<title>dBASE Web Application Error</title>\n</head>\n<!--\n   Custom Error Page for dBASE PLUS 11 dbWeb applications\n   \n   This is a responsive page that you can customize for your applications,\n   you can change the <title></title> above this comment block but \n   DO NOT CHANGE the structure above or you will break the CGI execution.\n-->\n<body style="background-color:#FFFFD5; color:BLACK; a:link: {color:BLACK;}">\n	\n	<script type="text/javascript">\n	function loadCSS(filename){\n	 var file = document.createElement("link");\n	 file.setAttribute("rel", "stylesheet");\n	 file.setAttribute("type", "text/css");\n	 file.setAttribute("href", filename);\n	 document.head.appendChild(file);\n	}\n	loadCSS("css/normalize.css");\n	loadCSS("css/skeleton.css");\n	</script>\n\n	<div class="container">\n		<div class="row">\n			<div align="center"><img alt="dBase LLC Logo" src="images/dBaseLogo.png"></div>\n		</div>\n		<div class="row">\n			<div align="center">\n				<h1>dBASE Web Application Error</h1>\n			</div>\n		</div>\n	</div>\n\n	<div class="container">\n		<div class="row">\n			<div class="three columns">\n				&nbsp;\n			</div>\n			<div class="six columns">\n				<p style="text-align:center;font-size: 16px;"><strong>Date and Time:</strong>%d<br>\n				<strong>EXE File:</strong> %e<br>\n				<strong>Line No:</strong> %l<br>\n				<strong>Procedure/Function:</strong> %p<br>\n				<strong>Error Code:</strong> %c<br>\n				<strong>Error Message:</strong> %m<br></p>\n			</div>\n			<div class="three columns">\n				&nbsp;\n			</div>\n		</div>\n	</div>\n\n	<!-- Error replacement tokens\n		%d - Date and Time of error\n		%e - Application EXE filename\n		%s - Source filename\n		%p - Name of procedure or function in which error occurred\n		%l - Source line number\n		%c - error code\n		%m - error message\n	-->\n\n</body>\n</html>\n





