http://wiki.signature.net/index.php?title=Special:Contributions&feed=atom&limit=50&target=Jim
CometWiki - User contributions [en]
2024-03-28T20:31:04Z
From CometWiki
MediaWiki 1.16.0
http://wiki.signature.net/index.php/Main_Page
Main Page
2019-10-16T19:34:23Z
<p>Jim: /* Comet by Signature Systems, Inc. */ commented out comet mobile</p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
<br />
* [[Getting Started With Comet]]<br />
<br />
* [[Subscription Benefits]]<br />
<br />
* [[Virtual Dongle]]<br />
<br />
* [[FAQs]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet Meetings]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[STL Containers]]<br />
<br />
* [[Xap and Comet32]]<!-- Comment * [[CometAnywhere Mobile]] --><br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Comet And RDP]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim
http://wiki.signature.net/index.php/Enhanced_Printing
Enhanced Printing
2016-08-25T19:22:53Z
<p>Jim: </p>
<hr />
<div>Windows Printer Mnemonics<br />
<br />
Text and font functions<br />
<br />
{| border=1 cellpadding=5 cellspacing=2 <br />
! Mnemonic<br />
! Description<br />
! Format - for in depth review follow link<br />
|- <br />
| valign=top | [[Mnemonics_%22G%22#.28GetBkColor.29| (GetBkColor) ]]<br />
| Returns the current background color<br />
| <br />
|- <br />
| valign=top | [[Mnemonics_%22G%22#.28GetBkMode.29|(GetBkMode)]]<br />
| Returns the current background mode<br />
|<br />
|- <br />
| valign=top | [[Mnemonics_%22G%22#.28GetFontInfo.29|(GetFontInfo)]]<br />
| Returns font information<br />
! GetFontInfo = item-code <br />
|- <br />
| valign=top | [[Mnemonics_%22G%22#.28GetFuncResult.29| (GetFuncResult)]]<br />
| Requests the 4-byte result of the last printer function<br />
|<br />
|- <br />
| valign=top | [[Mnemonics_%22G%22#.28GetTextAlign.29|(GetTextAlign)]]<br />
| Returns the current text alignment mode<br />
|<br />
|- <br />
| valign=top | [[Mnemonics_%22G%22#.28GetTextAlign.29| (GetTextColor)]]<br />
| Returns the current text color<br />
|<br />
|- <br />
| valign=top | [[Mnemonics_%22G%22#.28GetTextAlign.29| (GetTextExtent)]]<br />
| Measures the size (width and height) of the specified text<br />
| GetTextExtent= printable-text<br />
|- <br />
| valign=top | [[Mnemonics_%22P%22#.28Pop_Font.29|(Pop Font)]]<br />
| <br />
|<br />
|- <br />
| valign=top | [[Mnemonics_%22P%22#.28Pop_Font.29|(Push Font)]]<br />
| <br />
|<br />
|- <br />
| valign=top | [[Mnemonics_%22R%22#.28Rectangle.29| (Rectangle)]]<br />
| Draws a rectangle<br />
| Rectangle=left, top, right, bottom<br />
|- <br />
| valign=top | [[Mnemonics_%22R%22#.28RoundRect.29| (RoundRect)]]<br />
| Draws a rectangle with rounded corners<br />
| RoundRect=left, top, right, bottom, corner-width, corner-height<br />
|- <br />
| valign=top | [[Mnemonics_%22S%22#.28SelectFont| (SelectFont)]]<br />
| Selects the specified font<br />
! SelectFont= log-font-data<br />
|- <br />
| valign=top | [[Mnemonics_%22S%22#.28SelectFont|(SelectSysFont)]]<br />
| Selects the specified SYSTEM font<br />
! SelectSysFont=font-number<br />
|- <br />
| valign=top | [[Mnemonics_%22S%22#.28SetBkColor.29| (SetBkColor]])<br />
| Sets the current background color<br />
! SetBkColor=red, green, blue<br />
|- <br />
| valign=top | [[Mnemonics_%22S%22#.28SetBkColor.29|(SetBkMode)]]<br />
| Sets the background mode<br />
! SetBkMode=mode<br />
|- <br />
| valign=top | [[Mnemonics_%22S%22#.28SetTextAlign.29|(SetTextAlign)]]<br />
| Sets the text alignment mode<br />
! SetTextAlign=flags<br />
|- <br />
| valign=top | [[Mnemonics_%22S%22#.28SetTextAlign.29|(SetTextColor)]]<br />
| Sets the current text color<br />
| SetTextColor=red, green, blue<br />
|- <br />
| valign=top | [[Mnemonics_%22T%22#.28TextOut.29|(TextOut)]]<br />
| Prints the specified text at the specified location<br />
! TextOut = X, Y; printable-text<br />
|-<br />
|}<p><h3><br />
Graphics and drawing functions<br />
</h3><p><br />
{| border=1 cellpadding=5 cellspacing=2 <br />
! Mnemonic<br />
! Description<br />
|- <br />
| valign=top |(Draw Bit Map=left, top, right, bottom, scaleX, scaleY, flags); filename<br />
| Draws a bitmap graphic contained in the specified filename (.BMP/.JPG) at the specified<br />
location, using the specified format codes and scaling factors<br />
|- <br />
| valign=top | (Draw Image=left, top, right, bottom, scaleX, scaleY, flags, filename)<br />
| Draws a bitmap graphic contained in the specified filename (.BMP/.JPG) at the specified<br />
location, using the specified format codes and scaling factors<br />
|- <br />
| valign=top | >(Draw Text=left, top, right, bottom, flags); printable-text<br />
| Prints the specified text into the rectangle at the specified location,<br />
using the specified format codes<br />
|- <br />
| valign=top |(Ellipse=left, top, right, bottom)<br />
| Draws an ellipse<br />
|- <br />
| valign=top | (Line To = X, Y)<br />
| Draws a line using the currently selected pen from the current<br />
location pointer to the location specified<br />
|- <br />
| valign=top |(Move To = X, Y)<br />
| Moves the current location pointer to the specified location<br />
|- <br />
| valign=top | (SelectHatchBrush=style, red, green, blue)<br />
| Selects the hatched brush<br />
|- <br />
| valign=top | (SelectPen=style, width, red, green, blue)<br />
| Selects the specified pen<br />
|- <br />
| valign=top |(SelectSolidBrush=red, green, blue)<br />
| Selects the solid brush<br />
|}<p><h3><br />
Printer control functions<br />
</h3><p><br />
{| border=1 cellpadding=5 cellspacing=2 <br />
! Mnemonic<br />
! Description<br />
|- <br />
| valign=top | (GetPageInfo = item-code)<br />
| Returns page information<br />
|- <br />
| valign=top | (SetOrientation=mode)<br />
| Sets the paper orientation<br />
|- <br />
| valign=top | (SetPaperSize)<br />
| Sets the paper size<br />
|- <br />
| valign=top | (SetPrinterInfo)<br />
| Sets printer information<br />
|- <br />
| valign=top | (LineSpacing=LinesPerInch)<br />
| Overrides the default font-based line spacing to the desired lines-per-inch<br />
|- <br />
| valign=top | (AutoCrOn)<br />
| Turns on extra CR/LF added by CosP to the end of each line not followed by (TR).<br />
|- <br />
| valign=top | >(AutoCrOff)<br />
| Turns off extra CR/LF added by CosP to the end of each line not followed by (TR).<br />
|}</div>
Jim
http://wiki.signature.net/index.php/Comet_Meetings
Comet Meetings
2016-08-16T00:12:00Z
<p>Jim: </p>
<hr />
<div>* [[Comet_Meeting_--_March_2015]]<br />
<br />
* [[Comet_Meeting_--_October_2013]]<br />
<br />
* [[Comet_Meeting -- April_2012]]<br />
<br />
* [[Comet Meeting -- October 12, 2010]]<br />
<br />
* [[Comet Meeting -- August 10, 2009]]<br />
<br />
*[[Historical Dealer Meetings]]</div>
Jim
http://wiki.signature.net/index.php/Main_Page
Main Page
2016-08-16T00:11:40Z
<p>Jim: </p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
<br />
* [[Getting Started With Comet]]<br />
<br />
* [[Subscription Benefits]]<br />
<br />
* Get your questions answered with [[FAQ2010|The Comet FAQ]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet Meetings]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[STL Containers]]<br />
<br />
* [[Xap and Comet32]]<br />
<br />
* [[CometAnywhere Mobile]]<br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Comet And RDP]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim
http://wiki.signature.net/index.php/Main_Page
Main Page
2016-08-16T00:09:02Z
<p>Jim: </p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
<br />
* [[Getting Started With Comet]]<br />
<br />
* [[Subscription Benefits]]<br />
<br />
* Get your questions answered with [[FAQ2010|The Comet FAQ]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet Meetings]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[STL Containers]]<br />
<br />
* [[Xap and Comet32]]<br />
<br />
* [[CometAnywhere Mobile]]<br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Historical Dealer Meetings]]<br />
<br />
*[[Comet And RDP]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim
http://wiki.signature.net/index.php/Main_Page
Main Page
2016-08-16T00:08:03Z
<p>Jim: </p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
<br />
* [[Getting Started With Comet]]<br />
<br />
* [[Subscription Benefits]]<br />
<br />
* Get your questions answered with [[FAQ2010|The Comet FAQ]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet Meetings]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[STL_Containers]]<br />
<br />
* [[Xap and Comet32]]<br />
<br />
* [[CometAnywhere Mobile]]<br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Historical Dealer Meetings]]<br />
<br />
*[[Comet And RDP]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim
http://wiki.signature.net/index.php/Comet_Meetings
Comet Meetings
2016-08-16T00:05:29Z
<p>Jim: creeated page</p>
<hr />
<div>* [[Comet_Meeting_--_March_2015]]<br />
<br />
* [[Comet_Meeting_--_October_2013]]<br />
<br />
* [[Comet_Meeting -- April_2012]]<br />
<br />
* [[Comet Meeting -- October 12, 2010]]<br />
<br />
* [[Comet Meeting -- August 10, 2009]]</div>
Jim
http://wiki.signature.net/index.php/Main_Page
Main Page
2016-08-16T00:02:58Z
<p>Jim: split comet meetings</p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
On the New Server<br />
* [[Subscription Benefits]]<br />
* Get your questions answered with [[FAQ2010|The Comet2010 FAQ]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet Meetings]]<br />
<br />
* [[Getting_Started_With_Comet]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[STL_Containers]]<br />
<br />
* [[Xap and Comet32]]<br />
<br />
* [[CometAnywhere Mobile]]<br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Historical Dealer Meetings]]<br />
<br />
*[[Comet And RDP]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim
http://wiki.signature.net/index.php/Xap_and_Comet32
Xap and Comet32
2016-06-26T01:45:53Z
<p>Jim: </p>
<hr />
<div>== XAP the Easy, Fast way to Build and Serve Web Pages with Dynamic Comet Content==<br />
<br />
===History===<br />
The first commercially available web page was published in 1995. Signature introduced the protocol lnown as XAP in 1998. XAP stands for eXtended Application Pages. It is the way to publish pages containing Your comet data.<br />
<br />
The original XAP worked (and works) fine, although it is somewhat tedious to populate a web page with data. With the new functionality available in XAP2 and Comet32, this task is MUCH easier.<br />
<br />
===The Anatomy of a Web transaction===<br />
<br />
To more fully understand what is required in a web server (that is what XAP is), it is interesting to outline what a single transaction between the browser and the server looks like. For illustration, lets use the web address as '''http://localhost:8080/xap/xaptest/''' as the url. This assumes we have xap running on our local machine. <br />
<br />
====Connect====<br />
<br />
The browser connects to the server. In this case it is connecting to localhost and it is listening to port 8080. Localhost is a universal DNS name for our own machine. its address is 127.0.0.1. This address is available on every windows machine, so it is convenient for everyone to use this address for testing.<br />
<br />
Anyway, the browser connects to port 8080 in our case. The standard port for http is port 80, but in many cases windows takes this port for its own use.<br />
<br />
====The Header====<br />
<br />
Once a connection is made, the browser sends a block of text like this:<br />
<pre><br />
GET /xap/xaptest HTTP/1.1<br />
Host: localhost:8080<br />
Connection: keep-alive<br />
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24<br />
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5<br />
Accept-Encoding: gzip,deflate,sdch<br />
Accept-Language: en-US,en;q=0.8<br />
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3<br />
Cookie: visits=101; loadtime=0.25<br />
</pre><br />
This is known as the HTTP Header. We are not interested in most of this stuff.<br />
<br />
====Our Response====<br />
<br />
We then send back a block of text. That completes the whole HTTP transaction. The parties disconnect, and the server waits for another transaction from anyone.<br />
<br />
====HTTP vs HTML====<br />
<br />
The block of text MAY be comprised of HTML or text in some other format (look at the "Accept:" line above. HTTP is the protocol (Hyper Text Transmission Protocol) and HTML stands for Hyper Text Markup Language.<br />
<br />
====Name/Value Pairs====<br />
'''Everything is names and values.''' Much of the data that comes from the browser is in the form of names and values. Name/Value pairs are delimited with one character and separated with another. The header above is delimited with crlf characters and the names and values are separated by colons. The cookies also are name/value pairs where the delimiter is a semi colon and the separator is an equal sign. The other set of data that we are interested in is the query string. That is delimited by ampersand characters and separated by equal signs.<br />
<br />
===Making it Easy for You===<br />
So, a single transaction with the browser consists of getting some data from it and sending a response back. There are several features of Comet32 that make this process easy.<br />
<br />
====Dynamic Strings====<br />
Comet32 Dynamic strings can be of any length (up to 4 GB or so). Data can be put into these strings without worry of overflowing. We can even read a whole file into a string for further processing. See [[IB_Statements/InputFile_and_PrintFile| '''InputFile''']].<br />
<br />
====Templates====<br />
Most of the data going to the browser is HTML. It is convenient to keep this HTML in a template. The template is divided into sections that will be handled separately by the program. Comet32 makes it easy to split a template into its sections and manipulate the section before sending it to the browser.<br />
<br />
====The Map Statement====<br />
Comet32 introduces the MAP statement which looks much like a format statement but is used to associate names with variables in your program (Values). The MAP statement is used in several high level functions and statements that make web programming easy (see below).<br />
<br />
====New String Functions====<br />
=====[[Replace]] -- Replaces names in a string with corresponding values.=====<br />
=====[[GetMap]] -- Using a MAP, retrieves values from a string.=====<br />
=====[[Tcase]] -- Title case.=====<br />
=====[[UrlDecode]] -- Decodes a string which was URL Encoded by the Browser.=====<br />
=====[[UrlEncode]] -- Encodes a string making it suitable for an html server.=====<br />
=====[[MapDecode]] -- URLDecodes all of the values in a MAP.=====<br />
=====[[ClearFormat]] -- Clears all of the variables contained in a Map or Format.=====<br />
=====[[StripFormat]] -- Trims (Strip) leading and trailing spaces from all of the variables contained in a Map or Format.=====<br />
=====[[StripLFormat]] -- Trims (StripL) leading spaces from all of the variables contained in a Map or Format.=====<br />
=====[[StripRFormat]] -- Trims (StripR) trailing spaces from all of the variables contained in a Map or Format.=====<br />
=====[[PadFormat]] -- Pads all of the variables contained in a Map or Format.=====<br />
=====[[UcaseFormat]] -- Converts all of the variables contained in a Map or Format to Upper case.=====<br />
=====[[LcaseFormat]] -- Converts all of the variables contained in a Map or Format to Lower case.=====<br />
=====[[TcaseFormat]] -- Converts all of the variables contained in a Map or Format to Title case.=====<br />
<br />
====New XAP Controls====<br />
=====[[Get Header]] -- Retrieves the whole HTTP Header into a string.=====<br />
=====[[Get Method]] -- Retrieves the method (GET or POST) from the HTML Header.=====<br />
=====[[Get Cookies]] -- Gets all of the Cookies returned from the Browser.=====<br />
=====[[Get Remote]] -- Returns the remote Browser address/name.=====<br />
=====[[Get Query]] -- Retrieves the whole query from the Header or Post Data.=====<br />
=====[[Get PostData]] -- Retrieves Post Data.=====</div>
Jim
http://wiki.signature.net/index.php/StripFormat
StripFormat
2016-06-26T01:44:31Z
<p>Jim: Created page with "'''StripFormat''' '''Syntax:''' StripFormat format-statement-label '''Discussion:''' The StripFormat statement strips leading and trailing spaces from all of the string var..."</p>
<hr />
<div>'''StripFormat'''<br />
<br />
'''Syntax:''' StripFormat format-statement-label <br />
<br />
'''Discussion:''' The StripFormat statement strips leading and trailing spaces from all of the string variables contained in a Map or Format.<br />
<br />
'''Example:'''<br />
<br />
MyFormat: FORMAT a$;b$<br />
<br />
StripFormat MyFormat<br />
<br />
There are also StripLFormat and StripRFormat statements that strip only the leading or trailing spaces from the variables.<br />
<br />
These statements were introduced for Comet32.</div>
Jim
http://wiki.signature.net/index.php/Xap_and_Comet32
Xap and Comet32
2016-06-26T01:44:00Z
<p>Jim: </p>
<hr />
<div>== XAP the Easy, Fast way to Build and Serve Web Pages with Dynamic Comet Content==<br />
<br />
===History===<br />
The first commercially available web page was published in 1995. Signature introduced the protocol lnown as XAP in 1998. XAP stands for eXtended Application Pages. It is the way to publish pages containing Your comet data.<br />
<br />
The original XAP worked (and works) fine, although it is somewhat tedious to populate a web page with data. With the new functionality available in XAP2 and Comet32, this task is MUCH easier.<br />
<br />
===The Anatomy of a Web transaction===<br />
<br />
To more fully understand what is required in a web server (that is what XAP is), it is interesting to outline what a single transaction between the browser and the server looks like. For illustration, lets use the web address as '''http://localhost:8080/xap/xaptest/''' as the url. This assumes we have xap running on our local machine. <br />
<br />
====Connect====<br />
<br />
The browser connects to the server. In this case it is connecting to localhost and it is listening to port 8080. Localhost is a universal DNS name for our own machine. its address is 127.0.0.1. This address is available on every windows machine, so it is convenient for everyone to use this address for testing.<br />
<br />
Anyway, the browser connects to port 8080 in our case. The standard port for http is port 80, but in many cases windows takes this port for its own use.<br />
<br />
====The Header====<br />
<br />
Once a connection is made, the browser sends a block of text like this:<br />
<pre><br />
GET /xap/xaptest HTTP/1.1<br />
Host: localhost:8080<br />
Connection: keep-alive<br />
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24<br />
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5<br />
Accept-Encoding: gzip,deflate,sdch<br />
Accept-Language: en-US,en;q=0.8<br />
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3<br />
Cookie: visits=101; loadtime=0.25<br />
</pre><br />
This is known as the HTTP Header. We are not interested in most of this stuff.<br />
<br />
====Our Response====<br />
<br />
We then send back a block of text. That completes the whole HTTP transaction. The parties disconnect, and the server waits for another transaction from anyone.<br />
<br />
====HTTP vs HTML====<br />
<br />
The block of text MAY be comprised of HTML or text in some other format (look at the "Accept:" line above. HTTP is the protocol (Hyper Text Transmission Protocol) and HTML stands for Hyper Text Markup Language.<br />
<br />
====Name/Value Pairs====<br />
'''Everything is names and values.''' Much of the data that comes from the browser is in the form of names and values. Name/Value pairs are delimited with one character and separated with another. The header above is delimited with crlf characters and the names and values are separated by colons. The cookies also are name/value pairs where the delimiter is a semi colon and the separator is an equal sign. The other set of data that we are interested in is the query string. That is delimited by ampersand characters and separated by equal signs.<br />
<br />
===Making it Easy for You===<br />
So, a single transaction with the browser consists of getting some data from it and sending a response back. There are several features of Comet32 that make this process easy.<br />
<br />
====Dynamic Strings====<br />
Comet32 Dynamic strings can be of any length (up to 4 GB or so). Data can be put into these strings without worry of overflowing. We can even read a whole file into a string for further processing. See [[IB_Statements/InputFile_and_PrintFile| '''InputFile''']].<br />
<br />
====Templates====<br />
Most of the data going to the browser is HTML. It is convenient to keep this HTML in a template. The template is divided into sections that will be handled separately by the program. Comet32 makes it easy to split a template into its sections and manipulate the section before sending it to the browser.<br />
<br />
====The Map Statement====<br />
Comet32 introduces the MAP statement which looks much like a format statement but is used to associate names with variables in your program (Values). The MAP statement is used in several high level functions and statements that make web programming easy (see below).<br />
<br />
====New String Functions====<br />
=====[[Replace]] -- Replaces names in a string with corresponding values.=====<br />
=====[[GetMap]] -- Using a MAP, retrieves values from a string.=====<br />
=====[[Tcase]] -- Title case.=====<br />
=====[[UrlDecode]] -- Decodes a string which was URL Encoded by the Browser.=====<br />
=====[[UrlEncode]] -- Encodes a string making it suitable for an html server.=====<br />
=====[[MapDecode]] -- URLDecodes all of the values in a MAP.=====<br />
=====[[ClearFormat]] -- Clears all of the variables contained in a Map or Format.=====<br />
=====[[StripFormat]] -- Trims (Strip) leading and trailing spaces from all of the variables contained in a Map or Format.=====<br />
=====[[StripLFormat]] -- Trims (StripL) leading spaces from all of the variables contained in a Map or Format.=====<br />
=====[[StripRFormat]] -- Trims (StripR) trailing spaces from all of the variables contained in a Map or Format.=====<br />
=====[[PadFormat]] -- Pads all of the variables contained in a Map or Format.=====<br />
=====[[UcaseFormat]] -- Converts all of the variables contained in a Map or Format to Upper case.=====<br />
=====[[LcaseFormat]] -- Converts all of the variables contained in a Map or Format to Lower case.=====<br />
=====[[TcaseFormat]] -- Converts all of the variables contained in a Map or Format to Title case.=====<br />
<br />
====New XAP Controls====<br />
=====[[Get Header]] -- Retrieves the whole HTTP Header into a string.=====<br />
=====[[Get Method]] -- Retrieves the method (GET or POST) from the HTML Header.=====<br />
=====[[Get Cookies]] -- Gets all of the Cookies returned from the Browser.=====<br />
=====[[Get Remote]] -- Returns the remote Browser address/name.=====<br />
=====[[Get Query]] -- Retrieves the whole query from the Header or Post Data.=====<br />
=====[[Get PostData]] -- Retrieves Post Data.=====<br />
<br />
===Persistant Pages===<br />
====XAP Events====<br />
====The Timer====</div>
Jim
http://wiki.signature.net/index.php/ClearFormat
ClearFormat
2016-06-26T01:37:33Z
<p>Jim: initial page</p>
<hr />
<div>'''ClearFormat'''<br />
<br />
'''Syntax:''' ClearFormat format-statement-label<br />
<br />
'''Discussion:''' The ClearFormat statement Clears all of the variables contained in a Map or Format.<br />
<br />
'''Example:'''<br />
<br />
MyFormat: FORMAT a$;b$<br />
<br />
ClearFormat MyFormat</div>
Jim
http://wiki.signature.net/index.php/StripRFormat
StripRFormat
2016-06-26T01:31:20Z
<p>Jim: initial page</p>
<hr />
<div>'''StripRFormat'''<br />
<br />
'''Syntax:''' StripRFormat format-statement-label <br />
<br />
'''Discussion:''' The StripRFormat statement strips leading spaces from all of the string variables contained in a Map or Format.<br />
<br />
'''Example:'''<br />
<br />
MyFormat: FORMAT a$;b$<br />
<br />
StripRFormat MyFormat<br />
<br />
There are also StripFormat and StripLFormat statements that strip either/both leading and trailing spaces from the variables.<br />
<br />
These statements were introduced for Comet32.</div>
Jim
http://wiki.signature.net/index.php/StripLFormat
StripLFormat
2016-06-26T01:29:28Z
<p>Jim: init</p>
<hr />
<div>'''StripLFormat'''<br />
<br />
'''Syntax:''' StripLFormat format-statement-label <br />
<br />
'''Discussion:''' The StripLFormat statement strips leading spaces from all of the string variables contained in a Map or Format.<br />
<br />
'''Example:'''<br />
<br />
MyFormat: FORMAT a$;b$<br />
<br />
StripLFormat MyFormat<br />
<br />
There are also StripFormat and StripRFormat statements that strip both leading and trailing spaces from the variables.<br />
<br />
These statements were introduced for Comet32.</div>
Jim
http://wiki.signature.net/index.php/Xap_and_Comet32
Xap and Comet32
2016-06-26T01:22:24Z
<p>Jim: rename from xap2 page</p>
<hr />
<div>== XAP the Easy, Fast way to Build and Serve Web Pages with Dynamic Comet Content==<br />
<br />
===History===<br />
The first commercially available web page was published in 1995. Signature introduced the protocol lnown as XAP in 1998. XAP stands for eXtended Application Pages. It is the way to publish pages containing Your comet data.<br />
<br />
The original XAP worked (and works) fine, although it is somewhat tedious to populate a web page with data. With the new functionality available in XAP2 and Comet32, this task is MUCH easier.<br />
<br />
===The Anatomy of a Web transaction===<br />
<br />
To more fully understand what is required in a web server (that is what XAP is), it is interesting to outline what a single transaction between the browser and the server looks like. For illustration, lets use the web address as '''http://localhost:8080/xap/xaptest/''' as the url. This assumes we have xap running on our local machine. <br />
<br />
====Connect====<br />
<br />
The browser connects to the server. In this case it is connecting to localhost and it is listening to port 8080. Localhost is a universal DNS name for our own machine. its address is 127.0.0.1. This address is available on every windows machine, so it is convenient for everyone to use this address for testing.<br />
<br />
Anyway, the browser connects to port 8080 in our case. The standard port for http is port 80, but in many cases windows takes this port for its own use.<br />
<br />
====The Header====<br />
<br />
Once a connection is made, the browser sends a block of text like this:<br />
<pre><br />
GET /xap/xaptest HTTP/1.1<br />
Host: localhost:8080<br />
Connection: keep-alive<br />
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24<br />
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5<br />
Accept-Encoding: gzip,deflate,sdch<br />
Accept-Language: en-US,en;q=0.8<br />
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3<br />
Cookie: visits=101; loadtime=0.25<br />
</pre><br />
This is known as the HTTP Header. We are not interested in most of this stuff.<br />
<br />
====Our Response====<br />
<br />
We then send back a block of text. That completes the whole HTTP transaction. The parties disconnect, and the server waits for another transaction from anyone.<br />
<br />
====HTTP vs HTML====<br />
<br />
The block of text MAY be comprised of HTML or text in some other format (look at the "Accept:" line above. HTTP is the protocol (Hyper Text Transmission Protocol) and HTML stands for Hyper Text Markup Language.<br />
<br />
====Name/Value Pairs====<br />
'''Everything is names and values.''' Much of the data that comes from the browser is in the form of names and values. Name/Value pairs are delimited with one character and separated with another. The header above is delimited with crlf characters and the names and values are separated by colons. The cookies also are name/value pairs where the delimiter is a semi colon and the separator is an equal sign. The other set of data that we are interested in is the query string. That is delimited by ampersand characters and separated by equal signs.<br />
<br />
===Making it Easy for You===<br />
So, a single transaction with the browser consists of getting some data from it and sending a response back. There are several features of Comet32 that make this process easy.<br />
<br />
====Dynamic Strings====<br />
Comet32 Dynamic strings can be of any length (up to 4 GB or so). Data can be put into these strings without worry of overflowing. We can even read a whole file into a string for further processing. See [[IB_Statements/InputFile_and_PrintFile| '''InputFile''']].<br />
<br />
====Templates====<br />
Most of the data going to the browser is HTML. It is convenient to keep this HTML in a template. The template is divided into sections that will be handled separately by the program. Comet32 makes it easy to split a template into its sections and manipulate the section before sending it to the browser.<br />
<br />
====The Map Statement====<br />
Comet32 introduces the MAP statement which looks much like a format statement but is used to associate names with variables in your program (Values). The MAP statement is used in several high level functions and statements that make web programming easy (see below).<br />
<br />
====New String Functions====<br />
=====[[Replace]] -- Replaces names in a string with corresponding values.=====<br />
=====[[GetMap]] -- Using a MAP, retrieves values from a string.=====<br />
=====[[Tcase]] -- Title case.=====<br />
=====[[UrlDecode]] -- Decodes a string which was URL Encoded by the Browser.=====<br />
=====[[UrlEncode]] -- Encodes a string making it suitable for an html server.=====<br />
=====[[MapDecode]] -- URLDecodes all of the values in a MAP.=====<br />
=====[[ClearFormat]] -- Clears all of the variables contained in a Map or Format.=====<br />
=====[[IB_Statements/StripFormat]] -- Trims (Strip) leading and trailing spaces from all of the variables contained in a Map or Format.=====<br />
=====[[StripLFormat]] -- Trims (StripL) leading spaces from all of the variables contained in a Map or Format.=====<br />
=====[[StripRFormat]] -- Trims (StripR) trailing spaces from all of the variables contained in a Map or Format.=====<br />
=====[[PadFormat]] -- Pads all of the variables contained in a Map or Format.=====<br />
=====[[UcaseFormat]] -- Converts all of the variables contained in a Map or Format to Upper case.=====<br />
=====[[LcaseFormat]] -- Converts all of the variables contained in a Map or Format to Lower case.=====<br />
=====[[TcaseFormat]] -- Converts all of the variables contained in a Map or Format to Title case.=====<br />
<br />
====New XAP Controls====<br />
=====[[Get Header]] -- Retrieves the whole HTTP Header into a string.=====<br />
=====[[Get Method]] -- Retrieves the method (GET or POST) from the HTML Header.=====<br />
=====[[Get Cookies]] -- Gets all of the Cookies returned from the Browser.=====<br />
=====[[Get Remote]] -- Returns the remote Browser address/name.=====<br />
=====[[Get Query]] -- Retrieves the whole query from the Header or Post Data.=====<br />
=====[[Get PostData]] -- Retrieves Post Data.=====<br />
<br />
===Persistant Pages===<br />
====XAP Events====<br />
====The Timer====</div>
Jim
http://wiki.signature.net/index.php/Main_Page
Main Page
2016-06-26T01:16:43Z
<p>Jim: </p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
On the New Server<br />
* [[Subscription Benefits]]<br />
* Get your questions answered with [[FAQ2010|The Comet2010 FAQ]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet_Meeting_--_March_2015]]<br />
<br />
* [[Comet_Meeting_--_October_2013]]<br />
<br />
* [[Comet_Meeting -- April_2012]]<br />
<br />
* [[Comet Meeting -- October 12, 2010]]<br />
<br />
* [[Comet Meeting -- August 10, 2009]]<br />
<br />
* [[Getting_Started_With_Comet]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[STL_Containers]]<br />
<br />
* [[Xap and Comet32]]<br />
<br />
* [[CometAnywhere Mobile]]<br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Historical Dealer Meetings]]<br />
<br />
*[[Comet And RDP]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim
http://wiki.signature.net/index.php/UrlEncode
UrlEncode
2016-06-16T16:25:44Z
<p>Jim: </p>
<hr />
<div>THIS FUNCTION HAS NOT BEEN IMPLEMENTED YET!!!!<br />
<br />
Changes characters from plain text to characters acceptable for html...<br />
<br />
A$ = URLencode(A$)<br />
<br />
<br />
<pre><br />
""" encodes to "&amp;quot;"<br />
"'" encodes to "&amp;apos;" <br />
"<" encodes to "&amp;lt;" <br />
">" encodes to "&amp;gt;" <br />
"&" encodes to "&amp;amp;" <br />
" " encodes to "+"<br />
";" encodes to "%3B" <br />
"?" encodes to "%3F" <br />
"/" encodes to "%2F" <br />
":" encodes to "%3A" <br />
"#" encodes to "%23" <br />
"&" encodes to "%26" <br />
"=" encodes to "%3D" <br />
"+" encodes to "%2B" <br />
"$" encodes to "%24" <br />
"," encodes to "%2C" <br />
"%" encodes to "%25" <br />
"<" encodes to "%3C" <br />
">" encodes to "%3E" <br />
"~" encodes to "%7E" <br />
"%" encodes to "%25" <br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlEncode
UrlEncode
2016-06-08T16:32:20Z
<p>Jim: </p>
<hr />
<div>THIS FUNCTION HAS NOT BEEN IMPLEMENTED YET!!!!<br />
<br />
Changes characters from plain text to characters acceptable for html...<br />
<br />
A$ = URLencode(A$)<br />
<br />
<br />
<pre><br />
""" encodes to "&amp;quot;"<br />
"'" encodes to "&amp;apos;" <br />
"<" encodes to "&amp;lt;" <br />
">" encodes to "&amp;gt;" <br />
"&" encodes to "&amp;amp;" <br />
" " encodes to "+"<br />
" " encodes to "%20" <br />
";" encodes to "%3B" <br />
"?" encodes to "%3F" <br />
"/" encodes to "%2F" <br />
":" encodes to "%3A" <br />
"#" encodes to "%23" <br />
"&" encodes to "%26" <br />
"=" encodes to "%3D" <br />
"+" encodes to "%2B" <br />
"$" encodes to "%24" <br />
"," encodes to "%2C" <br />
"%" encodes to "%25" <br />
"<" encodes to "%3C" <br />
">" encodes to "%3E" <br />
"~" encodes to "%7E" <br />
"%" encodes to "%25" <br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlDecode
UrlDecode
2016-06-08T16:31:26Z
<p>Jim: </p>
<hr />
<div>Changes characters which were encoded by the browser to their ascii equivalents...<br />
<br />
A$ = urldecode(a$)<br />
<br />
<br />
<pre><br />
"&amp;quot;" decodes to """<br />
"&amp;apos;" decodes to "'" <br />
"&amp;lt;" decodes to "<" <br />
"&amp;gt;" decodes to ">" <br />
"&amp;amp;" decodes to "&" <br />
"&amp;nbsp;" decodes to " " <br />
"+" decodes to " "<br />
"%3B" decodes to ";" <br />
"%3F" decodes to "?" <br />
"%2F" decodes to "/" <br />
"%3A" decodes to ":" <br />
"%23" decodes to "#" <br />
"%26" decodes to "&" <br />
"%3D" decodes to "=" <br />
"%2B" decodes to "+" <br />
"%24" decodes to "$" <br />
"%2C" decodes to "," <br />
"%20" or "+" decodes to "<space>"<br />
"%25" decodes to "%"<br />
"%3C" decodes to "<"<br />
"%3E" decodes to ">"<br />
"%7E" decodes to "~"<br />
"%25" decodes to "%"<br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlDecode
UrlDecode
2016-06-04T19:44:50Z
<p>Jim: </p>
<hr />
<div>Changes characters which were encoded by the browser to their ascii equivalents...<br />
<br />
<pre><br />
"&amp;quot;" decodes to """<br />
"&amp;apos;" decodes to "'" <br />
"&amp;lt;" decodes to "<" <br />
"&amp;gt;" decodes to ">" <br />
"&amp;amp;" decodes to "&" <br />
"&amp;nbsp;" decodes to " " <br />
"+" decodes to " "<br />
"%3B" decodes to ";" <br />
"%3F" decodes to "?" <br />
"%2F" decodes to "/" <br />
"%3A" decodes to ":" <br />
"%23" decodes to "#" <br />
"%26" decodes to "&" <br />
"%3D" decodes to "=" <br />
"%2B" decodes to "+" <br />
"%24" decodes to "$" <br />
"%2C" decodes to "," <br />
"%20" or "+" decodes to "<space>"<br />
"%25" decodes to "%"<br />
"%3C" decodes to "<"<br />
"%3E" decodes to ">"<br />
"%7E" decodes to "~"<br />
"%25" decodes to "%"<br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlEncode
UrlEncode
2016-06-04T19:42:48Z
<p>Jim: added apostrophy</p>
<hr />
<div>THIS FUNCTION HAS NOT BEEN IMPLEMENTED YET!!!!<br />
<br />
Changes characters from plain text to characters acceptable for html...<br />
<br />
<pre><br />
""" encodes to "&amp;quot;"<br />
"'" encodes to "&amp;apos;" <br />
"<" encodes to "&amp;lt;" <br />
">" encodes to "&amp;gt;" <br />
"&" encodes to "&amp;amp;" <br />
" " encodes to "+"<br />
" " encodes to "%20" <br />
";" encodes to "%3B" <br />
"?" encodes to "%3F" <br />
"/" encodes to "%2F" <br />
":" encodes to "%3A" <br />
"#" encodes to "%23" <br />
"&" encodes to "%26" <br />
"=" encodes to "%3D" <br />
"+" encodes to "%2B" <br />
"$" encodes to "%24" <br />
"," encodes to "%2C" <br />
"%" encodes to "%25" <br />
"<" encodes to "%3C" <br />
">" encodes to "%3E" <br />
"~" encodes to "%7E" <br />
"%" encodes to "%25" <br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/Comet32
Comet32
2016-06-04T19:27:29Z
<p>Jim: Added urlencode</p>
<hr />
<div>===Comet32===<br />
=====[[SQL Driver |The MySql Interface Device]] =====<br />
=====[[XML Output|Easy output of XML formatted data]] =====<br />
=====[[CSV Files|Easy Input and Output of CSV Data]] =====<br />
=====[[Crypto|New Cryptographic functions]] =====<br />
=====[[Xap2]]=====<br />
=====The debugger has been Replaced with [[Trace]] statements=====<br />
<br />
===IB Enhancements for Comet32===<br />
<br />
=====[[CometDates | Comet Dates have much more flexability]]=====<br />
=====The size of the user buffer (# buffer) has been increased to 8K.=====<br />
=====Strings may be declared up to 64K in length.=====<br />
=====You may declare a dynamic string that will allocate only the memory required for the current length of the data assigned to it. These strings may be up to 4gb in length. For performance, chunks of memory will be allocated in 64k increments. (Arrays may not be dynamic).=====<br />
=====Numbers may include up to 64 digits; 32 integer and 32 fractional.=====<br />
=====An extensive math package has been added including trig functions, factorial, logs, and exponents.=====<br />
=====Editmasks rules regarding the length of the editmask and the length of the number have been relaxed to reduce runtime errors.=====<br />
=====The maximum array size has been increased to 4.2gb.=====<br />
=====User-defined procs have been implemented. For more info see [[IB_Statements/UserDefinedProcs|User Defined Procs]].=====<br />
<br />
====New instructions have been implemented:====<br />
=====[[IB_Statements/InputFile_and_PrintFile|Input/Print File]]=====<br />
=====[[IB_Statements/UserDefinedProcs|Usr Defined Procs ]]=====<br />
=====[[IB_Statements/GetFormat| Get/Set Format]]=====<br />
=====[[IB_Statements/SearchFile|SearchFile]]=====<br />
=====[[IB_Statements/noexcp|NoExcp]] has been added as an option to EXCP= on file system statements.=====<br />
=====[[IB_Statements/SetTimer|SetTimer]] fires an event while the user is in an input from the keyboard.=====<br />
<br />
<br />
====[[STL Containers]]====<br />
Collections of data can now be stored in a variety of STL Containers (Standard Template Library in C++) that we have provided. Containers are similar to arrays in that they store sequences of data, but are dynamic (meaning the size of the container will expand and contract as needed) and are optimized for more specific purposes. The following containers are available in Comet32:<br />
<br />
=====[[STL_Containers#Vector|Vector]] -- A dynamic array, with indexable content =====<br />
=====[[STL_Containers#List|List]] -- A simple linked list =====<br />
=====[[STL_Containers#Map|Map]] -- An associative array that uses strings as indexes =====<br />
=====[[STL_Containers#Stack|Stack]] -- An indexable linked list, providing LIFO (Last In, First Out) functionality =====<br />
=====[[STL_Containers#Queue|Queue]] -- An indexable linked list, providing FIFO (First In, Last Out) functionality =====<br />
<br />
====New String Functions====<br />
=====[[Replace]] -- Replaces names in a string with corresponding values.=====<br />
=====[[Tcase]] -- Title case. Makes Each Word In The String Have Initial Caps.=====<br />
<br />
====XAP support Statements====<br />
=====[[UrlDecode]] -- Decodes a string which was URL Encoded by the Browser (for xap).=====<br />
=====[[UrlEncode]] -- Encodes a string making it suitable for an html server.=====<br />
=====[[MapDecode]] -- URLDecodes all of the values in a MAP(or xap).=====<br />
<br />
====New XAP Controls====<br />
=====[[Get Header]] -- Retrieves the whole HTTP Header into a string.=====<br />
=====[[Get Method]] -- Retrieves the method (GET or POST) from the HTML Header.=====<br />
=====[[Get Cookies]] -- Gets all of the Cookies returned from the Browser.=====<br />
=====[[Get Remote]] -- Returns the remote Browser address/name.=====<br />
=====[[Get Query]] -- Retrieves the whole query from the Header or Post Data.=====<br />
=====[[Get PostData]] -- Retrieves Post Data.=====<br />
<br />
===Known Problems that We Plan to Consider and/or Address===<br />
<br />
=====ODBC is not supported. Replaced with SQL interface. =====<br />
=====Serial Gateway is not supported. =====<br />
<br />
===Functionality that Will Not Be Part of Comet32===<br />
<br />
=====Common Variables passed between programs are not treated as a contiguous block of memory as in Comet16. Common is passed variable by variable. If the variables do not agree as to length/precision, common passing ends.=====<br />
=====The name of the clock is CL1. Comet16 allowed any name beginning with "CL" to be used.=====<br />
=====The Spool driver has not been implemented. -- ''Not needed, replace with DocMgr''=====<br />
=====Image file support.=====<br />
=====Q-emulation for QICBASIC objects.=====<br />
=====The SORT driver will not be implemented. We have modified the Reporter (version 9.02) to work without it.=====<br />
=====Invalid character substitution in file names=====<br />
=====QSTARTX.=====<br />
=====Inputting a numeric value from the screen works differently under Comet32 than under Comet16. For example if you declare a variable to be 6.2 and you input its value as "5", under Comet16 that would be interpreted as .05 whereas under Comet32 it would be 5.00.=====<br />
======''Hallelujah, never could get operators to understand the old way.--[[User:Badge|badge]] 18:03, 19 May 2009 (UTC)''======<br />
=====Background partitions have been partially implemented.=====<br />
======ACTIVATE and PSTAT have been implemented. ======<br />
======TERMINATE, PCOMM and INTERRUPT have not been implemented.======<br />
======Some form of inter partition communication has yet to be designed.======<br />
=====LUN 0 is to be used solely for either the screen or the XAP driver depending on the configuration. For normal Comet programs, close of LUN 0 is ignored. The terminal may be opened on a LUN other than 0, but all actions on either LUN will apply to the other.=====<br />
<br />
===Differences Between Comet16 Objects and Comet32 Objects===<br />
<br />
<br />
=====It is our intention that your Comet16 objects will run under Comet32 exactly as they do under Comet16. IB has been enhanced for Comet32 so not only will you be able to do more things easier we also may decide to change the functionality of some of the legacy instructions. We welcome your input on these issues as they come up.=====<br />
<br />
<br />
<h3><br />
Recent Changes<br />
</h3><br />
<p><br />
Build 442<br />
*Eliminated trailing null on pdf filename returned in # buffer following close of archive printer.<br />
*Introduction of new ErrorLog file. UTL 11.06 includes a new '''[http://wiki.signature.net/index.php/ErrLog]''' utility for viewing the file.<br />
<p><br />
Build 441<br />
*Corrected problem in SetTimer so you can reset a timer to a new value and restart it.<br />
*Corrected a problem with WAKEUP that caused it to be late.<br />
*Suppress intial (FF) for text and html printers.<br />
*Use of the (LM) modifier in a FORMAT now places the minus sign next to the first digit. In previous releases it included space place holders after the sign to the size of the field.<br />
*Corrected a problem that could cause a crash if an unhandled Comet error occurred in a proc.<br />
<p> <br />
Build 439<br />
*Corrected a problem that wasn't correctly loading numeric array elements in a Comet32 object READ FORMAT correctly. Values for all but the zeroeth element were set to 0.<br />
<p><br />
Build 438<br />
*Corrected a problem which could have caused a hang when getting the result from an API call.<br />
*Corrected a problem that could hang Comet if an ENTERed program wrote to a DES-controlled printer and didn't close the printer before EXITing.<br />
*Corrected some problems in COMMON passing from one C32 program to another.<br />
*Corrected a problem in processing editmasks that could have caused a crash.<br />
*Corrected a problem that could cause a crash if a CONTROL was issued on a LUN that wasn't open.<br />
*E46 is now issued if invalid characters are encountered in numeric fields.<br />
*DSTAT of a device whose name begins with "C" acts like dstat("CL1").<br />
<p><br />
Build 437<br />
*Corrected problem that could have lead to a crash because some system variables were not initialized at startup.<br />
*Corrected a problem in the use of DES programs when the first write included a control.<br />
*Corrected problem that could have caused an invalid path on a busy system which could have resulted in erroneous E61 or E11.<br />
*Fixed a problem in FORMATed READ to an array element. Now the correct element will get the data. Previously the first element would get the data regardless of which element was specified in the FORMAT.<br />
*Enhanced the IB PRINT statement to allow IB expressions in PRINT lists.<br />
<p><br />
Build 435<br />
*Changes in the way COMMON may be passed between programs:<br />
<ul><br />
<li>Common passing between Comet16 programs and Comet32 programs containing MULTI dimensional arrays won't pass the array.<br />
<li>If both programs are Comet16 or Comet32, common passing will work fine.<br />
<li>Single dimension arrays will be passed between Comet16 and Comet32 programs, although the zeroeth element will be lost.</ul><br />
*Use of arrays in programs compiled with Comet32 has changed. Any Comet32 program using arrays should be recompiled with the .435 (or higher) Comet32 compiler. If Comet32 encounters an array reference from an older object you will now be issued an Error 74 which will tell you a recompilation is necessary.<br />
*Variable subscripted array elements are now allowed in a PRINT list.<br />
*Corrected problems doing arithmetic using array elements.<br />
*The (BZ) mnemonic now works properly in Comet32 programs.<br />
<p><br />
Build 434<br />
*Corrected a problem that could have skipped a (FF) if it was the only item in the FORMAT. This effects Comet32 objects only.<br />
*Corrected a problem in CREATE when using a variable for the record size. The value was getting truncated if the variable was declared as larger than 4.0.<br />
*Corrected a problem in detecting an invalid array index.<br />
*Made formatted read/write using repetition count act the same as Comet16 in that any element with a subscript of 0 will be ignored. If the first element used in the format statement has a subscript of 0 and there is a repetition factor present, Comet will produce an excp=50. If no repetition factor is present in the format item, any element of the array can be used.<br />
*Removed the stack dump code when reporting Comet errors. It is still used in the event of a Comet crash.<br />
*Eliminated a CosW crash which could occur if multiple sessions were started in quick succession.<br />
<p><br />
Build 433<br />
* A new $(LOGS) alias has been created for a folder which will contain miscellaneous log files produced by Comet.<br />
* Comet Error E09 will now be issued if an invalid character is detected in a filename.<br />
* Corrected a problem for READ into a FORMAT that contained either constants or system variables. The fields were not being pulled from the correct position in the record buffer.<br />
* Corrected a problem that could have skipped a (FF) if there was data before it in the FORMAT.<br />
* If Comet32 crashes it will attempt to create a log and minidump which will help us track down the source of the problem. These files can be found in the $(LOGS) folder.<br />
* If there's no /LOG command line argument, CosC will now save the Comet.log file in the $(LOGS) folder. If you are using /LOG the log remains in the Windows temp folder.<br />
* Corrected a problem that could have created a CATOOLS folder as CAFILECATOOLS (i.e. missing "\" before CATOOLS). This was happening during CopyFile with "create alias".<br />
* Comet.exe has been rewritten for Comet 2011, including improved algorithm for detecting if MS Redistributables are required.<br />
<p><br />
Build 432<br />
* Corrected a problem with WinSock gateway timing.<br />
* Now allows INPUT into MESSAGE$, DATE$, HELPKEY$, DAY$.<br />
* The key value is now indicated in ErrorLog.csv for Error 32.<br />
* DATE$ is now refreshed when DSTAT of the clock is done.<br />
* Added write functionality to mySQL.<br />
* The /keyfile Comet command line argument now works.<br />
* Corrected a problem with font initialization for pdf printers.<br />
* ACTIVATE corrected to use only partitions configured for background.<br />
* The SUB function will now default to starting position of 1 if the value supplied is less than or equal to zero.<br />
* E50 is now issued for an out of range subscript value for a Comet16 object.<br />
* Corrected a problem preventing hyperlinks from working in some cases.<br />
* Divide by zero errors are no longer logged to ErrorLog.csv.<br />
<p><br />
Build 431<br />
* New (SessionTimeout) mnemonic will automatically shutdown a session after a specified number of minutes. This requires REL version 11.03 or higher.<br />
* Corrected a problem that could have caused a crashed in the printer event handler.<br />
* WAKEUP and PAUSE can now be interrupted by F3.<br />
* Changed the way the Windows printer selection dialog is displayed so that it will be on top of other windows.<br />
Build 430<br />
* Corrected a problem in ROUNDing the result of numeric calculations.<br />
* Corrected the implementation of some mnemonics including (CopyFromClipboard) and (CopyToClipboard)<br />
* E50 no longer erroneously reported for array dimension sizes > 255<br />
* CosM32 compiler now allows use of characters with a value greater than @79@ in string constants. Use of these characters elsewhere will be ignored and treated as if blank.<br />
* Each partition now gets is own instance of CosP to eliminate a TCP/IP printer problem.<br />
* Now uses a cache when printing to a CometAnywhere printer to speedup processing. This change requires supporting changes in CosW.<br />
<p> <br />
Build 429<br />
* Corrected a problem calculating the address of an element in a multi-dimension array.<br />
<p><br />
Build 428<br />
* Corrected a problem that could have caused a crash if an array subscript was out of range.<br />
* Corrected a problem that could have put garbage text in the "User" field of a document archive record. This garbage would be seen in DocMgr.<br />
* The Next User Address and Last System Function fields reported by PSTAT are no longer converted to decimal values.<br />
* Increased the size of a normalized pathname to 259. The previous limit was 60.<br />
<p><br />
Build 427<br />
* Corrected a problem in the NUM function for result fields with a non-zero precision.<br />
* Corrected a problem in the MOD function.<br />
* Comet would hang after an E16. This has been corrected.<br />
* Now uses the "C/R same as Qantel" cfig setting.<br />
* The user's id field is now set for print jobs destined for an archive. This allows DocMgr to display it.<br />
<p><br />
Build 426<br />
* Fixed a problem in passing system variables in the following scenario:<br />
** ENTER a Comet16 program<br />
** RUN a Comet32 program that does an EXIT.<br />
** Previously this could have caused a crash.<br />
* Fixed problem in the DOSRW call used to get the device descriptors. Previously you could only get the first 254 devices.<br />
* Changes to FSTAT for compatibility with Comet16.<br />
* When writing a CSV file and the first strings were empty it was not putting out place-holders. Now it will generate one blank character in that place.<br />
<br />
<p><br />
Build 425<br />
* Introduced new date functions.<br />
* Implemented DOSFC for mkdir.<br />
* Corrected a problem that would crash if you attempted to log out of Comet while background programs were running.<br />
* Corrected a problem with the NUM function that was reporting an error if the field contained a trailing blank.<br />
* Enhanced the NUM function so that it accepts special characters such as ,.()-+ in the input string.<br />
* Corrected problems with the INPUT statement that doesn't require transmit marks (ie the new INPUT).<br />
* Now reports E74 if a Comet32 IB object file is corrupted.<br />
* Comet exception reports for CometAnywhere clients now appear on the client instead of the host.<br />
<p><br />
Build 424<br />
* FSTAT now returns E11 if the file is not found and a directory was not specified. It returns E31 if an invalid directory is specified.<br />
* Corrected a problem with num2date(0,5). It was returning a blank string.<br />
* Background sessions now inherit the activating partition's printers, including # printers.<br />
* Corrected a problem with editing numbers which used (LM) in a FORMAT.<br />
* Corrected a problem with editing numbers which used a length override in a FORMAT compiled for Comet32.<br />
* Corrected a problem with numtodate. Leading zeroes were not preserved.<br />
<p><br />
Build 423<br />
* Comet.exe will now run the Microsoft Visual Studio 2008 Redistributable installation when required for full Comet clients.<br />
* Corrected a problem that could cause a crash if a printer (or other device) was open in a parent program and the LUN was reused for a file in the subprogram.<br />
* Corrected a problem with numeric editing which caused numbers to sometimes be truncated.<br />
* Corrected a problem that could have caused a crash when launching Comet32 automatically on 64-bit Windows systems.<br />
<p><br />
Build 422<br />
* Background partitions can now be ACTIVATEd. The X00 device is automatically open on LUN 0 for these partitions. (See item # 2 below for X00 enhancements.)<br />
* The X00 device can now do (CopyFile), (RenameFile), (EraseFile), (FindFirstFile), (FindNextFile), (FileStatus), (GetDirAlias), (SetDirAlias), (OpenClipboard), and (CloseClipboard). Previously these mnemonics could only be used with LUN 0 which excluded background partitions.<br />
* If a configured directory can't be accessed at startup you'll be notified through a messagebox and an error message will be posted in the Comet log.<br />
* The Msgbox IB function and statement can now be used in background partitions.<br />
* The delimiter used for .csv files can now be specified with the FILE (lun) DLM=char$ statement.<br />
* FILE (lun) NORMAL introduced to reset a file's access from CSV or XML back to normal.<br />
* Added new clipboard mnemonics (OpenClipboard), and (CloseClipboard). An error can occur if the clipboard is opened by another user and there is no good way to convey that in IB. Now you can use (OpenClipboard) first and test for that case and try again. The old method will still work but this is more reliable. Use of these mnemonics requires REL 10.08 or higher.<br />
* Added a new mnemonic (ClearBuffer) to clear the X00 buffer between writes. Use of this mnemonic requires REL 10.08 or higher.<br />
* CosC now detects 64-bit Windows and will launch Comet32 automatically.<br />
<p><br />
Build 421<br />
* FSTAT now returns E11 if the file is not found and a directory was not specified.<br />
* Corrected a problem in the NUM function for Comet32 objects that wasn't returning an error if the last character in the string was invalid.<br />
* Corrected a problem in the STRING function for Comet16 objects that could have resulted in corruption of data in other variables.<br />
* Session colors specified in the configuration file are now used.<br />
<p><br />
Build 420<br />
* Corrected problems with FPT and BASE64.<br />
* Numeric overflow errors (ERR 1) are now ignored just like Comet16.<br />
* Changes required to get CometExplorer's DirBuild to load.<br />
* Fixed a bug that caused a trigger event when resetting a timer that is not running.<br />
* Prevented the changing of a constant when inputting a list of fields.<br />
<p><br />
Build 419<br />
<br />
Comet32:<br />
<br />
* Corrected a problem in passing numeric arguments to a proc.<br />
* CONTAINS result was reversing its TRUE / FALSE result. This has been corrected.<br />
<br />
<p><br />
Build 418<br />
* Added a new SetTimer instruction. This causes an event to be fired to the program<br />
when a specified duration (in milliseconds) has passed.<br />
<p><br />
Build 417<br />
* Corrected a problem with CosM32 that could have caused internal error 91 stack over/under flow error. This was introduced in version .415.<br />
* Introduced Cryptographic Support. This is a major enhancement to the encryption features of Comet. You can now encrypt/decrypt using the best methods known today including RC4, AES and 3DES.<br />
<p> <br />
Build 416<br />
* Corrected a problem that was reporting E25 and E99 in some dialogs<br />
* Fixed a problem that was causing some Windows events to be lost<br />
* Corrected a problem that could have caused a crash when printing<br />
* Corrected a problem that could have caused a crash when using the First IB function to retrieve the first key of a file.<br />
* Changed the handling of the clock device to match that of Comet16. DSTAT of any name beginning with "c" will return the status of the clock. If you wish to OPEN the clock, you must use a filename of "CL1".<br />
<p><br />
Build 415<br />
*New XML file statement introduced to make it easy to output your data in XML format. For more<br />
info, read the XML Output wiki doc.<br />
<br />
*A couple of problems were fixed in SetGlobal and GetGlobal:<br />
** The data is now unique for each partition.<br />
** The data persists thru running of programs. Previously a STOP would clear it.<br />
<br />
<p><br />
Comet 2010.414<br />
<br />
*Corrected a problem that could have caused a crash if an attempt was made to ENTER a program that doesn't exist.<br />
<br />
*Local pathnames are now returned in drive letter form even if the folder is configured using a UNC name. This effects PATH and DSTAT.<br />
<br />
<p><br />
Comet 2010.413<br />
<br />
*Corrected a problem that would have crashed Comet32 if the SQL device was opened.<br />
*Added additional information to the error messagebox for DOS errors.<br />
<br />
<p><br />
Comet 2010.412<br />
<br />
*Increased the size of the task buffer for mySQL to 64K<br />
*Introduced a spool alias for the spool section of the Comet.ini file:<br />
[SPOOLERS]<p><br />
Spool = SP1,$(lac);<p><br />
...<p><br />
[PRINTERS]<p><br />
Printer = Lac,p ,x,SPL:adobe ,Adobe PDF;<p><br />
<br />
This makes it possible to configure a printer called SP1. Previously all printer names needed to begin with "L". If your programs open "SP1" this makes it possible for them to be used with DocMgr without needing to recode them.<br />
<br />
<p><br />
Comet 2010.411<br />
<br />
*Restored the functionality of dynamic ACCESSes which was broken in version .410.<br />
*Corrected a problem handling TERM$ values above T99.<br />
*The NUM function now handles ROUNDed variables correctly.<br />
*Trailing printer controls such as (FF) and (LF) were not getting processed.<br />
<p><br />
Comet 2010.409<br />
<br />
*Several printing problems were corrected.<br />
*Correct a problem that could put the object file from a compiled program in the first accessed directory rather than the specified object directory.<br />
*Enhanced LOG and MSGBOX to accept either a string or a numeric expression as its operand.<br />
<p><br />
Comet 2010.408<br />
<br />
*Miscellaneous printing problems solved plus the addition of support for slave printers.<br />
*Problems corrected in the handling of editmasks.<br />
*Problem corrected for GetGlobal.<br />
*Problem corrected for formatted writes to CSV files.<br />
*Problems corrected in SetBit and TestBit.<br />
*Eliminated a problem that could cause a Windows event to be dropped for dialog programs.<br />
*Corrected the formatting of the spool name info returned by the DosRw 0xffe6 call (GetDDInfo)<br />
<p><br />
Comet 2010.407<br />
<br />
*Added mySQL driver.<br />
*Changes required for (GetSlavePrinterName).<br />
*Corrected a problem using mnemonics on a printer with an associated DES.<br />
*Changed numeric input in Comet16 objects to ignore precision just like Comet16.<br />
<p><br />
Comet 2010.406<br />
<br />
*Will now automatically run SYSGEN if no .cfg file is available. No special command line arguments are required for this to happen.<br />
*Corrected a problem in handling the (BZ) mnemonic<br />
*Introduced support for Windows 7 and Server 2008 R2<br />
<p><br />
Comet 2009.404<br />
<br />
*Rewrote the editmask processing code.<br />
*Screen mnemonics followed by a comma and positioner now work properly.<br />
*New Comet Error E86 will be issued if an attempt is made to read or write an image file.<br />
*Corrected a problem in the compiler that would cause a crash if many include files were used.<br />
*Constant editmasks are no longer evaluated by the compiler. All checking is done at runtime.<br />
*The LockDabs statement is now supported by the compiler.<br />
<br />
<p><br />
Comet 2009.403<br />
<br />
*Implemented WinSock driver<br />
*Duplicated the Comet16 positioning and spacing of numeric output. Previously programs run under Comet32 that output numeric values were not aligned properly.<br />
*Compilation errors involving undefined labels are now reported properly thru CAPI when compiling from UltraEdit.<br />
<br />
<p><br />
Comet 2009.402<br />
<br />
*Implemented a Comet32 error log. errorlog.csv will be created in the COS directory.<br />
*Implemented document archives (for DocMgr).<br />
*Corrected a problem that was causing Windows message events to sometimes be dropped.<br />
*Added a color square on the right side of the status line of the Comet window indicating whether the current program object was compiled with Comet16 or Comet32. The indicator is blue for Comet16 objects and green for Comet32 objects.<br />
*Implemented changes required for DbMgr, ViewMgr, and DBX<br />
*Implemented changes required for server snapshot utility<br />
<br />
<p><br />
Comet 2009.401:<br />
<br />
*Implemented CURPOS.<br />
*Implemented support for contiguous files.<br />
*Implemented NOVA / SNOVA functionality.<br />
*Recoded the str function for Comet32 so it emulates the Comet16 one.<br />
*Implemented the shortpath DOSMS function.<br />
*Implemented the CometAnywhere update mechanism.<br />
<br />
<p><br />
Comet 2009.400:<br />
<br />
*Improved printer functionality including pdf printers.<br />
*Improvements in the functionality of dialog-based programs. Try DlgDemo.<br />
*Improvements in GDI operations such as wallpaper.<br />
<br />
<h3><br />
Please Add any other issues you see with this product here<br />
</h3><br />
<ul><br />
<li> <br />
<br />
<br />
</ul></div>
Jim
http://wiki.signature.net/index.php/UrlEncode
UrlEncode
2016-06-04T19:24:51Z
<p>Jim: </p>
<hr />
<div>THIS FUNCTION HAS NOT BEEN IMPLEMENTED YET!!!!<br />
<br />
Changes characters from plain text to characters acceptable for html...<br />
<br />
<pre><br />
""" encodes to "&amp;quot;" " <br />
"<" encodes to "&amp;lt;" <br />
">" encodes to "&amp;gt;" <br />
"&" encodes to "&amp;amp;" <br />
" " encodes to "+"<br />
" " encodes to "%20" <br />
";" encodes to "%3B" <br />
"?" encodes to "%3F" <br />
"/" encodes to "%2F" <br />
":" encodes to "%3A" <br />
"#" encodes to "%23" <br />
"&" encodes to "%26" <br />
"=" encodes to "%3D" <br />
"+" encodes to "%2B" <br />
"$" encodes to "%24" <br />
"," encodes to "%2C" <br />
"%" encodes to "%25" <br />
"<" encodes to "%3C" <br />
">" encodes to "%3E" <br />
"~" encodes to "%7E" <br />
"%" encodes to "%25" <br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlEncode
UrlEncode
2016-06-04T19:23:11Z
<p>Jim: </p>
<hr />
<div>THIS FUNCTION HAS NOT BEEN IMPLEMENTED YET!!!!<br />
<br />
Changes characters from plain text to characters acceptable for html...<br />
<br />
<pre><br />
""" encodes to "&amp;quot;" " <br />
"<" encodes to "&amp;lt;" <br />
">" encodes to "&amp;gt;" <br />
"&" encodes to "&amp;amp;" <br />
" " encodes to "+" <br />
";" encodes to "%3B" <br />
"?" encodes to "%3F" <br />
"/" encodes to "%2F" <br />
":" encodes to "%3A" <br />
"#" encodes to "%23" <br />
"&" encodes to "%26" <br />
"=" encodes to "%3D" <br />
"+" encodes to "%2B" <br />
"$" encodes to "%24" <br />
"," encodes to "%2C" <br />
"%" encodes to "%25" <br />
"<" encodes to "%3C" <br />
">" encodes to "%3E" <br />
"~" encodes to "%7E" <br />
"%" encodes to "%25" <br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlEncode
UrlEncode
2016-06-04T19:22:18Z
<p>Jim: </p>
<hr />
<div>Changes characters from plain text to characters acceptable for html...<br />
<br />
<pre><br />
""" encodes to "&amp;quot;" " <br />
"<" encodes to "&amp;lt;" <br />
">" encodes to "&amp;gt;" <br />
"&" encodes to "&amp;amp;" <br />
" " encodes to "+" <br />
";" encodes to "%3B" <br />
"?" encodes to "%3F" <br />
"/" encodes to "%2F" <br />
":" encodes to "%3A" <br />
"#" encodes to "%23" <br />
"&" encodes to "%26" <br />
"=" encodes to "%3D" <br />
"+" encodes to "%2B" <br />
"$" encodes to "%24" <br />
"," encodes to "%2C" <br />
"%" encodes to "%25" <br />
"<" encodes to "%3C" <br />
">" encodes to "%3E" <br />
"~" encodes to "%7E" <br />
"%" encodes to "%25" <br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlEncode
UrlEncode
2016-06-04T19:20:45Z
<p>Jim: init</p>
<hr />
<div>Changes characters from plain text to characters acceptable for html...<br />
<br />
<pre><br />
""" encodes to "&amp;quot;" " <br />
"<" encodes to "&amp;lt;" <br />
">" encodes to "&amp;gt;" <br />
"&" encodes to "&amp;amp;" <br />
" " encodes to "&amp;nbsp;" <br />
" " encodes to "+" <br />
";" encodes to "%3B" <br />
"?" encodes to "%3F" <br />
"/" encodes to "%2F" <br />
":" encodes to "%3A" <br />
"#" encodes to "%23" <br />
"&" encodes to "%26" <br />
"=" encodes to "%3D" <br />
"+" encodes to "%2B" <br />
"$" encodes to "%24" <br />
"," encodes to "%2C" <br />
"%" encodes to "%25" <br />
"<" encodes to "%3C" <br />
">" encodes to "%3E" <br />
"~" encodes to "%7E" <br />
"%" encodes to "%25" <br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlDecode
UrlDecode
2016-06-04T19:12:38Z
<p>Jim: better explanation</p>
<hr />
<div>Changes characters which were encoded by the browser to their ascii equivalents...<br />
<br />
<pre><br />
"&amp;quot;" decodes to """ <br />
"&amp;lt;" decodes to "<" <br />
"&amp;gt;" decodes to ">" <br />
"&amp;amp;" decodes to "&" <br />
"&amp;nbsp;" decodes to " " <br />
"+" decodes to " "<br />
"%3B" decodes to ";" <br />
"%3F" decodes to "?" <br />
"%2F" decodes to "/" <br />
"%3A" decodes to ":" <br />
"%23" decodes to "#" <br />
"%26" decodes to "&" <br />
"%3D" decodes to "=" <br />
"%2B" decodes to "+" <br />
"%24" decodes to "$" <br />
"%2C" decodes to "," <br />
"%20" or "+" decodes to "<space>"<br />
"%25" decodes to "%"<br />
"%3C" decodes to "<"<br />
"%3E" decodes to ">"<br />
"%7E" decodes to "~"<br />
"%25" decodes to "%"<br />
Note that because the <space> character is very commonly used, a special code ( the "+" sign) <br />
has been reserved as its URL encoding. <br />
Thus the string "A B" can be URL encoded as either "A%20B" or "A+B".<br />
<br />
<br />
<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/IB_Statements/noexcp
IB Statements/noexcp
2016-06-04T18:07:15Z
<p>Jim: explained use of noexcp better</p>
<hr />
<div>'''NOEXCP option on file system statements'''<br />
<br />
Parameter: NOEXCP<br />
<br />
Discussion:<br />
Introduced with Comet32 this parameter may be used in file system statements to specify that if a non-fatal runtime exception occurs it should be ignored.<br> This option is available for: <br />
ERASE,<br />
ENTER,<br />
EXTRACT,<br />
CREATE,<br />
CREATEKEY,<br />
DELETE,<br />
INPUT,<br />
INPUTFILE,<br />
INQUIRE,<br />
INSERT,<br />
POSITION,<br />
PRINTFILE,<br />
PRINT,<br />
OPEN,<br />
UPDATE,<br />
READ,<br />
RENAME,<br />
REWRITE,<br />
RUN,<br />
LOCK,<br />
UNLOCK,<br />
WRITE.<br />
<br />
For information about handling specific exceptions, see Exception Handling. <br />
<br />
Note that the EXCP variable will still contain the last exception encountered, and will not be set to zero. This allows a form of "goto less programming"<br />
<br />
Also see [[IB_Statements/excpsub|ExcpSub]]<br />
<br />
'''Example:'''<br />
<br />
EXCP=0<br />
ERASE file$ dir=dir$ NOEXCP<br />
CREATE file$ dir=dir$ NOEXCP<br />
Close(LUN) & OPEN(LUN)file$ dir=dir$ NOEXCP<br />
if EXCP ne 0 print 'got an error ';EXCP;' creating ';file$<br />
<br />
<br />
See [[System_Variables|System Variables]] and [[IB_Statements/EXCP|Excp]] for more information.</div>
Jim
http://wiki.signature.net/index.php/Comet32
Comet32
2016-06-03T19:26:18Z
<p>Jim: </p>
<hr />
<div>===Comet32===<br />
=====[[SQL Driver |The MySql Interface Device]] =====<br />
=====[[XML Output|Easy output of XML formatted data]] =====<br />
=====[[CSV Files|Easy Input and Output of CSV Data]] =====<br />
=====[[Crypto|New Cryptographic functions]] =====<br />
=====[[Xap2]]=====<br />
=====The debugger has been Replaced with [[Trace]] statements=====<br />
<br />
===IB Enhancements for Comet32===<br />
<br />
=====[[CometDates | Comet Dates have much more flexability]]=====<br />
=====The size of the user buffer (# buffer) has been increased to 8K.=====<br />
=====Strings may be declared up to 64K in length.=====<br />
=====You may declare a dynamic string that will allocate only the memory required for the current length of the data assigned to it. These strings may be up to 4gb in length. For performance, chunks of memory will be allocated in 64k increments. (Arrays may not be dynamic).=====<br />
=====Numbers may include up to 64 digits; 32 integer and 32 fractional.=====<br />
=====An extensive math package has been added including trig functions, factorial, logs, and exponents.=====<br />
=====Editmasks rules regarding the length of the editmask and the length of the number have been relaxed to reduce runtime errors.=====<br />
=====The maximum array size has been increased to 4.2gb.=====<br />
=====User-defined procs have been implemented. For more info see [[IB_Statements/UserDefinedProcs|User Defined Procs]].=====<br />
<br />
====New instructions have been implemented:====<br />
=====[[IB_Statements/InputFile_and_PrintFile|Input/Print File]]=====<br />
=====[[IB_Statements/UserDefinedProcs|Usr Defined Procs ]]=====<br />
=====[[IB_Statements/GetFormat| Get/Set Format]]=====<br />
=====[[IB_Statements/SearchFile|SearchFile]]=====<br />
=====[[IB_Statements/noexcp|NoExcp]] has been added as an option to EXCP= on file system statements.=====<br />
=====[[IB_Statements/SetTimer|SetTimer]] fires an event while the user is in an input from the keyboard.=====<br />
<br />
<br />
====[[STL Containers]]====<br />
Collections of data can now be stored in a variety of STL Containers (Standard Template Library in C++) that we have provided. Containers are similar to arrays in that they store sequences of data, but are dynamic (meaning the size of the container will expand and contract as needed) and are optimized for more specific purposes. The following containers are available in Comet32:<br />
<br />
=====[[STL_Containers#Vector|Vector]] -- A dynamic array, with indexable content =====<br />
=====[[STL_Containers#List|List]] -- A simple linked list =====<br />
=====[[STL_Containers#Map|Map]] -- An associative array that uses strings as indexes =====<br />
=====[[STL_Containers#Stack|Stack]] -- An indexable linked list, providing LIFO (Last In, First Out) functionality =====<br />
=====[[STL_Containers#Queue|Queue]] -- An indexable linked list, providing FIFO (First In, Last Out) functionality =====<br />
<br />
====New String Functions====<br />
=====[[Replace]] -- Replaces names in a string with corresponding values.=====<br />
=====[[Tcase]] -- Title case. Makes Each Word In The String Have Initial Caps.=====<br />
<br />
====XAP support Statements====<br />
=====[[UrlDecode]] -- Decodes a string which was URL Encoded by the Browser (for xap).=====<br />
=====[[MapDecode]] -- URLDecodes all of the values in a MAP(or xap).=====<br />
<br />
====New XAP Controls====<br />
=====[[Get Header]] -- Retrieves the whole HTTP Header into a string.=====<br />
=====[[Get Method]] -- Retrieves the method (GET or POST) from the HTML Header.=====<br />
=====[[Get Cookies]] -- Gets all of the Cookies returned from the Browser.=====<br />
=====[[Get Remote]] -- Returns the remote Browser address/name.=====<br />
=====[[Get Query]] -- Retrieves the whole query from the Header or Post Data.=====<br />
=====[[Get PostData]] -- Retrieves Post Data.=====<br />
<br />
===Known Problems that We Plan to Consider and/or Address===<br />
<br />
=====ODBC is not supported. Replaced with SQL interface. =====<br />
=====Serial Gateway is not supported. =====<br />
<br />
===Functionality that Will Not Be Part of Comet32===<br />
<br />
=====Common Variables passed between programs are not treated as a contiguous block of memory as in Comet16. Common is passed variable by variable. If the variables do not agree as to length/precision, common passing ends.=====<br />
=====The name of the clock is CL1. Comet16 allowed any name beginning with "CL" to be used.=====<br />
=====The Spool driver has not been implemented. -- ''Not needed, replace with DocMgr''=====<br />
=====Image file support.=====<br />
=====Q-emulation for QICBASIC objects.=====<br />
=====The SORT driver will not be implemented. We have modified the Reporter (version 9.02) to work without it.=====<br />
=====Invalid character substitution in file names=====<br />
=====QSTARTX.=====<br />
=====Inputting a numeric value from the screen works differently under Comet32 than under Comet16. For example if you declare a variable to be 6.2 and you input its value as "5", under Comet16 that would be interpreted as .05 whereas under Comet32 it would be 5.00.=====<br />
======''Hallelujah, never could get operators to understand the old way.--[[User:Badge|badge]] 18:03, 19 May 2009 (UTC)''======<br />
=====Background partitions have been partially implemented.=====<br />
======ACTIVATE and PSTAT have been implemented. ======<br />
======TERMINATE, PCOMM and INTERRUPT have not been implemented.======<br />
======Some form of inter partition communication has yet to be designed.======<br />
=====LUN 0 is to be used solely for either the screen or the XAP driver depending on the configuration. For normal Comet programs, close of LUN 0 is ignored. The terminal may be opened on a LUN other than 0, but all actions on either LUN will apply to the other.=====<br />
<br />
===Differences Between Comet16 Objects and Comet32 Objects===<br />
<br />
<br />
=====It is our intention that your Comet16 objects will run under Comet32 exactly as they do under Comet16. IB has been enhanced for Comet32 so not only will you be able to do more things easier we also may decide to change the functionality of some of the legacy instructions. We welcome your input on these issues as they come up.=====<br />
<br />
<br />
<h3><br />
Recent Changes<br />
</h3><br />
<p><br />
Build 442<br />
*Eliminated trailing null on pdf filename returned in # buffer following close of archive printer.<br />
*Introduction of new ErrorLog file. UTL 11.06 includes a new '''[http://wiki.signature.net/index.php/ErrLog]''' utility for viewing the file.<br />
<p><br />
Build 441<br />
*Corrected problem in SetTimer so you can reset a timer to a new value and restart it.<br />
*Corrected a problem with WAKEUP that caused it to be late.<br />
*Suppress intial (FF) for text and html printers.<br />
*Use of the (LM) modifier in a FORMAT now places the minus sign next to the first digit. In previous releases it included space place holders after the sign to the size of the field.<br />
*Corrected a problem that could cause a crash if an unhandled Comet error occurred in a proc.<br />
<p> <br />
Build 439<br />
*Corrected a problem that wasn't correctly loading numeric array elements in a Comet32 object READ FORMAT correctly. Values for all but the zeroeth element were set to 0.<br />
<p><br />
Build 438<br />
*Corrected a problem which could have caused a hang when getting the result from an API call.<br />
*Corrected a problem that could hang Comet if an ENTERed program wrote to a DES-controlled printer and didn't close the printer before EXITing.<br />
*Corrected some problems in COMMON passing from one C32 program to another.<br />
*Corrected a problem in processing editmasks that could have caused a crash.<br />
*Corrected a problem that could cause a crash if a CONTROL was issued on a LUN that wasn't open.<br />
*E46 is now issued if invalid characters are encountered in numeric fields.<br />
*DSTAT of a device whose name begins with "C" acts like dstat("CL1").<br />
<p><br />
Build 437<br />
*Corrected problem that could have lead to a crash because some system variables were not initialized at startup.<br />
*Corrected a problem in the use of DES programs when the first write included a control.<br />
*Corrected problem that could have caused an invalid path on a busy system which could have resulted in erroneous E61 or E11.<br />
*Fixed a problem in FORMATed READ to an array element. Now the correct element will get the data. Previously the first element would get the data regardless of which element was specified in the FORMAT.<br />
*Enhanced the IB PRINT statement to allow IB expressions in PRINT lists.<br />
<p><br />
Build 435<br />
*Changes in the way COMMON may be passed between programs:<br />
<ul><br />
<li>Common passing between Comet16 programs and Comet32 programs containing MULTI dimensional arrays won't pass the array.<br />
<li>If both programs are Comet16 or Comet32, common passing will work fine.<br />
<li>Single dimension arrays will be passed between Comet16 and Comet32 programs, although the zeroeth element will be lost.</ul><br />
*Use of arrays in programs compiled with Comet32 has changed. Any Comet32 program using arrays should be recompiled with the .435 (or higher) Comet32 compiler. If Comet32 encounters an array reference from an older object you will now be issued an Error 74 which will tell you a recompilation is necessary.<br />
*Variable subscripted array elements are now allowed in a PRINT list.<br />
*Corrected problems doing arithmetic using array elements.<br />
*The (BZ) mnemonic now works properly in Comet32 programs.<br />
<p><br />
Build 434<br />
*Corrected a problem that could have skipped a (FF) if it was the only item in the FORMAT. This effects Comet32 objects only.<br />
*Corrected a problem in CREATE when using a variable for the record size. The value was getting truncated if the variable was declared as larger than 4.0.<br />
*Corrected a problem in detecting an invalid array index.<br />
*Made formatted read/write using repetition count act the same as Comet16 in that any element with a subscript of 0 will be ignored. If the first element used in the format statement has a subscript of 0 and there is a repetition factor present, Comet will produce an excp=50. If no repetition factor is present in the format item, any element of the array can be used.<br />
*Removed the stack dump code when reporting Comet errors. It is still used in the event of a Comet crash.<br />
*Eliminated a CosW crash which could occur if multiple sessions were started in quick succession.<br />
<p><br />
Build 433<br />
* A new $(LOGS) alias has been created for a folder which will contain miscellaneous log files produced by Comet.<br />
* Comet Error E09 will now be issued if an invalid character is detected in a filename.<br />
* Corrected a problem for READ into a FORMAT that contained either constants or system variables. The fields were not being pulled from the correct position in the record buffer.<br />
* Corrected a problem that could have skipped a (FF) if there was data before it in the FORMAT.<br />
* If Comet32 crashes it will attempt to create a log and minidump which will help us track down the source of the problem. These files can be found in the $(LOGS) folder.<br />
* If there's no /LOG command line argument, CosC will now save the Comet.log file in the $(LOGS) folder. If you are using /LOG the log remains in the Windows temp folder.<br />
* Corrected a problem that could have created a CATOOLS folder as CAFILECATOOLS (i.e. missing "\" before CATOOLS). This was happening during CopyFile with "create alias".<br />
* Comet.exe has been rewritten for Comet 2011, including improved algorithm for detecting if MS Redistributables are required.<br />
<p><br />
Build 432<br />
* Corrected a problem with WinSock gateway timing.<br />
* Now allows INPUT into MESSAGE$, DATE$, HELPKEY$, DAY$.<br />
* The key value is now indicated in ErrorLog.csv for Error 32.<br />
* DATE$ is now refreshed when DSTAT of the clock is done.<br />
* Added write functionality to mySQL.<br />
* The /keyfile Comet command line argument now works.<br />
* Corrected a problem with font initialization for pdf printers.<br />
* ACTIVATE corrected to use only partitions configured for background.<br />
* The SUB function will now default to starting position of 1 if the value supplied is less than or equal to zero.<br />
* E50 is now issued for an out of range subscript value for a Comet16 object.<br />
* Corrected a problem preventing hyperlinks from working in some cases.<br />
* Divide by zero errors are no longer logged to ErrorLog.csv.<br />
<p><br />
Build 431<br />
* New (SessionTimeout) mnemonic will automatically shutdown a session after a specified number of minutes. This requires REL version 11.03 or higher.<br />
* Corrected a problem that could have caused a crashed in the printer event handler.<br />
* WAKEUP and PAUSE can now be interrupted by F3.<br />
* Changed the way the Windows printer selection dialog is displayed so that it will be on top of other windows.<br />
Build 430<br />
* Corrected a problem in ROUNDing the result of numeric calculations.<br />
* Corrected the implementation of some mnemonics including (CopyFromClipboard) and (CopyToClipboard)<br />
* E50 no longer erroneously reported for array dimension sizes > 255<br />
* CosM32 compiler now allows use of characters with a value greater than @79@ in string constants. Use of these characters elsewhere will be ignored and treated as if blank.<br />
* Each partition now gets is own instance of CosP to eliminate a TCP/IP printer problem.<br />
* Now uses a cache when printing to a CometAnywhere printer to speedup processing. This change requires supporting changes in CosW.<br />
<p> <br />
Build 429<br />
* Corrected a problem calculating the address of an element in a multi-dimension array.<br />
<p><br />
Build 428<br />
* Corrected a problem that could have caused a crash if an array subscript was out of range.<br />
* Corrected a problem that could have put garbage text in the "User" field of a document archive record. This garbage would be seen in DocMgr.<br />
* The Next User Address and Last System Function fields reported by PSTAT are no longer converted to decimal values.<br />
* Increased the size of a normalized pathname to 259. The previous limit was 60.<br />
<p><br />
Build 427<br />
* Corrected a problem in the NUM function for result fields with a non-zero precision.<br />
* Corrected a problem in the MOD function.<br />
* Comet would hang after an E16. This has been corrected.<br />
* Now uses the "C/R same as Qantel" cfig setting.<br />
* The user's id field is now set for print jobs destined for an archive. This allows DocMgr to display it.<br />
<p><br />
Build 426<br />
* Fixed a problem in passing system variables in the following scenario:<br />
** ENTER a Comet16 program<br />
** RUN a Comet32 program that does an EXIT.<br />
** Previously this could have caused a crash.<br />
* Fixed problem in the DOSRW call used to get the device descriptors. Previously you could only get the first 254 devices.<br />
* Changes to FSTAT for compatibility with Comet16.<br />
* When writing a CSV file and the first strings were empty it was not putting out place-holders. Now it will generate one blank character in that place.<br />
<br />
<p><br />
Build 425<br />
* Introduced new date functions.<br />
* Implemented DOSFC for mkdir.<br />
* Corrected a problem that would crash if you attempted to log out of Comet while background programs were running.<br />
* Corrected a problem with the NUM function that was reporting an error if the field contained a trailing blank.<br />
* Enhanced the NUM function so that it accepts special characters such as ,.()-+ in the input string.<br />
* Corrected problems with the INPUT statement that doesn't require transmit marks (ie the new INPUT).<br />
* Now reports E74 if a Comet32 IB object file is corrupted.<br />
* Comet exception reports for CometAnywhere clients now appear on the client instead of the host.<br />
<p><br />
Build 424<br />
* FSTAT now returns E11 if the file is not found and a directory was not specified. It returns E31 if an invalid directory is specified.<br />
* Corrected a problem with num2date(0,5). It was returning a blank string.<br />
* Background sessions now inherit the activating partition's printers, including # printers.<br />
* Corrected a problem with editing numbers which used (LM) in a FORMAT.<br />
* Corrected a problem with editing numbers which used a length override in a FORMAT compiled for Comet32.<br />
* Corrected a problem with numtodate. Leading zeroes were not preserved.<br />
<p><br />
Build 423<br />
* Comet.exe will now run the Microsoft Visual Studio 2008 Redistributable installation when required for full Comet clients.<br />
* Corrected a problem that could cause a crash if a printer (or other device) was open in a parent program and the LUN was reused for a file in the subprogram.<br />
* Corrected a problem with numeric editing which caused numbers to sometimes be truncated.<br />
* Corrected a problem that could have caused a crash when launching Comet32 automatically on 64-bit Windows systems.<br />
<p><br />
Build 422<br />
* Background partitions can now be ACTIVATEd. The X00 device is automatically open on LUN 0 for these partitions. (See item # 2 below for X00 enhancements.)<br />
* The X00 device can now do (CopyFile), (RenameFile), (EraseFile), (FindFirstFile), (FindNextFile), (FileStatus), (GetDirAlias), (SetDirAlias), (OpenClipboard), and (CloseClipboard). Previously these mnemonics could only be used with LUN 0 which excluded background partitions.<br />
* If a configured directory can't be accessed at startup you'll be notified through a messagebox and an error message will be posted in the Comet log.<br />
* The Msgbox IB function and statement can now be used in background partitions.<br />
* The delimiter used for .csv files can now be specified with the FILE (lun) DLM=char$ statement.<br />
* FILE (lun) NORMAL introduced to reset a file's access from CSV or XML back to normal.<br />
* Added new clipboard mnemonics (OpenClipboard), and (CloseClipboard). An error can occur if the clipboard is opened by another user and there is no good way to convey that in IB. Now you can use (OpenClipboard) first and test for that case and try again. The old method will still work but this is more reliable. Use of these mnemonics requires REL 10.08 or higher.<br />
* Added a new mnemonic (ClearBuffer) to clear the X00 buffer between writes. Use of this mnemonic requires REL 10.08 or higher.<br />
* CosC now detects 64-bit Windows and will launch Comet32 automatically.<br />
<p><br />
Build 421<br />
* FSTAT now returns E11 if the file is not found and a directory was not specified.<br />
* Corrected a problem in the NUM function for Comet32 objects that wasn't returning an error if the last character in the string was invalid.<br />
* Corrected a problem in the STRING function for Comet16 objects that could have resulted in corruption of data in other variables.<br />
* Session colors specified in the configuration file are now used.<br />
<p><br />
Build 420<br />
* Corrected problems with FPT and BASE64.<br />
* Numeric overflow errors (ERR 1) are now ignored just like Comet16.<br />
* Changes required to get CometExplorer's DirBuild to load.<br />
* Fixed a bug that caused a trigger event when resetting a timer that is not running.<br />
* Prevented the changing of a constant when inputting a list of fields.<br />
<p><br />
Build 419<br />
<br />
Comet32:<br />
<br />
* Corrected a problem in passing numeric arguments to a proc.<br />
* CONTAINS result was reversing its TRUE / FALSE result. This has been corrected.<br />
<br />
<p><br />
Build 418<br />
* Added a new SetTimer instruction. This causes an event to be fired to the program<br />
when a specified duration (in milliseconds) has passed.<br />
<p><br />
Build 417<br />
* Corrected a problem with CosM32 that could have caused internal error 91 stack over/under flow error. This was introduced in version .415.<br />
* Introduced Cryptographic Support. This is a major enhancement to the encryption features of Comet. You can now encrypt/decrypt using the best methods known today including RC4, AES and 3DES.<br />
<p> <br />
Build 416<br />
* Corrected a problem that was reporting E25 and E99 in some dialogs<br />
* Fixed a problem that was causing some Windows events to be lost<br />
* Corrected a problem that could have caused a crash when printing<br />
* Corrected a problem that could have caused a crash when using the First IB function to retrieve the first key of a file.<br />
* Changed the handling of the clock device to match that of Comet16. DSTAT of any name beginning with "c" will return the status of the clock. If you wish to OPEN the clock, you must use a filename of "CL1".<br />
<p><br />
Build 415<br />
*New XML file statement introduced to make it easy to output your data in XML format. For more<br />
info, read the XML Output wiki doc.<br />
<br />
*A couple of problems were fixed in SetGlobal and GetGlobal:<br />
** The data is now unique for each partition.<br />
** The data persists thru running of programs. Previously a STOP would clear it.<br />
<br />
<p><br />
Comet 2010.414<br />
<br />
*Corrected a problem that could have caused a crash if an attempt was made to ENTER a program that doesn't exist.<br />
<br />
*Local pathnames are now returned in drive letter form even if the folder is configured using a UNC name. This effects PATH and DSTAT.<br />
<br />
<p><br />
Comet 2010.413<br />
<br />
*Corrected a problem that would have crashed Comet32 if the SQL device was opened.<br />
*Added additional information to the error messagebox for DOS errors.<br />
<br />
<p><br />
Comet 2010.412<br />
<br />
*Increased the size of the task buffer for mySQL to 64K<br />
*Introduced a spool alias for the spool section of the Comet.ini file:<br />
[SPOOLERS]<p><br />
Spool = SP1,$(lac);<p><br />
...<p><br />
[PRINTERS]<p><br />
Printer = Lac,p ,x,SPL:adobe ,Adobe PDF;<p><br />
<br />
This makes it possible to configure a printer called SP1. Previously all printer names needed to begin with "L". If your programs open "SP1" this makes it possible for them to be used with DocMgr without needing to recode them.<br />
<br />
<p><br />
Comet 2010.411<br />
<br />
*Restored the functionality of dynamic ACCESSes which was broken in version .410.<br />
*Corrected a problem handling TERM$ values above T99.<br />
*The NUM function now handles ROUNDed variables correctly.<br />
*Trailing printer controls such as (FF) and (LF) were not getting processed.<br />
<p><br />
Comet 2010.409<br />
<br />
*Several printing problems were corrected.<br />
*Correct a problem that could put the object file from a compiled program in the first accessed directory rather than the specified object directory.<br />
*Enhanced LOG and MSGBOX to accept either a string or a numeric expression as its operand.<br />
<p><br />
Comet 2010.408<br />
<br />
*Miscellaneous printing problems solved plus the addition of support for slave printers.<br />
*Problems corrected in the handling of editmasks.<br />
*Problem corrected for GetGlobal.<br />
*Problem corrected for formatted writes to CSV files.<br />
*Problems corrected in SetBit and TestBit.<br />
*Eliminated a problem that could cause a Windows event to be dropped for dialog programs.<br />
*Corrected the formatting of the spool name info returned by the DosRw 0xffe6 call (GetDDInfo)<br />
<p><br />
Comet 2010.407<br />
<br />
*Added mySQL driver.<br />
*Changes required for (GetSlavePrinterName).<br />
*Corrected a problem using mnemonics on a printer with an associated DES.<br />
*Changed numeric input in Comet16 objects to ignore precision just like Comet16.<br />
<p><br />
Comet 2010.406<br />
<br />
*Will now automatically run SYSGEN if no .cfg file is available. No special command line arguments are required for this to happen.<br />
*Corrected a problem in handling the (BZ) mnemonic<br />
*Introduced support for Windows 7 and Server 2008 R2<br />
<p><br />
Comet 2009.404<br />
<br />
*Rewrote the editmask processing code.<br />
*Screen mnemonics followed by a comma and positioner now work properly.<br />
*New Comet Error E86 will be issued if an attempt is made to read or write an image file.<br />
*Corrected a problem in the compiler that would cause a crash if many include files were used.<br />
*Constant editmasks are no longer evaluated by the compiler. All checking is done at runtime.<br />
*The LockDabs statement is now supported by the compiler.<br />
<br />
<p><br />
Comet 2009.403<br />
<br />
*Implemented WinSock driver<br />
*Duplicated the Comet16 positioning and spacing of numeric output. Previously programs run under Comet32 that output numeric values were not aligned properly.<br />
*Compilation errors involving undefined labels are now reported properly thru CAPI when compiling from UltraEdit.<br />
<br />
<p><br />
Comet 2009.402<br />
<br />
*Implemented a Comet32 error log. errorlog.csv will be created in the COS directory.<br />
*Implemented document archives (for DocMgr).<br />
*Corrected a problem that was causing Windows message events to sometimes be dropped.<br />
*Added a color square on the right side of the status line of the Comet window indicating whether the current program object was compiled with Comet16 or Comet32. The indicator is blue for Comet16 objects and green for Comet32 objects.<br />
*Implemented changes required for DbMgr, ViewMgr, and DBX<br />
*Implemented changes required for server snapshot utility<br />
<br />
<p><br />
Comet 2009.401:<br />
<br />
*Implemented CURPOS.<br />
*Implemented support for contiguous files.<br />
*Implemented NOVA / SNOVA functionality.<br />
*Recoded the str function for Comet32 so it emulates the Comet16 one.<br />
*Implemented the shortpath DOSMS function.<br />
*Implemented the CometAnywhere update mechanism.<br />
<br />
<p><br />
Comet 2009.400:<br />
<br />
*Improved printer functionality including pdf printers.<br />
*Improvements in the functionality of dialog-based programs. Try DlgDemo.<br />
*Improvements in GDI operations such as wallpaper.<br />
<br />
<h3><br />
Please Add any other issues you see with this product here<br />
</h3><br />
<ul><br />
<li> <br />
<br />
<br />
</ul></div>
Jim
http://wiki.signature.net/index.php/UrlDecode
UrlDecode
2016-06-03T19:23:52Z
<p>Jim: initial page</p>
<hr />
<div>Changes characters which were encoded by the browser to their ascii equivalents...<br />
<pre><br />
void URLdecode(CString &Value)<br />
{<br />
Value.Replace(_T("&quot;"),_T("\"")); <br />
Value.Replace(_T("&lt;" ),_T("<")); <br />
Value.Replace(_T("&gt;" ),_T(">")); <br />
Value.Replace(_T("&amp;" ),_T("&")); <br />
Value.Replace(_T("&nbsp;"),_T(" ")); <br />
Value.Replace(_T("+"),_T(" "));<br />
CString a;<br />
CString b;<br />
for (int i=0;i<=255;i++)<br />
{<br />
char x = i;<br />
CString b = x;<br />
a.Format("&#%d;",i);<br />
Value.Replace(a,b);<br />
a.Format("%%%02X",i);<br />
Value.Replace(a,b);<br />
a.Format("%%%02x",i);<br />
Value.Replace(a,b);<br />
}<br />
}<br />
</pre></div>
Jim
http://wiki.signature.net/index.php/UrlDecode
UrlDecode
2016-06-03T19:16:12Z
<p>Jim: initial page</p>
<hr />
<div>Changes characters which were encoded by the browser to their ascii equivalents...<br />
<br />
void URLdecode(CString &Value)<br />
{<br />
Value.Replace(_T("&quot;"),_T("\"")); <br />
Value.Replace(_T("&lt;" ),_T("<")); <br />
Value.Replace(_T("&gt;" ),_T(">")); <br />
Value.Replace(_T("&amp;" ),_T("&")); <br />
Value.Replace(_T("&nbsp;"),_T(" ")); <br />
Value.Replace(_T("+"),_T(" "));<br />
CString a;<br />
CString b;<br />
for (int i=0;i<=255;i++)<br />
{<br />
char x = i;<br />
CString b = x;<br />
a.Format("&#%d;",i);<br />
Value.Replace(a,b);<br />
a.Format("%%%02X",i);<br />
Value.Replace(a,b);<br />
a.Format("%%%02x",i);<br />
Value.Replace(a,b);<br />
}<br />
}</div>
Jim
http://wiki.signature.net/index.php/Tcase
Tcase
2016-06-03T19:11:25Z
<p>Jim: start of page</p>
<hr />
<div>Makes Each Word In The String Have Initial Caps.</div>
Jim
http://wiki.signature.net/index.php/Replace
Replace
2016-04-17T23:32:49Z
<p>Jim: reversed from and to in replacex map</p>
<hr />
<div>===The Replace function is used to replace names in a string with corresponding values, using a MAP to designate name/value pairs.===<br />
<br />
Length dynamic & local section$ output$<br />
<br />
Top: Map _<br />
'**Title**', Title$;_<br />
'**Name**', Name$;_<br />
'**Date**', Date$;_<br />
'**Prog**', Prog$;_<br />
'**Partition**', Partition$;_<br />
'**Email**', Eml$;_<br />
'**Time**', time$;_<br />
'**timeout**', timeout<br />
<b>! See note below about using variables in a MAP</b><br />
<br />
cust: Map _<br />
'**cusnum**, cusnum$;_ <br />
'**custname** , custname$<br />
<br />
output$ = replace(top,section$)<br />
output$ = replace(cust,output$)<br />
<br />
Print output$<br />
<br />
Will replace all of those names found in the map named "top" with their corresponding values, and then replace the customer info as well before sending the text to the browser or anywhere else you desire. In the REPLACE function, names are case insensitive. If a given name is not found, nothing will change. The above example uses asterisks ("**") to make the names unique and to imitate the legacy xap merge control, but any string can be used as the name.<br />
<br />
Here's something to consider if using variables in your MAP. When your proc is loaded, the map is initialized with its data. If the MAP includes any variables, the MAP is initialized with the contents of the variable at that time. This means that if your variable is declared as LOCAL or if you plan to change the value of the variable as the program runs, the MAP will not be initialized as you expect. To let Comet know you want it to use whatever the current value of the variable is at runtime you must use special syntax which includes {}. This is called de-referencing:<br />
<br />
Top: Map _<br />
'**Title**', Title$;_<br />
'**Name**', <b>{Name$};_</b><br />
'**Date**', Date$;_<br />
'**Prog**', Prog$;_<br />
'**Partition**', Partition$;_<br />
'**Email**', Eml$;_<br />
'**Time**', time$;_<br />
'**timeout**', timeout<br />
In the above example, the value of Name$ will be used at the time the Replace statement is executed. All other variables will get whatever value they had when the proc was initially loaded.<br />
<br />
The replace function is general purpose and can be used in any program to manipulate string data. As a bonus, here is a small Comet32 proc that will replace multiple instances of one substring with another in a target string. <br />
<br />
<br />
! Replaces All Instances Of From$ With To$ In The Target String.<br />
String Replacex(From$, To$, Target$)<br />
Map: Map From$, To$<br />
Procreturn Replace(Map,Target$)<br />
End<br />
<br />
Once this Proc is included in your program, all you have to do to call it is this:<br />
a$ = replacex('his','my',b$)</div>
Jim
http://wiki.signature.net/index.php/Main_Page
Main Page
2016-04-13T01:56:49Z
<p>Jim: added containers</p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
On the New Server<br />
* [[Subscription Benefits]]<br />
* Get your questions answered with [[FAQ2010|The Comet2010 FAQ]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet_Meeting_--_March_2015]]<br />
<br />
* [[Comet_Meeting_--_October_2013]]<br />
<br />
* [[Comet_Meeting -- April_2012]]<br />
<br />
* [[Comet Meeting -- October 12, 2010]]<br />
<br />
* [[Comet Meeting -- August 10, 2009]]<br />
<br />
* [[Getting_Started_With_Comet]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[STL_Containers]]<br />
<br />
* [[Xap2]]<br />
<br />
* [[CometAnywhere Mobile]]<br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Historical Dealer Meetings]]<br />
<br />
*[[Comet And RDP]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim
http://wiki.signature.net/index.php/IB_Statements/dstat
IB Statements/dstat
2016-04-08T22:11:57Z
<p>Jim: </p>
<hr />
<div>'''DSTAT function''' <br />
<br />
'''Syntax:''' DSTAT(device-name [,EXCP=statement-label]) <br />
<br />
'''Discussion:''' The DSTAT function returns the current status of system devices. <br />
<br />
The device-name is the name of the device to be checked. The device-name may be a string constant, a single-element string variable, a string array element, a string expression, or a string function. <br />
<br />
'''Detailed information:''' DSTAT of the console<br />
DSTAT of remote terminals<br />
DSTAT of a local printer<br />
DSTAT of a remote printer<br />
DSTAT of a spooler<br />
DSTAT of the system driver (X00)<br />
DSTAT of a gateway<br />
DSTAT of a directory<br />
DSTAT of the clock<br />
<br />
-------------------------------------------------------------------------------<br />
<br />
'''DSTAT of the console:'''<br />
Position Length Description/Values<br />
============================================================<br />
1 3 Partition<br />
4 1 Type<br />
0 = Monochrome<br />
1 = Color<br />
2 = Monochrome with flicker-free adapter<br />
3 = Color with flicker-free adapter<br />
4 = EGA/VGA/MCGA Monochrome<br />
5 = EGA/VGA/MCGA Color<br />
6 = TeleVideo<br />
7 = AT&T<br />
5 1 Option<br />
01H = Force 80-column mode<br />
02H = Force CR the same as Qantel<br />
04H = Auto increment cursor<br />
08H = FAST option enabled for all files<br />
10H = Insert key is the same as Qantel<br />
20H = Use expanded memory for all partitions<br />
40H = Standard I/O for keyboard<br />
6 1 Status<br />
7 1 Foreground attribute (color)<br />
8 1 Background attribute (color)<br />
9 1 Invisible attribute (color)<br />
10 1 Border attribute (color)<br />
11 1 Entry attribute (color)<br />
12 2 Base address<br />
14 2 Current column and row<br />
16 1 BIOS mode for 132-column<br />
17 1 Current number of columns on screen<br />
21 1 Returns "@01@" if the session is CometAnywhere<br />
<br />
'''DSTAT of remote terminals:'''<br />
Position Length Description/Values<br />
===================================================================<br />
1 3 Partition<br />
4 1 Type<br />
80H = dumb terminal<br />
81H = TeleVideo terminal<br />
82H = Ampex terminal<br />
83H = Qantel VT3 terminal<br />
84H = Qantel VT6 terminal<br />
86H = QTerm workstation<br />
F0H = Intermec bar code reader<br />
FEH = RDI printer<br />
FFH = ignored terminal<br />
5 1 not used<br />
6 1 Status<br />
7 1 UART<br />
8 1 Poll address<br />
9 1 Terminal flag<br />
!<br />
80H OBP Terminal Lockout (Signal to PC that FG<br />
processing loop is active on this terminal<br />
and effectively locks out PC from changing<br />
anything in the term table.)<br />
!<br />
20H Status Poll Hold Request (PC signals don't<br />
do status poll on this terminal.)<br />
!<br />
10H Select Request (OBP should initiate a<br />
select poll (data is in the buffer)<br />
!<br />
08H Buffer In Use Flag (OBP should not<br />
initiate a data poll)<br />
!<br />
04H Data Poll Ack Request (PC has received the<br />
data and the buffer is clear)<br />
!<br />
02H Reset Request (user has hit Escape)<br />
!<br />
01H Data Poll Request<br />
!<br />
10 1 Terminal process<br />
!<br />
Foreground Attention Needed<br />
0 = IDLE - Dead terminal<br />
1 = IDLE - Active terminal<br />
2 = Status Poll Complete<br />
8 = Waiting to send buffer to PC<br />
9 = Finished select - OK<br />
A = Finished select - NG<br />
B = Data poll complete (ACK included)<br />
!<br />
UART is Working on this one<br />
10H = Doing status poll<br />
11H = Receiving data from terminal<br />
12H = Sending data to terminal<br />
13H = Retransmitting to terminal (1st<br />
retransmit)<br />
14H = Retransmitting to terminal (2nd<br />
retransmit)<br />
15H = Terminal reset in progress<br />
<br />
'''DSTAT of a local printer''' (effective with build 319):<br />
Position Length Description<br />
=========================================<br />
1 3 owning partition, if any<br />
4 1 printer type in hex: 0=Local; 4=Windows<br />
5 1 spool type in hex<br />
To convert the type, take the HEXASC of the byte.<br />
Look at the first character returned by HEXASC:<br />
'6'=Auto-spool; 'A'=Exception spool; '2'=Non-spool<br />
6 12 spooler alias name<br />
18 237 pathname associated with the printer<br />
<br />
'''DSTAT of a remote printer:'''<br />
Position Length Description<br />
=========================================<br />
1 3 Partition<br />
4 1 Type<br />
5 1 Spool Type<br />
6 1 Status<br />
7 1 UART<br />
8 1 Poll Address<br />
9 1 Terminal Flag<br />
10 1 Terminal Process<br />
11 1 ROM Version<br />
<br />
'''DSTAT of a spooler:'''<br />
Position Length Description<br />
=====================================<br />
1 64 DOS path name<br />
<br />
<br />
'''DSTAT of the system driver (X00):'''Position Length Description<br />
===================================================<br />
1 32 (reserved)<br />
33 16 Network node name<br />
49 2 Number of the of first partiton<br />
on the node (byte-reversed hex)<br />
51 2 Total number of partitions on<br />
the node (byte-reversed hex)<br />
53 1 "@01@" if the user has a COM license; "@00@" otherwise<br />
<br />
<br />
'''DSTAT of a gateway:'''<br />
Position Length Description<br />
=============================================<br />
1 3 Controlling partition<br />
4 1 Gateway type (hex)<br />
5 1 Gateway subtype (hex)<br />
<br />
'''DSTAT of a directory:'''<br />
Position Length Description<br />
======================================<br />
1 3 Directory name<br />
4 64 DOS path name<br />
<br />
'''DSTAT of the clock:'''<br />
Position Length Description<br />
===================================<br />
1 3 Clock name<br />
4 10 Number of milliseconds that have elapsed since the Windows was started, up to 49.7 days.</div>
Jim
http://wiki.signature.net/index.php/IB_Statements/dstat
IB Statements/dstat
2016-04-08T22:04:17Z
<p>Jim: Dstst of clock updated</p>
<hr />
<div>'''DSTAT function''' <br />
<br />
'''Syntax:''' DSTAT(device-name [,EXCP=statement-label]) <br />
<br />
'''Discussion:''' The DSTAT function returns the current status of system devices. <br />
<br />
The device-name is the name of the device to be checked. The device-name may be a string constant, a single-element string variable, a string array element, a string expression, or a string function. <br />
<br />
'''Detailed information:''' DSTAT of the console<br />
DSTAT of remote terminals<br />
DSTAT of a local printer<br />
DSTAT of a remote printer<br />
DSTAT of a spooler<br />
DSTAT of the system driver (X00)<br />
DSTAT of a gateway<br />
DSTAT of a directory<br />
DSTAT of the clock<br />
<br />
-------------------------------------------------------------------------------<br />
<br />
'''DSTAT of the console:'''<br />
Position Length Description/Values<br />
============================================================<br />
1 3 Partition<br />
4 1 Type<br />
0 = Monochrome<br />
1 = Color<br />
2 = Monochrome with flicker-free adapter<br />
3 = Color with flicker-free adapter<br />
4 = EGA/VGA/MCGA Monochrome<br />
5 = EGA/VGA/MCGA Color<br />
6 = TeleVideo<br />
7 = AT&T<br />
5 1 Option<br />
01H = Force 80-column mode<br />
02H = Force CR the same as Qantel<br />
04H = Auto increment cursor<br />
08H = FAST option enabled for all files<br />
10H = Insert key is the same as Qantel<br />
20H = Use expanded memory for all partitions<br />
40H = Standard I/O for keyboard<br />
6 1 Status<br />
7 1 Foreground attribute (color)<br />
8 1 Background attribute (color)<br />
9 1 Invisible attribute (color)<br />
10 1 Border attribute (color)<br />
11 1 Entry attribute (color)<br />
12 2 Base address<br />
14 2 Current column and row<br />
16 1 BIOS mode for 132-column<br />
17 1 Current number of columns on screen<br />
21 1 Returns "@01@" if the session is CometAnywhere<br />
<br />
'''DSTAT of remote terminals:'''<br />
Position Length Description/Values<br />
===================================================================<br />
1 3 Partition<br />
4 1 Type<br />
80H = dumb terminal<br />
81H = TeleVideo terminal<br />
82H = Ampex terminal<br />
83H = Qantel VT3 terminal<br />
84H = Qantel VT6 terminal<br />
86H = QTerm workstation<br />
F0H = Intermec bar code reader<br />
FEH = RDI printer<br />
FFH = ignored terminal<br />
5 1 not used<br />
6 1 Status<br />
7 1 UART<br />
8 1 Poll address<br />
9 1 Terminal flag<br />
!<br />
80H OBP Terminal Lockout (Signal to PC that FG<br />
processing loop is active on this terminal<br />
and effectively locks out PC from changing<br />
anything in the term table.)<br />
!<br />
20H Status Poll Hold Request (PC signals don't<br />
do status poll on this terminal.)<br />
!<br />
10H Select Request (OBP should initiate a<br />
select poll (data is in the buffer)<br />
!<br />
08H Buffer In Use Flag (OBP should not<br />
initiate a data poll)<br />
!<br />
04H Data Poll Ack Request (PC has received the<br />
data and the buffer is clear)<br />
!<br />
02H Reset Request (user has hit Escape)<br />
!<br />
01H Data Poll Request<br />
!<br />
10 1 Terminal process<br />
!<br />
Foreground Attention Needed<br />
0 = IDLE - Dead terminal<br />
1 = IDLE - Active terminal<br />
2 = Status Poll Complete<br />
8 = Waiting to send buffer to PC<br />
9 = Finished select - OK<br />
A = Finished select - NG<br />
B = Data poll complete (ACK included)<br />
!<br />
UART is Working on this one<br />
10H = Doing status poll<br />
11H = Receiving data from terminal<br />
12H = Sending data to terminal<br />
13H = Retransmitting to terminal (1st<br />
retransmit)<br />
14H = Retransmitting to terminal (2nd<br />
retransmit)<br />
15H = Terminal reset in progress<br />
<br />
'''DSTAT of a local printer''' (effective with build 319):<br />
Position Length Description<br />
=========================================<br />
1 3 owning partition, if any<br />
4 1 printer type in hex: 0=Local; 4=Windows<br />
5 1 spool type in hex<br />
To convert the type, take the HEXASC of the byte.<br />
Look at the first character returned by HEXASC:<br />
'6'=Auto-spool; 'A'=Exception spool; '2'=Non-spool<br />
6 12 spooler alias name<br />
18 237 pathname associated with the printer<br />
<br />
'''DSTAT of a remote printer:'''<br />
Position Length Description<br />
=========================================<br />
1 3 Partition<br />
4 1 Type<br />
5 1 Spool Type<br />
6 1 Status<br />
7 1 UART<br />
8 1 Poll Address<br />
9 1 Terminal Flag<br />
10 1 Terminal Process<br />
11 1 ROM Version<br />
<br />
'''DSTAT of a spooler:'''<br />
Position Length Description<br />
=====================================<br />
1 64 DOS path name<br />
<br />
<br />
'''DSTAT of the system driver (X00):'''Position Length Description<br />
===================================================<br />
1 32 (reserved)<br />
33 16 Network node name<br />
49 2 Number of the of first partiton<br />
on the node (byte-reversed hex)<br />
51 2 Total number of partitions on<br />
the node (byte-reversed hex)<br />
53 1 "@01@" if the user has a COM license; "@00@" otherwise<br />
<br />
<br />
'''DSTAT of a gateway:'''<br />
Position Length Description<br />
=============================================<br />
1 3 Controlling partition<br />
4 1 Gateway type (hex)<br />
5 1 Gateway subtype (hex)<br />
<br />
'''DSTAT of a directory:'''<br />
Position Length Description<br />
======================================<br />
1 3 Directory name<br />
4 64 DOS path name<br />
<br />
'''DSTAT of the clock:'''<br />
Position Length Description<br />
===================================<br />
1 3 Clock name<br />
4 10 Number of milliseconds since windows startup</div>
Jim
http://wiki.signature.net/index.php/Comet_And_RDP
Comet And RDP
2016-03-07T20:14:36Z
<p>Jim: </p>
<hr />
<div>== Comet and Windows Remote Desktop or Terminal Services ==<br />
<br />
This page applies to the following:<br />
<br />
Comet32 version .495 and later<br />
<br />
Comet Security and File Servers version 15.03 and later<br />
<br />
We have found that a very efficient and economical way to connect multiple Comet users to a virtual Comet Host is to use Remote Desktop (Windows Terminal Services). This document outlines How to set this up.<br />
<br />
Previous versions of Comet and Comet Server Products and Comet16 will not play well with Windows Terminal services. Since each remote Desktop Client had the same IP address, The server would not be able to tell one user from another. <br />
<br />
Comet Server software previously relied on the client's IP address to distinguish between one comet and another. Now, the Comet Server software relies only on node name.<br />
<br />
Comet Services must be installed as Windows Services. In particular, a single instance of the Comet File server must be available to all users simultaneously. <br />
<br />
Each user logged into the RDP Host must have a unique Windows user login name. This requirement may be set in the RDP host configuration.<br />
<br />
Each Comet connecting to the comet File Server must have a unique Node name. This is enforced by the Security server, but we need to emphasize it here because it is very important.<br />
<br />
== Step-by-Step ==<br />
<br />
Purchase a copy of Windows server. A standard edition is just fine. The current price from Amazon (11/2015) is $653.88.<br />
<br />
Purchase as many Microsoft (per user) CALS as you need The current price from Amazon (11/2015) is $149.00 for 5 users. Depending on the number of users, a bulk license may be less expensive.<br />
<br />
Or purchase these from your virtual IT provider.<br />
<br />
Configure the Remote Desktop Server to Restrict each user to a single session:<br />
<br />
Click:<br />
<br />
'''Startup/Administrative Tools/Remote Desktop Services/Remote Desktop Session Host Configuration''''' click on Restrict each user to a single session. In the dialog, make sure that Restrict each user to a single session is checked.<br />
<br />
Configure as many windows users as needed for full Comet Access.<br />
<br />
Configure as many comet nodes in the comet .ini file as there are users.<br />
<br />
Log into windows for each user and create a shortcut on their desktop with the appropriate node name (C:\comet\comet.exe pn=node00), etc.<br />
<br />
Now each Comet user will have their own RDP desktop with the correct Comet shortcut.</div>
Jim
http://wiki.signature.net/index.php/Comet_command_line_options
Comet command line options
2016-02-26T01:07:18Z
<p>Jim: clarified /s option</p>
<hr />
<div>'''Command Line Options'''<br />
<br />
Comet supports a number of command line options. These options are included in the "Target" field of the Comet shortcut, and set certain parameters when Comet is run.<br />
<br />
Here is a list of the currently supported. Each entry in the chart includes the option, the program affected by the option (Cosw, Cosc or Cosh), and an explanation of the option.<br />
{| border="1"<br />
|- <br />
<br />
|Option <br />
| Program<br />
affected<br />
| Explanation <br />
|-<br />
|/32<br />
| Comet<br />
| Forces running of Comet32 instead of Comet16 on 32-bit systems<br />
|- <br />
|/C <br />
| Cosh <br />
| Configuration mode - has same restrictions as /D<br />
|- <br />
|/CAPORT:port <br />
| Cosw <br />
| Specify CometAnywhere port number <br />
<br />
The default TCP/IP port number for CometAnywhere is 11751. If you want to use another port number, you must specify the new value in two places: <br />
<br />
on the remote CometAnywhere remote system using the /CAPORT command line option, or the following COSW.INI option <br />
on the host Comet system, via the following entries in the COSW.INI file (works on remote systems also): <br />
[NetConfig]<br />
CAPort=port <br />
<br />
The valid TCP/IP ports are 0 to 65535, however please note that the first 1024 port numbers are reserved for applications other than CometAnywhere.<br />
<br />
Example (using port number 54321): <br />
<br />
command line option on remote system: <br />
cosw.exe /CAPORT:54321 /NET <br />
<br />
COSW.INI entry on host system: <br />
[NetConfig]<br />
CAPort=54321 <br />
|- <br />
|/D <br />
| Cosh <br />
| Demonstration mode<br />
<br />
This option allows you to run Comet in demonstration mode. The restrictions of demonstration mode are:<br />
<br />
a maximum of 1,000 keystrokes may be typed <br />
data files may not be larger than 640K bytes <br />
a maximum of 3 partitions may be configured <br />
|- <br />
|/DEBUG <br />
| Cosp <br />
| Opens the program log window for debugging purposes <br />
|- <br />
|/DETAILS <br />
| Cosw <br />
| Show Comet startup and session details <br />
|- <br />
|/FRAME <br />
| Cosw <br />
| Creates a Comet window with no frame/menu/tools <br />
|- <br />
|/HIDE <br />
| Cosw <br />
| Forces the Comet window to be invisible <br />
|- <br />
|/INI <br />
| Cosw <br />
| Specifies an alternate path to COSW.INI or COSWGLOB.INI <br />
|- <br />
|/KEYFILE=file <br />
/KEYFILE:file <br />
| Cosw <br />
| Plays back keystrokes from the named text file<br />
|- <br />
|/LOG <br />
| Cosc <br />
| Enables COSC logging to default log file<br />
<br />
The default log filename is the user's profile name appended with ".LOG". For example, if the user's profile is NODE1, the log file is NODE1.LOG. <br />
<br />
The log file is created in the Comet startup directory. <br />
|- <br />
|/MAX <br />
| Cosw <br />
| Forces the Comet window to maximize <br />
|- <br />
|/MIN <br />
| Cosw <br />
| Forces the Comet window to minimize <br />
|-<br />
|NET <br />
NET:IP-address <br />
NET:domain-name <br />
| Cosw <br />
| Connect CometAnywhere to Comet host system:<br />
<br />
/NET displays a dialog for the user to user an IP address or domain name. <br />
/NET:IP-address connects to the Comet host system at the specified IP address. <br />
/NET:domain-name connects to the Comet host system at the specified domain name. <br />
|- <br />
|/O1 <br />
| Cosh <br />
| Startup option for the Comet Point-Of-Sale (POS) system (not supported in Comet2000) <br />
|- <br />
|/PN=profilename <br />
| Cosh <br />
| Specifies the Comet user profile<br />
<br />
The user profile is a file created during the system configuration process (SYSGEN). The extension for this file is CFG. <br />
<br />
For example, to start Comet using a profile name of TEST (which equates to a configuration file of TEST.CFG), use the following option:<br />
<br />
cosw /PN=TEST <br />
|- <br />
|/RESETID <br />
| Cosw <br />
| Deletes and re-assigns a new Session Identifier (CAID) to the computer. <br />
|- <br />
|/S:session<br />
| Cosw<br />
<br />
Cosc<br />
| Request specified session<br />
Allows a remote CometAnywhere user to request specific session number(s) on the host system. The following example requests session 005 on the host machine:<br />
c:\comet\comet.exe /S:005 /NET<br />
<br />
If the requested session is not available, and if the /TSR option (see below) has NOT been specified by the host, Comet will run in the first available session on the host system. <br />
<br />
Terminal names (term$) and sessions are different. Terminal names are changeable by any program to anything (with a 3 character limit). Comet does not change term$ itself, but a program could. Comet initializes term$ to correspond to the names specified in the comet.ini file. CA Sessions are fixed. They start with session 1 and go to the number specified in the ini file, with a maximum of 255 sessions.<br />
<br />
This option refers to CometAnywhere sessions, not terminal names.<br />
<br />
Multiple /s options may be specified in a single command line:<br />
c:\comet\comet.exe /NET:CAHost /S:005 /s:006 /s:007 /s:008 /tsr<br />
<br />
When run, the first session will appear. Subsequent CTL/N keystrokes or mouse clicks to invoke a new CometAnywhere window will bring up the other sessions one at a time.<br />
<br />
|- <br />
|/SEC<br />
| Cosc<br />
<br />
Cosh<br />
| Start Comet Security Server<br />
<br />
This option attempts to load the Comet Security Server when Comet is started. This is a convenient way to start Comet on a single-user system.<br />
<br />
Notes:<br />
<br />
This option is for standalone systems only, where the Comet Security Server is to be run on the same system as Comet. This option is not intended for Comet systems that get security from the Comet Security Server running on another node in the network. <br />
<br />
When the /SEC command line option is specified, Comet looks for a program named Csecsrv.exe in the specified start-in directory. The program, if found, is launched. <br />
· In Builds 300 through 307, this was an automatic feature (i.e., no command line parameter was required in order to launch the Comet Security Server). Starting with Build 308, it is no longer an automatic feature.<br />
|- <br />
|/TSR<br />
| Cosw<br />
Cosc<br />
| Target Session Required<br />
<br />
Used on the CometAnywhere host this option will limit a session requested by a remote to only the specific session number requested. If that session is not available no session will be granted. This option is used in conjunction with the /S option (see above).<br />
<br />
Here's an example:<br />
<br />
cosw /TSR <br />
<br />
If the requested session number is not available, Comet will not scan for another available session.<br />
|- <br />
|/TSRALL<br />
| Cosw<br />
<br />
Cosc<br />
| Target Session Required<br />
<br />
Requires all remote sessions include a "/S:n" parameter to request a specific session. If they do not use this parameter then they'll get the "Target Session Unavaliable" error.<br />
|-<br />
|} <br />
<br />
<br />
<br />
<br />
--------------------------------------------------------------------------------<br />
Copyright © 1995 - 2013 Signature Systems, Inc. '''Bold text'''</div>
Jim
http://wiki.signature.net/index.php/Comet_And_RDP
Comet And RDP
2015-11-12T18:15:26Z
<p>Jim: </p>
<hr />
<div>== Comet and Windows Remote Desktop or Terminal Services ==<br />
<br />
This page applies to the following:<br />
<br />
Comet32 version ---- and later<br />
<br />
Comet Security server version ---- and later<br />
<br />
We have found that a very efficient and economical way to connect multiple Comet users to a virtual Comet Host is to use Remote Desktop (Windows Terminal Services). This document outlines How to set this up.<br />
<br />
Previous versions of Comet and Comet Server Products and Comet16 will not work correctly. Since each remote Desktop Client had the same IP address, The server would ???<br />
<br />
Comet Server software previously relied on the client's IP address to distinguish between one comet and another.<br />
<br />
Comet Services must be installed as Windows Services. In particular, a single instance of the Comet File server must be available to all users simultaneously. <br />
<br />
Each user logged into the RDP Host must have a unique Windows user login name. This requirement may be set in the RDP host configuration.<br />
<br />
Each Comet connecting to the comet File Server must have a unique Node name. This is enforced by the Security server, but we need to emphasize it here because it is very important.<br />
<br />
<br />
== Step-by-Step ==<br />
<br />
Purchase a copy of Windows server. A standard edition is just fine. The current price from Amazon (11/2015) is $653.88.<br />
<br />
Purchase as many Microsoft (per user) CALS as you need The current price from Amazon (11/2015) is $149.00 for 5 users. Depending on the number of users, a bulk license may be less expensive.<br />
<br />
Or purchase these from your virtual IT provider.<br />
<br />
Configure the Remote Desktop Server to Restrict each user to a single session:<br />
<br />
Click:<br />
<br />
'''Startup/Administrative Tools/Remote Desktop Services/Remote Desktop Session Host Configuration''''' click on Restrict each user to a single session. In the dialog, make sure that Restrict each user to a single session is checked.<br />
<br />
Configure as many windows users as needed for full Comet Access.<br />
<br />
Configure as many comet nodes in the comet .ini file as there are users.<br />
<br />
Log into windows for each user and create a shortcut on their desktop with the appropriate node name (C:\comet\comet.exe pn=node00), etc.<br />
<br />
Now each Comet user will have their own RDP desktop with the correct Comet shortcut.</div>
Jim
http://wiki.signature.net/index.php/Comet_And_RDP
Comet And RDP
2015-11-12T18:13:41Z
<p>Jim: </p>
<hr />
<div>== Comet and Windows Remote Desktop or Terminal Services ==<br />
<br />
This page applies to the following:<br />
<br />
Comet32 version ---- and later<br />
<br />
Comet Security server version ---- and later<br />
<br />
We have found that a very efficient and economical way to connect multiple Comet users to a virtual Comet Host is to use Remote Desktop (Windows Terminal Services). This document outlines How to set this up.<br />
<br />
Previous versions of Comet and Comet Server Products and Comet16 will not work correctly. Since each remote Desktop Client had the same IP address, The server would ???<br />
<br />
Comet Server software previously relied on the client's IP address to distinguish between one comet and another.<br />
<br />
Comet Services must be installed as Windows Services. In particular, a single instance of the Comet File server must be available to all users simultaneously. <br />
<br />
Each user logged into the RDP Host must have a unique Windows user login name. This requirement may be set in the RDP host configuration.<br />
<br />
Each Comet connecting to the comet File Server must have a unique Node name. This is enforced by the Security server, but we need to emphasize it here because it is very important.<br />
<br />
<br />
== Step-by-Step ==<br />
<br />
Purchase a copy of Windows server. A standard edition is just fine. The current price from Amazon (11/2015) is $653.88.<br />
<br />
Purchase as many Microsoft (per user) CALS as you need The current price from Amazon (11/2015) is $149.00 for 5 users. Depending on the number of users, a bulk license may be less expensive.<br />
<br />
Or purchase these from your virtual IT provider.<br />
<br />
Configure the Remote Desktop Server to Restrict each user to a single session:<br />
<br />
<br />
'''Administrative Tools/Remote Desktop Services/Remote Desktop Session Host Configuration''''' click on Restrict each user to a single session. In the dialog, make sure that Restrict each user to a single session is checked.<br />
<br />
Configure as many windows users as needed for full Comet Access.<br />
<br />
Configure as many comet nodes in the comet .ini file as there are users.<br />
<br />
Log into windows for each user and create a shortcut on their desktop with the appropriate node name (C:\comet\comet.exe pn=node00), etc.<br />
<br />
Now each Comet user will have their own RDP desktop with the correct Comet shortcut.</div>
Jim
http://wiki.signature.net/index.php/Comet_And_RDP
Comet And RDP
2015-11-11T18:36:52Z
<p>Jim: added step-by-step</p>
<hr />
<div>== Comet and Windows Remote Desktop or Terminal Services ==<br />
<br />
This page applies to the following:<br />
<br />
Comet32 version ---- and later<br />
<br />
Comet Security server version ---- and later<br />
<br />
We have found that a very efficient and economical way to connect multiple Comet users to a virtual Comet Host is to use Remote Desktop (Windows Terminal Services). This document outlines How to set this up.<br />
<br />
Previous versions of Comet and Comet Server Products and Comet16 will not work correctly. Since each remote Desktop Client had the same IP address, The server would ???<br />
<br />
Comet Server software previously relied on the client's IP address to distinguish between one comet and another.<br />
<br />
Comet Services must be installed as Windows Services. In particular, a single instance of the Comet File server must be available to all users simultaneously. <br />
<br />
Each user logged into the RDP Host must have a unique Windows user login name. This requirement may be set in the RDP host configuration.<br />
<br />
Each Comet connecting to the comet File Server must have a unique Node name. This is enforced by the Security server, but we need to emphasize it here because it is very important.<br />
<br />
<br />
== Step-by-Step ==<br />
<br />
Purchase a copy of Windows server. A standard edition is just fine. The current price from Amazon (11/2015) is $653.88.<br />
<br />
Purchase as many Microsoft (per user) CALS as you need The current price from Amazon (11/2015) is $149.00 for 5 users. Depending on the number of users, a bulk license may be less expensive.<br />
<br />
Or purchase these from your virtual IT provider.<br />
<br />
Configure the Remote Desktop Server to Restrict each user to a single session<br />
<br />
Administrative Tools/Remote Desktop Services/Remote Desktop Session Host Configuration click on Restrict each user to a single session. In the dialog, make sure that Restrict each user to a single session is checked.</div>
Jim
http://wiki.signature.net/index.php/Comet_And_RDP
Comet And RDP
2015-10-23T19:45:24Z
<p>Jim: </p>
<hr />
<div>== Comet and Windows Remote Desktop or Terminal Services ==<br />
<br />
This page applies to the following:<br />
<br />
Comet32 version ---- and later<br />
<br />
Comet Security server version ---- and later<br />
<br />
We have found that a very efficient and economical way to connect multiple Comet users to a virtual Comet Host is to use Remote Desktop (Windows Terminal Services). This document outlines How to set this up.<br />
<br />
Previous versions of Comet and Comet Server Products and Comet16 will not work correctly. Since each remote Desktop Client had the same IP address, The server would ???<br />
<br />
Comet Server software previously relied on the client's IP address to distinguish between one comet and another.<br />
<br />
Comet Services must be installed as Windows Services. In particular, a single instance of the Comet File server must be available to all users simultaneously. <br />
<br />
Each user logged into the RDP Host must have a unique Windows user login name. This requirement may be set in the RDP host configuration.<br />
<br />
Each Comet connecting to the comet File Server must have a unique Node name. This is enforced by the Security server, but we need to emphasize it here because it is very important.</div>
Jim
http://wiki.signature.net/index.php/Comet_And_RDP
Comet And RDP
2015-10-23T19:43:18Z
<p>Jim: </p>
<hr />
<div>== Comet and Windows Remote Desktop or Terminal Services ==<br />
<br />
This page applies to the following:<br />
<br />
Comet32 version ---- and later<br />
<br />
Comet Security server version ---- and later<br />
<br />
We have found that a very efficient and economical way to connect multiple Comet users to a virtual Comet Host is to use Remote Desktop (Windows Terminal Services). This document outlines How to set this up.<br />
<br />
Previous versions of Comet and Comet Server Products and Comet16 will not work correctly. <br />
<br />
Comet Server software previously relied on the client's IP address to distinguish between one comet and another.<br />
<br />
Comet Services must be installed as Windows Services. In particular, a single instance of the Comet File server must be available to all users simultaneously. <br />
<br />
Each user logged into the RDP Host must have a unique Windows user login name. This requirement may be set in the RDP host configuration.<br />
<br />
Each Comet connecting to the comet File Server must have a unique Node name. This is enforced by the Security server, but we need to emphasize it here because it is very important.</div>
Jim
http://wiki.signature.net/index.php/Comet_And_RDP
Comet And RDP
2015-10-23T19:42:13Z
<p>Jim: Creation of the page</p>
<hr />
<div>== Comet and Windows Remote Desktop or Terminal Services ==<br />
<br />
This page applies to the following:<br />
<br />
Comet32 version ---- and later<br />
Comet Security server version ---- and later<br />
<br />
We have found that a very efficient and economical way to connect multiple Comet users to a virtual Comet Host is to use Remote Desktop (Windows Terminal Services). This document outlines How to set this up.<br />
<br />
Previous versions of Comet and Comet Server Producta and Comet16 will not work correctly. <br />
<br />
Comet Server software previously relied on the client's IP address to distinguish between one comet and another.<br />
<br />
Comet Services must be installed as Windows Services. In particular, a single instance of the Comet File server must be available to all users simultaneously. <br />
<br />
Each user logged into the RDP Host must have a unique Windows user login name. This requirement may be set in the RDP host configuration.<br />
<br />
Each Comet connecting to the comet File Server must have a unique Node name. This is enforced by the Security server, but we need to emphasize it here because it is very important.</div>
Jim
http://wiki.signature.net/index.php/Main_Page
Main Page
2015-10-23T18:16:22Z
<p>Jim: replaced 2010 page with rdp reference</p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
On the New Server<br />
* [[Subscription Benefits]]<br />
* Get your questions answered with [[FAQ2010|The Comet2010 FAQ]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet_Meeting_--_March_2015]]<br />
<br />
* [[Comet_Meeting_--_October_2013]]<br />
<br />
* [[Comet_Meeting -- April_2012]]<br />
<br />
* [[Comet Meeting -- October 12, 2010]]<br />
<br />
* [[Comet Meeting -- August 10, 2009]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[Xap2]]<br />
<br />
* [[CometAnywhere Mobile]]<br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Historical Dealer Meetings]]<br />
<br />
*[[Comet And RDP]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim
http://wiki.signature.net/index.php/IB_Statements/pos
IB Statements/pos
2015-08-17T19:03:09Z
<p>Jim: Needle/Haystack</p>
<hr />
<div>'''POS function''' <br />
<br />
'''Syntax:''' POS("Needle", "Haystack") <br />
<br />
'''Discussion:''' The POS function returns the position of one specified string argument within a second string argument. <br />
The first string argument ("Needle") is a string value whose position within the second string argument is to be determined. The second string argument ("Haystack") is the string value to be searched for the first string argument. <br />
<br />
Both string arguments can be string constants, single-element string variables, or string array elements. <br />
<br />
Either the first or the second string argument (but not both) can be a string expression or a string function. <br />
<br />
The value returned by the POS function is the position within "Haystack" of the first character of the first occurrence (from left to right) of a substring equal to "Needle". For internal string values, counting begins at character position 1. <br />
<br />
If "Needle" does not equal a substring of "Haystack", the POS function returns a value of zero. <br />
<br />
The intermediate result of the POS function is stored in an accumulator with a precision of 16.8 If this result is then stored in a receiving numeric variable, its precision is adjusted to the defined precision of that variable. <br />
<br />
'''Example 1:''' X = POS(A$,B$)<br />
<br />
In the above example, the value contained in the string variable A$ is compared to the value stored in B$. If a match is found, the POS function returns the matching position; this value is then stored in the numeric variable X. <br />
<br />
For example, if A$ equals "AT" and B$ equals "SIGNATURE", then the POS function will return a value of 5 (the starting position of the string "AT" within the value "SIGNATURE".) <br />
<br />
'''Example 2:''' VALUE = POS(STR$,"ABCDEF")<br />
<br />
In this example, the value of string variable STR$ is compared to the string constant "ABCDEF". If the value of STR$ matches a portion of the constant, its position is returned and stored in the numeric variable VALUE. <br />
For example, if STR$ equals "B", the function will return a value of 2 (since "B" is in the second position of the string constant). <br />
<br />
Or, if STR$ equals "Z", the function will return a value of zero, since "Z" is not contained in the constant. <br />
<br />
Also, if STR$ equals "DE", the function will return a value of 4 (the substring "DE" starts at the fourth position of the constant). <br />
<br />
'''Example 3:''' N = POS("SMITH",NAME$)<br />
<br />
In this example, the string constant "SMITH" is compared to the string variable NAME$. If "SMITH" is located anywhere within NAME$, its position will be returned and stored in the numeric variable N. <br />
<br />
Note: If "SMITH" is not found in the variable NAME$, the POS function will return a value of zero. This programming technique can be useful for determining if a particular string value is contained within a specific data field.</div>
Jim
http://wiki.signature.net/index.php/Sandbox
Sandbox
2014-02-12T14:55:07Z
<p>Jim: testing</p>
<hr />
<div><br />
XAP Gateway Internals<br />
<br />
There are 2 major parts to the XAP technology. The first part is what we call the CGI server and the second is what we call the XAP Gateway.<br />
<br />
The CGI Server<br />
<br />
The CGI server listens on the port configured for it. It expects to receive connections using the http protocol. It then performs the following steps:<br />
<br />
It receives and assembles a whole browser request.<br />
It parses the individual parts of this request, splitting out the following components:<br />
<br />
The CGI Environment variables.<br />
Any Cookies that the browser may have sent.<br />
Any query strings that the browser may have sent.<br />
<br />
It then writes these items into a Keyed File* (called the XAP environment file), so that a user program can access them quickly.<br />
<br />
CGI environment variables are written to the keyed file such that the key name is the environment variable name with dots instead of underlines separating words of the name, ie HTTP_USER_AGENT would become HTTP.USER.AGENT.<br />
Cookie names are preceded with a "C." so that a cookie by the name of "my cookie" would be written as "C.MY COOKIE".<br />
Likewise, query strings are preceded with a "Q." so that a query string by the name of "credit card number" would be written as "Q.CREDIT CARD NUMBER".<br />
<br />
If an appropriate cookie was present in the request, the CGI server establishes the context data for the connection.<br />
It then launches the Internet Basic program designated by the SCRIPT.NAME environment variable. The program inherits a connection to the browser through the XAP gateway, any context items established in step 4 above, and the keyed file produced in step 3 above.<br />
<br />
Note: Any mention of "files" in this document does not necessarily mean "disk files". Files may reside in memory or disk depending on performance/sharing issues.<br />
<br />
<br />
<br />
The XAP Gateway<br />
<br />
The XAP Gateway acts in response to commands included in the Internet Basic program launched by the CGI Server. The interface is very easy to learn because it contains relatively few basic commands:<br />
<br />
Write – the program may write data to the browser through the gateway.<br />
<br />
If no previous data has been written to the XAP Gateway, the XAP Gateway will generate a standard HTML header before sending the data to the browser. The program is free to modify this behavior through a control explained below. Otherwise, the data will be sent directly to the browser. All data is buffered for best performance.<br />
Control – the program may send various controls that cause the gateway to perform actions meaningful to the program. These will be described below.<br />
Status – the program can get various pieces of information from the gateway by the use of a simple status function.<br />
Close – When the LUN pointing to the XAP Gateway is closed, all buffered data is sent to the browser, Context data is filed away for future connections, and the connection to the browser is gracefully closed.<br />
The XAP environment file is also used as part of the interface between the program and the XAP gateway. The program can read browser request data from this file as explained above. It may also write information that will eventually be written to the browser as explained below.<br />
<br />
<br />
<br />
XAP Gateway Controls<br />
<br />
Most of the power of the XAP Gateway is embedded in the various Controls that the program may send to it. The Control statement looks like a standard function in the language:<br />
<br />
Syntax:<br />
<br />
Result-string = CONTROL(LUN,Control.String [,EXCP=exception.routine])<br />
<br />
The CONTROL statement sends the specified control-string to the specified logical unit number. In the case of the XAP Gateway, the Logical Unit Number or "LUN" is always 0 (zero).<br />
<br />
The CONTROL statement also reads the result field from the input buffer and places it in the result-string. A plus sign (+) in the first byte of the result-string indicates that the control function was performed successfully. A minus sign (-) in the first byte indicates that the control was not performed successfully. The remaining bytes of the result-string contain text describing the success or failure of the control function.<br />
<br />
The CONTROL statement performs the same function as the following statements:<br />
<br />
FILE (LUN) CTL=control-string<br />
<br />
INPUT (LUN) result-string<br />
<br />
Here are the controls that may be sent to the XAP gateway. Where string constants are used in the examples, string expressions may also be used.<br />
<br />
TYPE – sets a MIME type to the browser. As explained above if no TYPE control is sent, the type is assumed to be HTML and the appropriate header is sent to the browser..<br />
<br />
Result-string = CONTROL (0,"TYPE 0") notifies the XAP gateway that the program will subsequently write its own MIME type header.<br />
result-string = CONTROL(0,"TYPE 1") tells the XAP Gateway to set the mime type to "text/html"<br />
result-string = CONTROL(0,"TYPE 2") tells the XAP Gateway to set the mime type to "text/plain"<br />
Result-string = CONTROL (0,"TYPE 3") tells the XAP Gateway to set the mime type to "text/plain" and supply automatic carriage return line feeds following every write.<br />
<br />
COOKIE – sends a cookie to the browser. This control must be sent before any other data is sent to the browser because the cookie information is part of the header.<br />
<br />
The syntax is as follows:<br />
<br />
A$ = CONTROL (0,'COOKIE cookie-name=cookie-value,time-period')<br />
<br />
Where time-period is the specified length of time for the cookie to be stored in the browser.<br />
<br />
The format for time period is:<br />
<br />
+nM = n minutes into the future<br />
<br />
+nH = n hours into the future<br />
<br />
+nD = n days into the future<br />
<br />
For example, to make the CUSTOMERNUMBER=123456789 cookie stay in the browser system for 25 days, you would use the following statement:<br />
<br />
A$ = CONTROL(0,'COOKIE CUSTOMERNUMBER=123456789,+25D')<br />
REDIRECT – Sends the appropriate commands to the browser so that it will automatically connect to the URL contained in the REDIRECT control. This control must be sent before any other data is sent to the browser because the redirect information is part of the header.<br />
<br />
For example, if you wanted your program to redirect the browser to www.signature.net, you would use the following statement:<br />
<br />
A$ = CONTROL(0,'REDIR http://www.signature.net')<br />
OPEN – performs a "test open" of the file contained in the control to validate whether it is present. This file may be a template file, html file, image file or any file. The named file is opened, and the handle is saved for further operations using that file.<br />
<br />
For example, if you wanted your program to send the image contained in the file "c:\images\logo.jpg" to the browser, you would use the following command:<br />
<br />
A$ = CONTROL (0,'OPEN C:\IMAGES\LOGO.JPG')<br />
<br />
After the execution of this control, the result string A$ would contain "+OK" if the file was successfully opened, or "-ERR error opening path" if the file could not be found.<br />
SEND – Sends the file referred to in the control to the browser. The file is sent to the browser in the fastest way possible. The SEND control may specify a path pointing to the file to be sent --<br />
<br />
A$ = CONTROL (0,'SEND C:\IMAGES\LOGO.JPG')<br />
<br />
or optionally, if no path is specified --<br />
<br />
A$ = CONTROL (0,'SEND')<br />
<br />
the XAP gateway will send a file previously opened by the OPEN control as specified above.<br />
PUSH – Flushes the output buffer contained in the XAP gateway to the browser for debugging purposes or to implement "server push" actions.<br />
MERGE – Merges data from a template file named in the control with data contained in the CGI Environment file, Then sends the resultant merged data stream to the browser. Merge is the most powerful of all of the controls. It merges selected data from the CGI environment file with a template file (or a section of a template file) and sends the resulting web page to the browser.<br />
<br />
The syntax for the MERGE control may take several forms. The general description of the merge command is:<br />
<br />
A$ = CONTROL (LUN,’MERGE Path-name |"." [,SECTION Section-name])<br />
<br />
As you can see, the MERGE command takes an optional path name and an optional section name. Here is how Comet processes a MERGE command.<br />
<br />
Comet first determines if there is a path name specified, or a dot, meaning use the last file either opened from a previous MERGE command or an OPEN command. If a Path name was supplied, that file is opened.<br />
Comet then determines whether a SECTION name was supplied. If a Section name was specified, Comet searches the file for a string of characters such as:<br />
<br />
<!—BEGIN Section-nameà<br />
<br />
If found, the file pointer is set just beyond this string, causing Comet to read data from this point on. If no such string was found, Comet starts reading the e file from the first byte.<br />
If a section was specified in the control statement, Comet then searches the file for an end-of-section string. This string is of the form:<br />
<br />
<!—END Section-nameà<br />
<br />
If such a string is found, a pointer is set to the character just prior to the opening character of this string. This pointer marks the last character sent from the file on this Merge command. If no such string is found, the ending pointer is set to the last character of the file.<br />
Comet then searches the file starting at the current file pointer for an indicator marking data to be inserted. At the current time, this marker is a pair of stars (**).<br />
If such a marker is found, all data is streamed from the file to the Browser up to this marker.<br />
Comet then searches the file for an ending indicator. At the current time this is also a pair of stars (**). If such a marker is found, all characters between the beginning and ending markers (including the **’s) is assembled into a Key to be used in a keyed read on LUN 1. If the read is successful, the data record resulting from this keyed read is streamed to the browser.<br />
If the keyed read was unsuccessful, the first * of the beginning marker is sent to the browser and the process is repeated from step d. above.<br />
Once the entire file or section has been streamed to the browser, the control command is completed.<br />
<br />
It should be noted that the syntax used for the begin and end indicators denotes HTML comments. Thus the markers would not be visible in the html page if the browser displayed them.<br />
<br />
It should also be noted that even though the operations above look like operations on a file, the data is really read into memory and streamed from there for performance reasons.<br />
<br />
Following are two lessons from a tutorial which deal with the MERGE command:<br />
<br />
This lesson and the next one are the most important lessons in the eComet tutorial. In this lesson, you will learn how to merge live Comet data into stored HTML documents.<br />
<br />
Let us repeat that last part (for emphasis): you can merge live Comet data into a stored HTML document in order to make a dynamic return page.<br />
<br />
<br />
<br />
Here's how it works:<br />
<br />
First, create an XAP-ready HTML document. In the locations where you want to include a merge field, surround the field name with double asterisks.<br />
<br />
Here's a sample HTML file. We've included one merge field named **TODAY**.<br />
<br />
<HTML><br />
<br />
<HEAD><br />
<br />
<TITLE><br />
<br />
Sample merge document<br />
<br />
</TITLE><br />
<br />
</HEAD><br />
<br />
<BODY><br />
<br />
This is a sample document.<br />
<br />
Today's date is **TODAY**.<br />
<br />
</BODY><br />
<br />
</HTML><br />
<br />
For the sake of this example, let's suppose we saved this file on drive C: and named the file TODAY.HTM.<br />
<br />
Next, write an Internet Basic program that does two things:<br />
<br />
1.Writes the merge field(s) to the CGI Environment File, using the double-asterisk field name as the key<br />
<br />
2.Merges the HTML document with the CGI Environment File via the MERGE command<br />
<br />
Here's some sample code to show you how this works:<br />
<br />
LENGTH 10 & LOCAL TODAY$<br />
<br />
CGIDATA: FORMAT TODAY$<br />
<br />
TODAY$ = '06/08/2000'<br />
<br />
WRITE (1,CGIDATA) KEY='**TODAY**' ! Write merge field<br />
<br />
A$ = CONTROL(0,'MERGE C:\TODAY.HTM') ! Merge the HTML file<br />
<br />
The WRITE statement writes a record to the CGI Environment file (remember, this file is automatically opened on Logical Unit Number 1 when the XAP program is started). The key is the same as the merge field name in the HTML document (i.e.,**TODAY**).<br />
<br />
The MERGE command merges the HTML document (C:\TODAY.HTM) with any merge field(s) contained in the CGI Environment File. In this example, there's only one merge field.<br />
<br />
The result is a web page that contains "06/08/2000" in the exact location where "**TODAY**" was contained in the stored document.<br />
<br />
Here are some important notes:<br />
<br />
The MERGE command is very similar to the SEND command (i.e., it sends a stored document from the eComet system to the browser.<br />
<br />
The merge field(s) can appear anywhere in the stored document. This means that you can merge Comet data into places where you want data to appear, and you can also merge HTML commands into a stored document (to change the appearance of a web page for a particular user, for example).<br />
<br />
Here's another example. Remember the program (from Lesson 2) that displayed several Comet system variables? Well, we've rewritten that example using the MERGE command.<br />
<br />
First, we created an HTML document and included several merge fields. The "raw" document is named systvar.htm. Take a look at the HTML source code and notice the merge fields (**PARTITION** and the others).<br />
<br />
Next, we created an Internet Basic program that writes the desired merge records to the CGI Environment File. Look at the following source code and notice the WRITE statements.<br />
<br />
!---------------------------------------------------------------------<br />
<br />
!<br />
<br />
! *** Main program<br />
<br />
!<br />
<br />
A$ = DSTAT('CL1') ! Refresh TIME$<br />
<br />
!<br />
<br />
OPEN (10) '#CGICTRL' ! Open CGI control file<br />
<br />
READ (10,HTMLPATH) KEY='**HTMLPATH**' ! Get HTML path<br />
<br />
HTMLPATH$ = STRIP(HTMLPATH$) ! Strip blanks<br />
<br />
CLOSE (10)<br />
<br />
!<br />
<br />
! *** Write merge fields to CGI file<br />
<br />
!<br />
<br />
OUTPUT$ = PARTITION$ ! Partition #<br />
<br />
WRITE (1,OUTPUT) KEY='**PARTITION**' ! Write record<br />
<br />
!<br />
<br />
OUTPUT$ = TIME$ ! System time<br />
<br />
WRITE (1,OUTPUT) KEY='**TIME**' ! Write record<br />
<br />
!<br />
<br />
OUTPUT$ = DATE$ ! System date<br />
<br />
WRITE (1,OUTPUT) KEY='**DATE**' ! Write record<br />
<br />
!<br />
<br />
OUTPUT$ = LONGYEAR$ ! 4-digit year<br />
<br />
WRITE (1,OUTPUT) KEY='**LONGYEAR**' ! Write record<br />
<br />
!<br />
<br />
OUTPUT$ = VERSION$ ! Version #<br />
<br />
WRITE (1,OUTPUT) KEY='**VERSION**' ! Write record<br />
<br />
!<br />
<br />
! *** Merge the CGI file with the HTML file, and send the results<br />
<br />
!<br />
<br />
MERGESTRING$ = 'MERGE '+HTMLPATH$ + 'systvar.htm' ! Build MERGE string<br />
<br />
A$ = CONTROL(0,MERGESTRING$) ! Merge<br />
<br />
!<br />
<br />
KILL PARTITION$<br />
<br />
Note<br />
<br />
The MERGE command may also be executed via the FILE statement, as shown here:<br />
<br />
FILE (0) CTL='MERGE ______________'<br />
<br />
HTML file name<br />
<br />
<br />
<br />
In Lesson 3, we showed you how to send multiple stored documents to the web browser with the SEND command. The MERGE command can be used to do the same thing.<br />
<br />
For example, here's a program segment that sends 3 stored documents via the MERGE command:<br />
<br />
A$ = CONTROL(0,'MERGE c:\ecomet\html\sample3x.htm')<br />
<br />
A$ = CONTROL(0,'MERGE c:\ecomet\html\sample3y.htm')<br />
<br />
A$ = CONTROL(0,'MERGE c:\ecomet\html\sample3z.htm')<br />
<br />
Please note these differences between SEND and MERGE:<br />
<br />
The MERGE command invokes the merge feature, while the SEND command does not<br />
<br />
There's another very important difference between SEND and MERGE. The MERGE command can send sections of an HTML document. The sections are user-defined portions of the HTML file.<br />
<br />
These sections are defined via the HTML comment tag and some XAP-specific keywords within each comment. Here's an example:<br />
<br />
<!--BEGIN ABC123--><br />
<br />
This is a section of HTML code. This<br />
<br />
section includes text as well as HTML<br />
<br />
<font color="ff0000">commands</font>.<br />
<br />
<p><br />
<br />
This whole section is defined by the<br />
<br />
BEGIN and END statements, which are<br />
<br />
contained within HTML comments.<br />
<br />
<!--END ABC123--><br />
<br />
The browser ignores the BEGIN and END statements, since they're contained within HTML comments. However, the MERGE command uses the BEGIN and END commands to defined a section of the file. This section is called ABC123.<br />
<br />
Assume that you saved the above HTML file as:<br />
<br />
c:\ecomet\html\test.htm<br />
<br />
Here's how you would send this section of the HTML file via the MERGE command:<br />
<br />
A$ = CONTROL(0,'MERGE c:\ecomet\html\test.htm SECTION ABC123')<br />
<br />
Some important notes:<br />
<br />
There is no limit to the number of sections you may define <br />
<br />
The first section in an HTML document does not require a <!--BEGIN--> statement <br />
<br />
The final section does not require an <!--END--> statement. <br />
<br />
No blank spaces are allowed at the beginning of these commands (i.e., inside of the "<!--BEGIN" string and the "<!--END" string)<br />
Each section must have an alphanumeric section label (currently a maximum of 28 characters per label)<br />
When using sections in an HTML document, make sure all of your HTML code and text is between a <!--BEGIN--> statement and an <!--END--> statement. Content outside of those boundaries will not be sent to the browser. <br />
<br />
The next example is based on the sample program you saw in Lesson 4. In this case, we will be merging data from a Comet data file, the DLRS file, into a stored HTML document.<br />
<br />
The HTML document will be divided into 3 sections, named TOP, MIDDLE, and BOTTOM.<br />
<br />
The TOP section will contain the initial HTML commands and text for the top portion of the web page. Since this is the first section, we don't need a <!--BEGIN--> statement.<br />
<br />
<HTML><br />
<br />
<HEAD><br />
<br />
<TITLE><br />
<br />
Comet Dealers<br />
<br />
</TITLE><br />
<br />
</HEAD><br />
<br />
<BODY BGCOLOR="FFFFFF"><br />
<br />
<CENTER><br />
<br />
<H1><br />
<br />
Comet Dealers<br />
<br />
</H1><br />
<br />
</CENTER><br />
<br />
<HR><br />
<br />
Here is a list of Comet dealers.<br />
<br />
This data is contained in a<br />
<br />
Comet keyed file named <B>DLRS</B>.<br />
<br />
The DEMO11B program reads records<br />
<br />
from that file and displays the<br />
<br />
complete list of names.<br />
<br />
<P><br />
<br />
<!--END TOP--><br />
<br />
The MIDDLE section will be very short. In this section, we will include a merge field named **DEALER**, followed by a line break tag (<BR>):<br />
<br />
<!--BEGIN MIDDLE--><br />
<br />
**DEALER**<br />
<br />
<BR><br />
<br />
<!--END MIDDLE--><br />
<br />
By itself, the MIDDLE section does not look very impressive. Just wait until you see the way we use Internet Basic to merge data into this section!<br />
<br />
The BOTTOM section will contain the final HTML commands for our sample web page:<br />
<br />
<!--BEGIN BOTTOM--><br />
<br />
</BODY><br />
<br />
</HTML><br />
<br />
<!--END BOTTOM--><br />
<br />
We'll save the above file and name it:<br />
<br />
c:\ecomet\html\dealers.htm<br />
<br />
Now all we have to do is write an Internet Basic program that sends the 3 sections (and merged data) to the web browser. The first MERGE command will send SECTION TOP:<br />
<br />
A$ = CONTROL(0,'MERGE c:\ecomet\html\dealers.htm SECTION TOP')<br />
<br />
The next part of the Internet Basic program will READ data from the DLRS file, WRITE a key to the CGI Environment File, and MERGE SECTION MIDDLE. These steps will be repeated for all of the records in the DLRS file:<br />
<br />
OPEN (10) 'DLRS'<br />
<br />
ReadMore:<br />
<br />
READ (10,DEALERINFO) EXCP=AllDone<br />
<br />
WRITE (1,DEALERINFO) KEY='**DEALER**'<br />
<br />
A$ = CONTROL(0,'MERGE . SECTION MIDDLE')<br />
<br />
GOTO ReadMore<br />
<br />
Notice that the key value (**DEALER**) matches the merge field in the HTML file.<br />
<br />
Also notice that the MERGE command contains a different format than before. If you are merging more than one section of an HTML file, you only have to specify the file name once (on the first MERGE command). After that, you can use the period (.) to represent the HTML file name.<br />
<br />
The period is both a coding shortcut and a way to get faster performance from the MERGE command. Once an HTML file has been opened and read into memory, there's no need to re-open and re-read it. Thus, the period refers to a document that is already in memory.<br />
<br />
The final section the program closes the data file and sends the BOTTOM section of the HTML file:<br />
<br />
AllDone:<br />
<br />
CLOSE (10)<br />
<br />
A$ = CONTROL(0,'MERGE . SECTION BOTTOM')<br />
<br />
KILL PARTITION$<br />
<br />
Here's something to Think About<br />
<br />
As we mentioned above, merge fields can appear anywhere in an HTML file, including HTML commands and parameters. For example, you could include a merge field where you would normally include a hard-coded parameter, as in the BACKGROUND portion of the BODY tag:<br />
<br />
<BODY BACKGROUND="**PICTURE**"><br />
<br />
Then, from within an Internet Basic program, you could define a specific background graphic simply by writing the **PICTURE** key to the CGI Environment File and merging it with your HTML file.<br />
<br />
PICTURE: FORMAT PICTURE$<br />
<br />
.<br />
<br />
PICTURE$ = "SAMPLE.GIF"<br />
<br />
WRITE (1,PICTURE) KEY="**PICTURE**"<br />
<br />
A$ = CONTROL(0,'MERGE HTML-document SECTION section-name')<br />
<br />
You could use this technique to good effect, for example, by displaying a unique background graphic for each customer who uses your web site. You could determine who's who by reading a persistent cookie (assuming you had already sent one to the browser), getting unique data from that cookie (a customer number, let's say), and using that data to read a GIF or JPG file name from a keyed file. Then you could write that file name to the CGI Environment File and merge it into an HTML file, as shown in the code segment above. This would result in a very personalized web site for each of your customers.<br />
<br />
<br />
<br />
*Keyed Files<br />
<br />
Keyed files provide direct access to the data records.<br />
<br />
Comet stores data for keyed files in two DOS disk files. One DOS file stores the data records in their entered order, and a "key tree" file stores the record keys in ascending ASCII order.<br />
<br />
An individual record may be retrieved using this identifier using the KEY= parameter of the READ (or associated input) statement.<br />
<br />
A keyed file may also be read in key-sequential order; records are retrieved in ascending sorted key order.<br />
<br />
The index for a keyed file is a string field from 1 to 64 characters long. When the file is created, the key length is specified. So is the record length; this value ranges from 1 to 1,024 bytes, and is fixed for each record in the file. Because of the ease of use and advantages of direct access, keyed files are the most common types of data files used in Internet Basic applications.<br />
<br />
When an Internet Basic program opens a keyed file, the Comet operating system assigns a unique file pointer to the file. Each user opening the file is assigned a unique pointer, allowing multiple users to access data from the same file at the same time. To avoid data integrity problems when more than one user is accessing a file, Internet Basic provides a record locking mechanism. The EXTRACT statement is used to read and lock individual data records.<br />
<br />
As a user accesses records in a keyed file, the file pointer keeps track of the current location. When the file is opened, the pointer is located at the record associated with the first key. If the records are retrieved without an index, the pointer moves along in ascending ASCII order of the key values (i.e., in key-sequential order).<br />
<br />
When a record is accessed directly using an index, the pointer is moved to the associated position. If no record is found matching the specified index, an exception occurs, but the pointer is located at the index following the requested index value. From this point, the program could retrieve records in sequence (without an index), or retrieve another record from the file using another index value.<br />
<br />
Keyed files may also be accessed with a numeric index. In this case, the index value is used to specify the record number in the file in record number sequence (rather than in key sequence).<br />
<br />
Application notes:<br />
<br />
Since Key trees are built using "Balanced B Tree" structures, access to specific records is very fast. Depending on key length, access to a single record in a file of several million records may only take 3 or 4 reads from the underlying file system.<br />
A keyed file provides the most convenient way to randomly access a file. Therefore, most Internet Basic programs use keyed files to store data records.<br />
When a record is deleted from a keyed file, the vacated space is automatically reused by the file to store subsequent records. This advantage is another reason why keyed files are predominant in Internet Basic applications.</div>
Jim
http://wiki.signature.net/index.php/IB_enhancements_for_Comet32
IB enhancements for Comet32
2013-11-23T07:19:57Z
<p>Jim: minor</p>
<hr />
<div>[[IB_Statements/SearchFile|'''Search File - C32''']]<br />
<br />
[[IB_Statements/InputFile_and_PrintFile|'''InputFile and PrintFile - C32''']]<br />
<br />
[[IB_Statements/GetFormat|'''GetFormat and SetFormat - C32''']]<br />
<br />
[[IB_Statements/UserDefinedProcs|'''User Defined Procedures''']]<br />
<br />
Comet32 Numeric Processing<br />
* Comet32 provides much enhanced numeric handling over Comet16.<br />
* Numeric variables can be as long as 32 decimal places. This is twice the length of Comet16.<br />
* Expression results are calculated to length 64.32 so that partial results of expressions are preserved.<br />
* The following Comet16 Functionality is supported::<br />
Add, z = x + y<br />
Subtract, z = x - y<br />
Multiply, z = x * y<br />
Divide, z = x / y<br />
Negate, z = - x<br />
Abs, z = abs(x) -- Return the absolute value of x<br />
Int, z = int(x) -- Return the integer portion of x<br />
Fpt, z = abs(x) -- Return the fractional portion of x<br />
Sgn, z = abs(x) -- Return the sign of x (-1,0,+1)<br />
Num, z = num(a$,err) -- Return the string a$ converted to a number.<br />
Asc, z = asc(a$) -- Return the ascii equivalent of the first character in a$.<br />
Len, z = len(a$) -- Return the length of string a$.<br />
BitwiseAnd, z = x and y<br />
BitwiseOr, z = x or y<br />
BitwiseXor, z = x xor y<br />
BitwiseNot, z = not(x)<br />
Mod, z = x mod y -- Divides int(x) by int(y) and return the remainder<br />
Sqrt, z = sqrt(x) -- Return the Square Root of x<br />
Rnd, z = rnd() -- Return a "random number" between 0 and 1<br />
Many additional math functions are supported in Comet32:<br />
Cbrt, z = cbrt(x) -- Return the Cube Root of x<br />
Log, z = log(x) -- Return the base-e logarithm of x, so x==exp(z)<br />
Log10, z = log10(x) -- Return the base-10 logarithm of x, so x==pow(10,z)<br />
Exp, z = exp(x) -- Return e raised to the power x, so x==log(z)<br />
Pow, z = pow(x,y) -- Return x raised to the power y<br />
Sin, z = sin(x) -- Return the sine of x, with x in radians<br />
Cos, z = cos(x) -- Return the cosine of x, with x in radians<br />
Tan, z = tan(x) -- Return the tangent of x, with x in radians<br />
Asin, z = asin(x) -- Return the inverse sine of x, in radians<br />
Acos, z = acos(x) -- Return the inverse cosine of x, in radians<br />
Atan, z = atan(x) -- Return the inverse tangent of x, in radians<br />
Atan2, z = atan2(y,x) -- Return the 4 quadrant inverse tangent of y/x<br />
Sinh, z = sinh(x) -- Return the hyperbolic sine of x<br />
Cosh, z = cosh(x) -- Return the hyperbolic cosine of x<br />
Tanh, z = tanh(x) -- Return the hyperbolic tangent of x<br />
Asinh, z = asinh(x) -- Return the inverse hyperbolic sine of x<br />
Acosh, z = acosh(x) -- Return the inverse hyperbolic cosine of x<br />
Atanh, z = atanh(x) -- Return the inverse hyperbolic tangent of x<br />
Factorial, z = factorial(x)-- Return the factorial of x<br />
Floor, z = floor(x) -- Return the floor (next lowest integer value) of x.<br />
Ceil, z = ceil(x) -- Return the ceil (next highest integer value) of x.<br />
Gcd, z = gcd(x,y) -- Return the GCD (greatest common divisor) of x, y.<br />
Lcm, z = lcm(x,y) -- Return the LCM (least common multiple) of x, y.<br />
<br />
Beware! The following code will not work the same for Comet32 as it did for Comet16:<br />
For I = 0 to 99 <br />
A$ = "T" + sub(str(i+100),15,2)<br />
Next i <br />
<br />
Because the result of the addition is in the accumulator which has changed.<br />
<br />
The following code will ALWAYS work for both Comet16 and Comet32:<br />
For I = 0 to 99<br />
A$ = `T' + sub(strip(str(i+100)),2,2)<br />
Next I</div>
Jim
http://wiki.signature.net/index.php/File:sign.jpg
File:sign.jpg
2013-10-29T22:32:54Z
<p>Jim: </p>
<hr />
<div></div>
Jim
http://wiki.signature.net/index.php/Using_the_email_printer
Using the email printer
2013-06-25T07:37:06Z
<p>Jim: </p>
<hr />
<div>==Email Printing with Comet==<br />
© 2007 Signature System Inc.<br />
<br />
Within a few minutes you can configure a "printer" that will automatically email any text, HTML, or PDF document produced using Comet's printer drivers.<br />
<br />
==Understanding SMTP==<br />
The Email Printer uses a DES program called EMAILPTR. It talks the SMTP protocol. <br />
SMTP stands for '''S'''imple '''M'''ail '''T'''ransport '''P'''rotocol. It is the basic protocol used to send mail over the internet. SMTP mimics the process of sending a package or letter by snail mail or delivery service. When mailing a physical letter, you first write the letter itself (the body), then write the envelope and then take the envelope to the post office, giving delivery instructions.<br />
<br />
===There are 3 sections of an SMTP email transaction.===<br />
<br />
====1. The SMTP routing instructions:====<br />
* The connection server and port (Connect)<br />
* The introduction (Domain)<br />
* Optional Authentication (User and Password)<br />
* The Sender's ID (Mail from)<br />
* The destination (rcpt to)<br />
* Other SMTP Commands<br />
<br />
====2. The "envelope" or Header====<br />
* The date<br />
* From<br />
* To<br />
* Subject<br />
* Other Header elements<br />
<br />
====3. The body of the mail====<br />
* Possibly multiple parts, each a different format.<br />
<br />
==Requirements==<br />
<br />
There are a few requirements to make this feature work. <br />
<br />
* A WinSock gateway configured. It is better to configure multiple WinSock Gateways.<br />
* A COM license for CometLib. <br />
* A connection to the Internet. <br />
* A reachable SMTP server. <br />
* The TMP directory for Comet must be configured as a CFAM directory and it must be configured in SYSGEN using the $(CATEMP) alias: <br />
00 = c ,$(catemp); <br />
<br />
==Configuration==<br />
<br />
You can designate TEXT, HTML, and PDF printers as email printers. Here is a sample of a section of an INI file:<br />
<br />
Printer = leh,h,n,,htm,EmailPtr; <br />
Printer = lep,p,n,,pdfFactory,EmailPtr; <br />
Printer = let,x,n,,txt,EmailPtr; <br />
<br />
We could have named the printers any device name beginning with an "L". What designates this as an email printer is the DES program "EmailPtr". This DES program is released as part of the REL Directory.<br />
<br />
===Doc Manager===<br />
You can configure a printer as both an email printer and an archive printer.<br />
<br />
Printer = LPI,p,x,SPL:invoices,Adobe PDF,EmailPtr;<br />
<br />
Every document printed to that printer would be rendered in PDF by the Adobe Pdf driver, emailed, and placed into the INVOICES docmanager archive. With appropriate Email.ini settings (see below), no program changes would be required other than selecting 'LPI' as the printer.<br />
<br />
==Mnemonics==<br />
<br />
There are several mnemonics specifically related to the email printer. First, you need to specify the smtp server name and port to be used to send your email.<br />
<br />
Print (lun) (Server='smtp.ourserver.net mail')<br />
<br />
Look at the server settings in your email program for the correct setting for this. The word "mail" above is an alias for port 25. Thus, you could have written <br />
<br />
Print (lun) (Server='smtp.ourserver.net 25') <br />
<br />
and accomplished the same thing. You can use any port mandated by your ISP. Port 25 is the default. If you do not specify a port as part of the server name, the email printer will attempt to use port 25. Note: Beginning with Comet 2006 you are able to send email from smtp servers that require authentication.<br />
<br />
If you wish, you may also specify a domain name. <br />
<br />
Print (lun) (Domain='signature.net')<br />
<br />
If it is not specified, the email printer will supply the same domain as designated in the server mnemonic. <br />
<br />
To specify the sender's name you use the "From" mnemonic.<br />
<br />
Print (lun) (From='"jim guerber"<jim@@signature.net>')<br />
<br />
This is used both for SMTP routing (MAIL FROM:) and for the mail message header (From:). It should be set to a valid email address. <br />
<br />
Use the "To" mnemonic to specify your recipients. This will be used for SMTP routing (RCPT TO:) and the header (To:).<br />
<br />
Print (lun) (To = 'jim<jim@@signature.net>')<br />
Print (lun) (To = 'gina@@signature.net') <br />
<br />
You must specify at least one recipient. Use multiple instances of this mnemonic to send your email to more than one recipient. CC and BCC recipients may be specified in addition to or instead of TO recipients. <br />
<br />
Print (lun) (CC = 'barbara@@signature.net')<br />
Print (lun) (BCC = 'brian@@signature.net') <br />
<br />
You must include a subject for your email, use the "Subject" mnemonic. <br />
<br />
Print (lun) (Subject='The Subject of this email') <br />
<br />
In addition to whatever is written to the email printer, you may want to include body text. Depending on your email client, for html printers body text will either appear in an attachment, since it is usual for HTML to appear as the main body of the email, or it will be appended following the html content. For PDF printers, this text will be the main body of the email and the PDF will appear as an attachment. For text printers, the body text will appear just before the printer output. To specify body text, use the "Text" mnemonic.<br />
<br />
Print (lun) (Text='yada yada yada') <br />
<br />
The email printer will optionally write to a log file, recording details about each email sent, including responses from the smtp server. The log file is a text file located on any directory to which the user has access. The email printer will append to this log file. The log file may optionally be erased before the print job is run. Otherwise, it is up to the administrator or outside program to erase this file periodically. <br />
<br />
Print (lun) (Log='file','dir','erase') <br />
<br />
If the log file name is not specified, a file named "email.log" will be used. If the email directory is not specified, "COS" will be used. By default, the file will not be erased. If there is no LOG statement at all, no log file will be generated.<br />
<br />
If you wish to specify a name for an attachment to your email, use the (EmailDocument=) mnemonic. <br />
<br />
Print (lun) (EmailDocument='file') <br />
Without the (EmailDocument=) mnemonic, the attachment would carry the default name of the document.<br />
<br />
==Formatting of email addresses==<br />
<br />
In the examples above, we have shown a few different ways to specify an email address. Mail programs like addresses formatted in the following way: "FirstName LastName"<email@domain.tld> Any of the following should work: <br />
<br />
Print (lun) (To = 'Jim Guerber<jim@@signature.net>') ! Best <br />
Print (lun) (To = 'Jim<jim@@signature.net>') ! ok <br />
Print (lun) (To = 'jim@@signature.net') ! worst <br />
<br />
If there is no space character in the name the double quotes are not necessary. Most email programs will take some sort of shortened form of email address, even just the address with no <> such as email@domain.tld, but some spam detection programs may object to this simple form. Note the use of double @ characters as an escape convention of Internet Basic. <br />
<br />
Email addresses used in the SMTP routing instructions "mail from" and "rcpt to" will have any name information (like "Jim Guerber" in the above example) stripped out. Microsoft Exchange Server doesn't tolerate anything other than the simple email address.<br />
<br />
== A Note on Verifying Email Addresses==<br />
<br />
If you're going to do email address validation, consider that VRFY and EXPN are blocked by most ISPs nowadays. Also, simulating VRFY by stacking RCPT TO: commands is something that spammers do. ISPs know this, and the smarter ones track how often you do this. You'll get blocked after some number of attempts. I wouldn't go looking for a lot of sympathy from ISPs when trying to get unblocked afterwards, as the ISPs consider this a very bad practice that good guys don't engage in.<br />
==The email.ini file==<br />
<br />
Several settings for email printers never (or rarely) change. These settings can be placed in an initialization file (INI File). The email printer will look for a file named email.ini which can contain those settings. The email.ini file is optional since all values may be supplied by mnemonics in the program, but it may be a more convenient way to supply some parameters such as the smtp server name. Lines beginning with an exclamation marks ! are treated as comments.<br />
<br />
====Mnemonics vs the Email.ini file====<br />
The information required for an email may be either specified by the use of mnemonics, or placed in a text file called email.ini or both. You may want to setup a standard email.ini file containing items that remain constant from one email to another such as server and domain, and specify the rest of the info using mnemonics, or you may want to write a new email.ini file in the temp directory containing all of the information required before initiating the email program. <br />
* The email.ini file is not processed until the printer is closed. This means that any time during the execution of the print program, you may add items to the email.ini file.<br />
* Each print of a mnemonic causes a new line to be generated in the document (the email body) unless Transparent mode is specified (TR).<br />
* Use of the email.ini file allows general print programs to generate email with no change.<br />
<br />
The email printer will look for an equal sign (=) as a delimiter between the parameter name and the value. If an equal sign is not found, the whole line will be treated as text. This is the same as using the "text=" parameter. Here's an example:<br />
<br />
server = smtp.ourserver.net <br />
from = OrderProcessing@OurCompany.com <br />
bcc = AcctsReceivable@OurCompany.com <br />
subject = Thank you for your order <br />
Thank you for your recent order. The attached document contains your invoice and delivery schedule. <br />
<br />
Using the preceding email.ini file, all that the program would need to supply is the recipient's email address (using the (To=) mnemonic) and write the unique details of the message to the email printer. Note that Accounts Receivable will automatically receive a copy (bcc) of each email.<br />
<br />
Some mnemonics supplied by the program have precedence over the email.ini settings. In other cases both values from a mnemonic AND values from the email.ini file will be used. Those mnemonics which will super cede the equivalent setting in the email.ini file are Server, Domain, From, Subject, and Log. And, if you were to try to use more than one of any of those mnemonics for a given email, only the first one of each would be used. The other settings: To, CC, BCC, and Text, may have multiple occurrences. And, if you use these mnemonics and have equivalent settings in the email.ini, they will all be processed for your email. <br />
<br />
==Attachments==<br />
<br />
Before understanding attachments, It is good to know the order documents get placed in the email for various printers. For the sake of this document we will call any text specified by the (text=)mnemonic or in the email.ini file "body text". For all email print jobs there are three possible components that are transmitted. The order depends on the printer type.<br />
<br />
For HTML printers, the email is composed of the HTML generated for the printer, followed by the body text, and then any attachments specified.<br />
<br />
For Text printers, email is composed of the printer output followed by body text and then attachments.<br />
<br />
For PDF printers, the email is composed of body text, followed by the printer output as an attachment and then followed by any other attachments specified.<br />
<br />
To add an attachment to the email document, either use the (attachment=path) mnemonic or specify the attachment in the INI file. The path specified must be a valid windows path (use either drive letter or UNC conventions), and does not need to be a Comet file or reside in a Comet directory. Any number of attachment files may be specified. The Emailptr program attempts to determine the mime type of the file by reading the mime keyed file in the rel directory using the file extent ion as the key. If the mime type is not determine able, the default mime type of "application/octet-stream" is used.<br />
<br />
==Return Receipts==<br />
<br />
Occasionally you may want to know when the receiver of your email reads it. Some (not all) email programs support the "Return-Receipt-To:" command. You may specify (a single) return receipt address either in the ini file or by using the (rr=) mnemonic. Following the equal sign must be a valid email address. <br />
<br />
==Silent Running==<br />
<br />
The Emailptr will sometimes put up a message box if some component of the email such as the subject is missing. This will stop any program that is designed to produce a series of emails, and would crash if run from a background partition. For that reason, there is an extra instruction in the email.ini file to take care of this situation. If you do not want the emailptr to send any output to the screen, include the '''silent''' command in the email.ini file. If this command appears alone, the emailptr will simply close the email and continue. You may also optionally specify a program to be entered each time an error is encountered. In that case, # buffer will contain the error information (the text that would normally appear in the message box.<br />
<br />
==Other SMTP commands and header lines==<br />
<br />
You may want to supply other commands to the SMTP server or place additional commands in the header. There are 2 commands that allow you to do that. <br />
<br />
'''SmtpCmd=text''' includes the text into the smtp routing instructions. I can't find any good examples of why you would want to send one of these things, but in the future, some Exchange server or something may require one of these.<br />
<br />
'''Smtphdr=text''' includes the text in the envelope (the header). There are several interesting commands you could want to put here, but most of them are obsolete.<br />
<br />
Examples are:<br />
<br />
print (LUN)(SmtpHdr='X-Priority: 1') ! mark the email as urgent<br />
<br />
==Reference==<br />
<br />
For reference, here is a complete list of mnemonics and their corresponding email.ini file settings: <br />
{| border="1" cellpadding="2"<br />
|-<br />
!width="225"| Mnemonic<br />
!width="400"| Ini file<br />
|-<br />
| (log = log$)<br />
| log = email.log,cos,cycle<br />
|-<br />
| (server = server$) <br />
| server = smtp.ourserver.net <br />
|-<br />
| (domain= domain$) <br />
| domain= smtp.ourserver.net <br />
|-<br />
| (user = user$) <br />
| user = username <br />
|-<br />
| (password= pw$) <br />
| password = MyPassword <br />
|-<br />
| (from = from$) <br />
| from = OrderProcessing@OurCompany.com<br />
|-<br />
| (to = to$)<br />
| to = youraddress@yourisp.net<br />
|-<br />
| (cc = cc$) <br />
| cc = mylawyer@protectme.net <br />
|-<br />
| (rr= ReturnReceipt$)<br />
| rr = returnReceipt@OurCompany.com <br />
|-<br />
| (bcc = bcc$) <br />
| bcc = AcctsReceivable@OurCompany.com <br />
|-<br />
| (subject = Subject$) <br />
| subject = Thank you for your order <br />
|-<br />
| (attachment = a$) <br />
| attachment = c:\boilerplate\terms.pdf <br />
|-<br />
| (silent = 'myprog')<br />
| silent = myprog<br />
|-<br />
| (SmtpCmd = 'help')<br />
| SmtpCmd=help<br />
|-<br />
| (SmtpHdr=h$)<br />
| SmtpHdr=X-Priority: 1<br />
|-<br />
| ssl=true<br />
|-<br />
| tls=true<br />
|}<br />
==Notes==<br />
Here is an interesting article aimed at writers of smtp servers with techniques for filtering spam. It is useful to us so that we can better format our emails to avoid being labeled as "ratware".<br />
<br />
[http://slett.net/spam-filtering-for-mx/ Spam Filtering for Mail Exchangers]</div>
Jim
http://wiki.signature.net/index.php/Main_Page
Main Page
2013-01-10T17:57:51Z
<p>Jim: added CometAnywhere Mobile</p>
<hr />
<div>='''Comet by Signature Systems, Inc.'''=<br />
On the New Server<br />
* [[Subscription Benefits]]<br />
* Get your questions answered with [[FAQ2010|The Comet2010 FAQ]]<br />
<br />
* [[CFILES - the replacement for DbMgr]]<br />
<br />
* [[Comet Meeting -- October 12, 2010]]<br />
<br />
* [[Comet Meeting -- August 10, 2009]]<br />
<br />
* [[Comet_Meeting -- April_2012]]<br />
<br />
* [[Configuration and Installation]]<br />
<br />
* [[Programming]]<br />
<br />
* [[Comet32]]<br />
<br />
* [[Xap2]]<br />
<br />
* [[CometAnywhere Mobile]]<br />
<br />
* [[Products]]<br />
<br />
* [[Utilities]]<br />
<br />
* [[Comet Tips]]<br />
<br />
* [http://support.signature.net/ Support - Users Forum]<br />
<br />
* [[How to edit this Wiki]]<br />
<br />
* '''[http://cc.signature.net/guest/adduser Request ability to edit pages on this Wiki]'''<br />
<br />
*[[Historical Dealer Meetings]]<br />
<br />
*[[Comet2010]]<br />
<br />
A hint from the old guy. The Wiki's text size is based on the browser's settings. In '''Firefox''' I set the minimum font size to 16.<br />
<br />
Tools >> Options >> Content >> Advanced. Minimum font size.</div>
Jim