HTML/OS Tag Reference
This appendix summarizes the HTML/OS tags used in this book. Each tag includes a brief description and its parameters. For information on other tags and a more complete description of each tag, please refer to the Official HTML/OS Tag Reference included with purchase of HTML/OS Professional.
HTML/OS Tags with No Parameters
CR––Returns carriage-return character (ASCII 13).HTMLOS.POPUP––ReturnsTRUEif page was launched from HTML/OS Desktop. HTMLOS.ICONPAGE––Returns HTML/OS Desktop page.
HTMLOS.CLICKED––Returns name of submit button last clicked.
ISGOODKEY––ReturnsTRUEif a valid product has been registered. Otherwise returnsFALSE. LF––Returns line-feed newline character (ASCII 10).
PAGE––Returns current page.
SYSSERVICE––Returns current Web service; HTTP or HTTPS.
SYSSTARTLINK––Returns URL path to Start-link. Append with entry page name to build full Start-link. TAGRESULTS––Set by some HTML/OS tags. Returns last value placed in it.
TODAY––Returns current date.
HTML/OS Tags with Parameters
ADDDAYS(date,days)Returns the date offset from the specified input date by a number of days. Params: date—Any valid date after 1970.
days—Number of days to add. Negative numbers allowed.
153
APPEND variable TO destination/APPEND
Appends a variable to a destination variable, document, or delimited file. Params: variable—The source variable.
destination—The destination variable, document or delimited file where the document is specified as FILE=filenameand delimited file is specified as
FILE=filename TS=delimiter. ASCII(number)
Returns character from ASCII value. GETASCIIreturns ASCII value of character. Params: number—ASCII value.
BINTOTEXT(filename)
Reads binary file and loads, as text, into variable. (Maps null character to ^n and ^ character to ^d. The tag TEXTTOBINvariable back into binary file. See Aestiva Print Reference.)
Params: filename—Filename. COLTOLIST(variable,col,delimiter)
Converts a column in variable to a delimited list. Same as SPLITtag. Params: variable—Input table.
col—Column number in variable to convert.
delimiter—Character separator. COOKIEREAD(cookie_var)
Reads cookie variable from an HTML cookie.
Params: cookie_var—Name of cookie variable. COOKIEWRITE(cookie_var,cookie_value,expires) Writes to HTML cookievariable.
Params: cookie_var—Name of cookie variable. cookie_value—Value to write to cookie_var. expires—Expiration date of cookie.
COPY source TO destination /COPY
Copies a source variable, document, or delimited file to a destination variable, document, or delimited file. Params: source—The source variable, document, or delimited file where document is
specified as FILE=filenameand delimited file is specified as FILE=filename TS=delimiter.
destination—The destination variable, document, or delimited file where the document is specified as FILE=filenameand the delimited file is specified as
CUT(variable,pattern)
Removes first match of pattern from string. Use CUTALLto remove all matches. Usage: CUT(variable,pattern).
Params: variable––Input text.
pattern—Pattern pattern being cut. DBADD(dbname) and
DBADD(dbname,fieldlist)
Adds a new record to a database using current variables. Returns a status result. Params: dbname—Database name.
fieldlist—Specific fields to place in record. If fieldlistis specified, then only those fields in the list are placed in the record.
DBBATCHADD(dbname,variable,fieldlist,flag)
Import multiple records into database from array. Same as DBLOADtag. Params: dbname—Database name.
variable—Source variable.
fieldlist—Specific fields to change in record. If fieldlistis specified, only those fields in the list are updated.
flag—Set to Y or N to enable or disable import of overflow data. DBBATCHEDIT(dbname,variable,fieldlist)
Edit multiple fields in database.
Params: dbname—Database name. variable—Source variable.
fieldlist—Comma-separated list of fields to change in record. fieldlistmust contain physical record, *RECORD. See DBFIND. Only those fields in the list are updated. DBBATCHDELETE(dbname,variable,recordcol)
Delete multiple records in database. Params: dbname—Database name.
variable—Source variable.
recordcol—Column position of physical record, *RECORD, in variable. See DBFIND. DBDELETE(dbname,record)
Deletes a record from database. Returns a status result. Usage: DBDELETE(dbname,record). Params: dbname—Database name.
DBEDIT(dbname,record) and DBEDIT(dbname,record,fieldlist) Params: dbname—Database name.
record—Record number of record to remove.
fieldlist—Specific fields to change in record. If fieldlistis specified, then only those fields in the list are updated.
DBFIND(dbname,query,from,to,fieldlist)
Retrieves records from a database. Returns the result in table. Places the status result in TAGRESULTS. Params: dbname—Database name.
query—Boolean search expression. from—Number of first result to return. to—Number of last result to return.
fieldlist—Specific fields to return from database. Each record returned is
placed in a different row. Each field is placed in a column based on its order in the fieldlist. Specify RECORDfor logical record and *RECORDfor physical record. Status: TAGRESULTS[1,1]—TRUEor FALSE
TAGRESULTS[2,1]—Number of records returned.
TAGRESULTS[3,1]—First match number returned.
TAGRESULTS[4,1]—Llast match number returned.
TAGRESULTS[5,1]—Total matches in database.
TAGRESULTS[1,2]—OKor error message. DBFINDJ(dbname,query,from,to,fieldlist,results,field)
Retrieves records from a database, joining with prior search result. Returns result in table. Places a status result in TAGRESULTS.
Params: dbname—Database database name. query—Boolean search expression. from—Number of first result to return. to—Number of last result to return.
fieldlist—Specific fields to return from database. Each record returned is placed in a different row. Each field is placed in a column based on its order in the fieldlist. Specify RECORDfor logical record and *RECORDfor physical record.
results—Search result table. col—Join column in results table. field—Join field in database.
Status: TAGRESULTS[1,1]—TRUEor FALSE
TAGRESULTS[2,1]—Number of records returned.
TAGRESULTS[3,1]—First match number returned.
TAGRESULTS[5,1]—Total matches in database.
TAGRESULTS[1,2]—OKor error message. DBFINDSORT(dbname,query,from,to,sfield,order,fieldlist)
Retrieves records from a database sorted by field. Returns the result in table. Places the status result placed in TAGRESULTS.
Params: dbname—Database name.
query—Boolean search expression. from—Number of first result to return. to—Number of last result to return.
fieldlist—Specific fields to return from database. Each record returned is placed in a different row. Each field is placed in a column based on its order in the fieldlist. sfield—Sort field.
order—Sort order, Yor N.
Status: TAGRESULTS[1,1]—TRUEor FALSE.
TAGRESULTS[2,1]—Number of records returned.
TAGRESULTS[3,1]—First match number returned.
TAGRESULTS[4,1]—Last match number returned.
TAGRESULTS[5,1]—Total matches in database.
TAGRESULTS[1,2]—OKor error message. DBGET(dbname,query,num)
Updates current variables from a queried record in a database. Returns status result. Params: dbname—Database name.
query—Boolean search expression. num—Result number to return. Status: [1,1]—TRUEor FALSE.
[2,1]—Number of records returned.
[3,1]—First match number returned.
[4,1]—Last match number returned.
[5,1]—Total matches in database.
[1,2]—OKor error message. DBGETREC(dbname,record)
Updates current variables from a record in a database. Returns a status result. Params: dbname—Database name.
record—Database record to remove. Status: [1,1]—TRUEor FALSE.
[1,2]—OKor error message.
DBREMOVE(dbname,query)
Deletes queried records from a database. Returns a status result. Params: dbname—Database name.
query—Boolean search expression. Status: [1,1]—TRUEor FALSE
[2,1]—Total number of records deleted.
[1,2]—OKor error message. DISPLAY source/DISPLAY
Inserts text into an HTML document from source variable, file, or variable array. If FILE=is specified, content is loaded from a file. If NAME=is specified, data is loaded from an array and variable is repeatedly displayed, once for each row of the array.
Params: source—Variable, FILE=filename, or NAME=array expressions, such as:
DISPLAY x /DISPLAY, or DISPLAY FILE=”abc.txt” /DISPLAY, or
DISPLAY NAME=x “[1] [2] [3]<br>” /DISPLAY. EXPAND FILE=file /EXPAND
Expands HTML/OS code into an Overlay from file.
Params: file—Filename. Contents of the file are inserted into the current Overlay from file and executed.
FILESCRAMBLEKEY(domain,productcode) and
FILESCRAMBLEKEY(domain,productcode,versioncode)
Get registration key from target domain name, product code, and version code. Params: domain—Target domain name.
productcode—Product code specified in Bundle Bee. versioncode—Five digit code. Default is 00000.
FOR NAME=name VALUE=value1 TO value2 DO instructions /FOR and FOR NAME=variable ROWNAME=rowvar DO instructions /FOR
Repeats instructions as integer increments from one value to another, or repeats instructions as row increments from top row of table to bottom row of table.
Params: integer—Variable being changed. value1—First value of integer. value2—Last value of integer.
rowvar—Name of table containing one row from variable. instructions—HTML/OS instructions repeated.
FUNCTION otag(param,...) DO instructions RETURN var /RETURN /FUNCTION Defines a function (Overlay Tag).
Params: otag—Name of Overlay tag (function) being defined. param—Temporary name of function parameter(s). instrucs—Instructions to be executed when function is run. var—Value returned by function.
GETCOLEQ(variable,col,pattern)
Extracts from multirow variable those rows with a column entry that equals a pattern. Returns table with matching rows.
Params: variable—Input table. col—Column to match.
pattern—String to match to entry in column. GETCOLNOTEQ(variable,col,pattern)
Extracts from multirow variable those rows with a column entry that does not equal a pattern. Returns table with nonmatching matching rows.
Params: variable—Input table. col—Column to search.
pattern—String to match to entry in column. .
GOTO destination
Continues the execution of code at top of specified file if the destination is a filename. Redirects the user to Web location if destination is a URL.
Params: destination—URL or file name.
IF test -THEN instruc ELIF instruc ELSE instruc /IF
Executes instructions between THENand /IF, ELSEor ELIF, respectively if testis TRUE, otherwise skips instructions and executes instructions between ELSEand /IF(if ELSEis specified) or performs next test (if ELIFis specified).
Params: test—Boolean test. For example, a=”TRUE”.
instruc—HTML/OS instructions being conditionally executed. ISDATE(variable)
Returns TRUEif the string is a proper HTML/OS date. Otherwise, returns FALSE. Params: variable—Input variable.
ISFILE(filename)
Returns TRUEif a file exists. Otherwise returns FALSE. Params: file—Name of file.
ISINTEGER(variable)
Returns TRUEif input is a valid integer. Otherwise returns FALSE. Params: variable—Input variable.
ISSTARTLINK(file)
Returns TRUEif page is enabled Start-link FALSEif not. Params: file—Filename
LEFT(variable,number)
Returns the specified leftmost number of characters of a string. Params: variable—Input text.
number—Number of leftmost characters to return. LENGTH(variable)
Returns length of a character string. Params: variable—Input text. LISTTOCOL(variable,delimiter) Converts list to a one-column variable. Params: variable—Input list.
delimiter—Character separator between items in list. LOCATE(variable,pattern)
Returns the position of a pattern in string. Returns #0if not found. Params: variable—Input text.
pattern—Pattern being searched.
MAIL variable TO ADDRESS=address SUBJECT=subject /MAIL E-mails message to an e-mail address.
Params: variable—Input message. address—E-mail address.
subject—E-mail message subject line. MIDDLE(variable,number1,number2)
Returns substring of character string. Params: variable—Input text.
number1—Position in variableof left-most character to return. number2—Position in variableof right-most character to return. PASTETABLE(variable1,col,row,variable2)
Pastes table over another. Top table’s upperleft corner positioned at specified cell in first table. Params: variable1—First table.
variable2—Top table.
col—Column position in first table for upper-left corner of top table. row—Row position in first table for upper-left corner of top table.
REPLACE(variable,pattern1,pattern2)
Returns a string with first pattern in an input string substituted for another. Use REPLACEALLto replace all patterns in input string.
Params: variable—Input text.
pattern1—Pattern being replaced (replacement done on first match only). pattern2—Pattern being substituted.
RIGHT(variable,number)
Returns the specified rightmost number of characters of a string. Params: variable—Input text.
number—Number of rightmost characters to return. ROW(variable,variable,variable,..)
Returns one-row table with specified columns. Params: variable—Column entry. ROWS(variable)
Returns number of rows of specified variable. The tag COLSreturns number of columns. Params: variable—Specified variable.
SPLIT(variable,delimiter) See LISTTOCOL.
SQRT(number)
Returns square root of specified number. Params: number—Specified number. SYSACCESS(filename,variablelist,flag)
Enables or disables direct access to document using Start-link. Params: filename—Document name.
variablelist—Comma-separated list of Start-link variables.
flag—Set to ALLOWor DENYto ENABLECOOKIEenable or disable access. TIMEFROM(variable,units)
Returns the number of minutes or hours since a specified time. Returns 0if in the future. Params: variable—Input date.
TIMETILL(variable,units)
Returns the number of minutes or hours to a specified time. Returns 0if in the past. Params: variable—Input date.
units—Output units (MINUTES, HOURS, DAYS). UPPER(variable)
Returns upper-case value of input variable. Params: variable—Input string. WHILE testDO instructions /WHILE Repeats instructions as long as test returns TRUE.
Params: test—Boolean test. For example, a=”TRUE”. instructions—HTML/OS instructions repeated.