home *** CD-ROM | disk | FTP | other *** search
-
- ΓòÉΓòÉΓòÉ 1. Extended Help ΓòÉΓòÉΓòÉ
-
- There is a collection of utilities in the File section such as; Scripts,
- Capture, Print, Copy, and Paste. There is also an About box that has
- information on Multi-Net Communications, the company that wrote this software.
-
- In the Edit section there are commands such as Copy, Paste, and Clear_Screen.
- These commands will help you manipulate on-screen information.
-
- The Connect command allows you to connect to another computer, either through a
- modem, using the Dial command or direct connect, using the Send_Break command.
-
- Transfer allows the use of different protocols to send and receive files to or
- from a remote computer. The protocol options are Xmodem_Checksum, Xmodem_CRC,
- 1K-Xmodem, Ymodem(batch), Ymodem-g(batch), Zmodem, CISB, and ASCII. Zmodem is
- probably the best selection when available on the remote computer. Ymodem-G
- should only be used with error correcting modems.
-
- Hang-up sends the hang-up command string (see the Option menu) and optionally
- drops the dtr line to the modem. Dropping dtr is the most effective if your
- modem is setup to hang-up when dtr is dropped. Using a hang-up string is also
- slower, because Pmcomm has to get the modem into the command state before
- sending the hang-up string. If you have dtr on and delete the hangup string the
- hang-up will be much faster.
-
- Option allows you to tailor Pmcomm to your own tastes. The areas in option are
- Port, Dial_Setup, Modem, Protocols, Paths, Macros_Setup, Screen, Terminal, and
- Color. The setup is not automatically saved. This allows you to change things
- temporally without changing your default setup file. If you do want to make the
- changes permanent be sure to save the setup file. To save the current setup
- file, use the Save_setup command under the File menu option.
-
- Macros allows you to pick, with a mouse, the macro you wish to send. Macros can
- also be selected with an Alt+corresponding number keystroke. Pmcomm allows you
- to set up ten different macros.
-
-
- ΓòÉΓòÉΓòÉ 1.1. Keys Help ΓòÉΓòÉΓòÉ
-
- The following is a list of "Hot keys" available.
-
- F1 = Help.
-
- F3 = Exit.
-
- Alt-D = Dialing directory.
-
- Alt-H = Hangup.
-
- Alt-X = Exit.
-
- Ctrl-Break = Send break.
-
- Ctrl-Insert = Copy.
-
- Shift-Insert = Paste.
-
- Page-Dn = Download.
-
- Page-Up = Upload.
-
- Print Scrn = Prints text in the visible
- window (full line length).
-
- The up and down arrow keys default to scrolling the window. You can change
- this in the setup terminal dialog box so that when in ANSI mode the arrow keys
- will be sent to the modem.
-
- In VT100 mode, some keys have been changed to try to closely emulate the VT100
- keyboard. F1-F4 are now the PF keys. Because of this the F1 key will not
- display the normal help, and F3 will not exit the program. The PF keys will
- send the following characters:
-
- F1 = ESCOP
-
- F2 = ESCOQ
-
- F3 = ESCOR
-
- F4 = ESCOS
-
- Where ESC is equal to the ASCII character hex 1B. All other hot keys will not
- be available. When the num lock key is off the numerical key pad will be in
- the application mode. If you are connecting to a VT220 Host you can use these
- keys to send the VT220 PF key values. For example pressing the 1 on the
- numeric key pad will send the VT220 PF1 key. Pressing the 3 on the numeric key
- pad will send the VT220 PF3 key, and so on.With the num lock on the numbers
- will be sent. The plus key has been re-mapped to be a comma, again to be
- compatible with the VT100 keyboard.
-
-
- ΓòÉΓòÉΓòÉ 2. File ΓòÉΓòÉΓòÉ
-
- There is a collection of utilities in this section such as; Save_setup,
- Scripts, Capture, Print, Copy, and Paste. There is also an About box that has
- information on Multi-Net Communications, the company that wrote this software.
-
-
- ΓòÉΓòÉΓòÉ 2.1. Save Setup ΓòÉΓòÉΓòÉ
-
- Saves user definable configurations, as well as screen size and position.
-
-
- ΓòÉΓòÉΓòÉ 2.2. Capture ΓòÉΓòÉΓòÉ
-
- Capture saves everything that is received from the modem to a file. For
- example, you can capture all new messages and then read them after you hang
- up. If you specify PRN as the filename everything will be captured to the
- printer.
-
-
- ΓòÉΓòÉΓòÉ 2.2.1. Start Capture ΓòÉΓòÉΓòÉ
-
- You will be prompted for a file name and then everything that comes in from the
- modem will be saved to that file. If PRN is selected then everything will be
- sent to the printer.
-
-
- ΓòÉΓòÉΓòÉ 2.2.2. Cancel Capture ΓòÉΓòÉΓòÉ
-
- This command will turn off capture. This command will only work if capture was
- started with the Start_Capture command.
-
-
- ΓòÉΓòÉΓòÉ 2.3. Scripts ΓòÉΓòÉΓòÉ
-
- Scripts allow you to have the computer perform certain tasks automatically. The
- internal commands available are;
-
- wait_for
- puts
- sleep
- call
- capture_on
- capture_off
- shell
-
- The REXX commands that are available are;
-
- init_dll
- setcom
- sendb
- dcd
- char_avail
- read_timeout
- Get_ch
- ring_detect
- drop_dtr
- raise_dtr
- Wait_for
- Wait_fore
- Put_s
- Sleep
- beep
- xmodem_send
- xmodem_receive
- xmodem_1k_send
- xmodem_1k_receive
- ymodem_send
- ymodem_receive
- ymodemg_send
- ymodemg_receive
- zmodem_send
- zmodem_receive
- ascii_send
- ascii_receive
- set_download_path
- os2_shell
-
- The scripts command is only available in the registered version of Pmcomm.
-
-
- ΓòÉΓòÉΓòÉ 2.3.1. Start Scripts ΓòÉΓòÉΓòÉ
-
- With this command you can start a pre-written script at any time. Just enter
- the file name of the script. This script must be in the same directory as the
- program.
-
-
- ΓòÉΓòÉΓòÉ 2.3.2. Script Dialog ΓòÉΓòÉΓòÉ
-
- The Script Dialog displays information and options about the current script.
- When the dialog is displayed you have the option of either Aborting the script,
- closing the dialog box, or skipping the currently executing command.
-
-
- ΓòÉΓòÉΓòÉ 2.3.3. Cancel Script ΓòÉΓòÉΓòÉ
-
- This command is used to stop a script that is already running. The script will
- be canceled at the time this is selected unless the script is at a sleep
- command. In this case the script will stop after the sleep time interval has
- expired.
-
-
- ΓòÉΓòÉΓòÉ 2.4. Log File ΓòÉΓòÉΓòÉ
-
- Logging writes to a file named pmcomm.log in the main pmcomm directory. The
- type of information written is the time, date and name of the number called.
- The time, date, cps and name of files transferred will also be saved. If you
- are setup to monitor DCD the time and date of when the call was terminated
- will also be recorded.
-
-
- ΓòÉΓòÉΓòÉ 2.4.1. Start Logging ΓòÉΓòÉΓòÉ
-
- The file named pmcomm.log in the main pmcomm directory will be opened. Any
- logging information will be appended to the end of the file.
-
-
- ΓòÉΓòÉΓòÉ 2.4.2. Cancel Logging ΓòÉΓòÉΓòÉ
-
- The log file will be closed and no other information will be written to the log
- file, until it is re-opened using the Start Log option.
-
-
- ΓòÉΓòÉΓòÉ 2.5. File Import ΓòÉΓòÉΓòÉ
-
- This command copies a file from disk and sends it to a remotely connected
- computer. This can be handy for sending previously saved files as messages, or
- during a chat session. At times this is handier then using the clipboard. The
- delay time specified in the file import delay parameter under
- Options,Protocols, will pause the specified number of seconds after each line
- has been sent. This can be useful if the receiver can not process the
- information as fast as Pmcomm can send it.
-
-
- ΓòÉΓòÉΓòÉ 2.6. Print ΓòÉΓòÉΓòÉ
-
- Print allows you to send information that was previously received out to the
- printer. You can either send the information that is displayed on the visible
- part of the window, or you can print the whole scroll back buffer. The print
- function uses PRN as the device name for printing.
-
-
- ΓòÉΓòÉΓòÉ 2.6.1. Print visible screen ΓòÉΓòÉΓòÉ
-
- This command can also sent by pressing the Print Screen key. When Pmcomm
- receives this message it prints all of the lines on the visible part of the
- screen.
-
-
- ΓòÉΓòÉΓòÉ 2.6.2. Print buffer ΓòÉΓòÉΓòÉ
-
- When this is selected all of the scroll back buffer is sent out to the printer.
- There are about 240 lines available in the scroll back buffer, so this command
- may take awhile to complete. This does not mean that you can't do anything
- else. Pmcomm will print in the background while you go on.
-
-
- ΓòÉΓòÉΓòÉ 2.6.3. Print selected ΓòÉΓòÉΓòÉ
-
- This will print previously selected text (by using the mouse) to the PRN
- device.
-
-
- ΓòÉΓòÉΓòÉ 2.7. About ΓòÉΓòÉΓòÉ
-
- The about box has information about this program, such as BBS support telephone
- number, company name, version number, and copyright information.
-
-
- ΓòÉΓòÉΓòÉ 2.8. Exit ΓòÉΓòÉΓòÉ
-
- Ends current session with Pmcomm. Pmcomm closes the comport when exiting which
- drops dtr. The hang-up string is also sent to the modem.
-
-
- ΓòÉΓòÉΓòÉ 3. Edit ΓòÉΓòÉΓòÉ
-
- In this section there are commands such as Copy, Paste, and Clear_Screen.
-
-
- ΓòÉΓòÉΓòÉ 3.1. Copy ΓòÉΓòÉΓòÉ
-
- Copy transfers information from the screen and places it into the Clipboard.
- Other applications can then use this information. For example, you may be
- reading mail and want to use some of the information in a word processor.
-
-
- ΓòÉΓòÉΓòÉ 3.2. Paste ΓòÉΓòÉΓòÉ
-
- Paste, copies information from the clipboard and sends it out to the modem.
- Care must be taken that the information sent can be handled by the remote
- computer. A use for this command would be that you could enter a message in a
- word processor, copy that message into the clipboard and then paste it into
- Pmcomm.
-
-
- ΓòÉΓòÉΓòÉ 3.3. Clear Screen ΓòÉΓòÉΓòÉ
-
- Clears the whole screen including the scroll back buffer and resets the
- attribute to the attribute defined in the setup area.
-
-
- ΓòÉΓòÉΓòÉ 4. Connect ΓòÉΓòÉΓòÉ
-
- This command allows you to connect to another computer, either through a modem,
- using the Dial command or direct connect, using the Send_Break command.
-
-
- ΓòÉΓòÉΓòÉ 4.1. Dial ΓòÉΓòÉΓòÉ
-
- Dial uses a dialing_directory to store phone numbers and other information
- about the computer.
-
-
- ΓòÉΓòÉΓòÉ 4.1.1. Dial Dialog Help ΓòÉΓòÉΓòÉ
-
- The dial dialog box allows you to add, select, modify, or delete entries in the
- current dialing directory. An entry can also be selected to be automatically
- selected (or optionally dialed) when Pmcomm is first started.
-
- To add an entry, select the add button in the dialog box. You will then be
- prompted to enter the name of the new entry. The directory will be sorted and
- the new entry will be selected. The cursor will be positioned at the number
- entry field so that the number for the new entry can be entered. After the
- number has been entered, pressing the enter key will save the dialing directory
- and dial the number(s). Pressing the tab key will allow you to edit the other
- fields.
-
- To select a number, using a mouse, "click" on the number (or numbers) that you
- wish to dial. To deselect an entry "click" on the number once again. If you
- are not using a mouse the arrow keys will move the highlight bar through the
- directory. To select your choices hit the space bar, a second time will
- deselect the entry, then hit enter. Multiple entries may be selected. This
- will form a dialing queue, in which Pmcomm will dial the selected entries until
- a connection is made.
-
- To modify an entry, select the entry to be edited and then use the tab key to
- move the cursor to the field you wish to change. Use the Change button to
- change the name of an entry.Pressing the save button will save the
- modifications to the disk.
-
- To change a name, select the entry to be edited and then use press the change
- button. The change will automatically be saved to the disk.
-
- To delete an entry, select the entry be deleted and select the delete button in
- the dialog box.
-
- CAUTION:
- If multiple entries are selected, only the first selected entry will be
- deleted.
-
-
- ΓòÉΓòÉΓòÉ 4.1.2. Dial Prefix ΓòÉΓòÉΓòÉ
-
- Pmcomm sends the selected dial prefix to the modem before sending the phone
- number. The default string for the prefixes is ATDT which tells the modem to
- dial using tone (ie. touch tone). If your phone system does not support touch
- tone then you could use the ATDP command. Pmcomm allows you to setup multiple
- prefixes, so that if you need to dial a special code for long distance calls
- you can set up a separate prefix for those calls.
-
-
- ΓòÉΓòÉΓòÉ 4.1.3. Dial Suffix ΓòÉΓòÉΓòÉ
-
- Pmcomm sends the selected dial suffix to the modem after sending the phone
- number. The default string for the suffixes is ^M which is a carriage
- return,line feed.
-
-
- ΓòÉΓòÉΓòÉ 4.1.4. Automatically Selected ΓòÉΓòÉΓòÉ
-
- If a dialing entry is marked as being automatically selected, then each time
- Pmcomm is started this entry will be selected to be dialed. You can have as
- many entries automatically selected as you want, and this will form a dialing
- queue. A dialing queue allows you to try the first number and if it is busy it
- will then dial the next number in the queue.If the Dial Auto Selected Entries
- on program Startup is selected then any entries in the dialing directory that
- are marked as auto selected, will automatically be dialed. This option will
- allow you to automatically dial selected numbers when Pmcomm is first invoked.
-
-
- ΓòÉΓòÉΓòÉ 4.1.5. Dial List Box ΓòÉΓòÉΓòÉ
-
- The Dial List Box is a multiple selection list box. This means that you can
- select more then one entry at a time. The information on the right side of the
- Dialog Box is on the first item selected. The reason for using a multiple
- selection list box, is that you can select more then one item and these items
- will be dialed in order. For example, if the first number selected is busy then
- Pmcomm will dial the next number selected. If all selected numbers are busy,
- Pmcomm will start over again. If you have multiple items selected and select
- the Delete button, only the first item will be deleted. If an item is selected
- and you double click on that item then the selected items will be dialed.
-
-
- ΓòÉΓòÉΓòÉ 4.1.6. Baud Rate ΓòÉΓòÉΓòÉ
-
- In the Dialing Dialog Box you can enter any baud supported by the device driver
- you are using. Currently the maximum baud rate supported by the device driver
- included with OS/2 is 19200. Commonly used baud rates are, 300, 1200, 2400,
- 9600, and 19200. There are some device drivers currently available that support
- up to 38400. To enter a baud rate, type in a valid baud rate. The com port will
- be set to this value when the phone number is dialed. In the Port Options
- Dialog Box the above mentioned baud rates can be selected by using the radio
- buttons.
-
-
- ΓòÉΓòÉΓòÉ 4.1.7. Parity ΓòÉΓòÉΓòÉ
-
- The supported parities are, None, Even, Odd, Marked, and Space. To enter a
- parity type in one of the above words. The two most widely used parities are,
- None and Even. If you are calling most BBS's you would want to enter None, but
- most packet networks (such as CompuServe, and Telenet) normally require Even
- parity.
-
-
- ΓòÉΓòÉΓòÉ 4.1.8. Data Bits ΓòÉΓòÉΓòÉ
-
- Currently supported data bits are 5, 6, 7, and 8. The most popular values are
- 7, and 8. For most BBS's, 8 would be the data bits, but for systems such as
- CompuServe, 7 data bits are required.
-
-
- ΓòÉΓòÉΓòÉ 4.1.9. Stop Bits ΓòÉΓòÉΓòÉ
-
- Currently supported stop bits are 1, and 2. Most systems will require 1 stop
- bit.
-
-
- ΓòÉΓòÉΓòÉ 4.1.10. Dial Script ΓòÉΓòÉΓòÉ
-
- The script name can be up to 12 characters long. The script must be in the
- script path (see Paths for more information). Once Pmcomm is connected to the
- remote computer this script will be executed.
-
-
- ΓòÉΓòÉΓòÉ 4.1.11. Dial Terminal ΓòÉΓòÉΓòÉ
-
- The currently available terminal emulations are, TTY, ANSI, and VT100. Pmcomm
- will switch to the terminal emulation listed, once connected to the remote
- computer.
-
-
- ΓòÉΓòÉΓòÉ 4.2. Send Break ΓòÉΓòÉΓòÉ
-
- Initializes a connection with another computer through a protocol converter.
-
-
- ΓòÉΓòÉΓòÉ 5. Transfer ΓòÉΓòÉΓòÉ
-
- Transfer allows the use of different protocols to send and receive files from a
- remote computer. The protocol options are Xmodem_Checksum, Xmodem_CRC,
- 1K-Xmodem, Ymodem(batch), Ymodem-g(batch), Zmodem, CISB, and ASCII. Zmodem is
- probably the best selection when available on the remote computer. Ymodem-G
- should only be used with error correcting modems.
-
-
- ΓòÉΓòÉΓòÉ 5.1. Download ΓòÉΓòÉΓòÉ
-
- The download command brings up a dialog box for you to select the proper
- protocol. If the protocol selected is not a batch protocol ( ASCII,
- Xmodem_Checksum, Xmodem_CRC or 1K-Xmodem ) you will be prompted for a filename.
- If you have Auto-Zmodem or Auto_CISB selected in the protocol options area,
- Pmcomm will automatically start transferring as soon as the remote computer
- starts to send. Zmodem is not available in the demonstration version.
-
-
- ΓòÉΓòÉΓòÉ 5.1.1. Xmodem Checksum ΓòÉΓòÉΓòÉ
-
- Xmodem Checksum is one of the oldest protocols around and some people still use
- it exclusively. It is a moderately fast protocol that has fairly good error
- detection.
-
-
- ΓòÉΓòÉΓòÉ 5.1.2. Xmodem CRC ΓòÉΓòÉΓòÉ
-
- Xmodem CRC and Xmodem_Checksum are similar except CRC has better error
- detection then Checksum. Almost anywhere you call will offer at least one of
- these protocols.
-
-
- ΓòÉΓòÉΓòÉ 5.1.3. 1k-Xmodem ΓòÉΓòÉΓòÉ
-
- 1k-Xmodem uses the same error detection as Xmodem_CRC, but uses 1024 byte
- blocks instead of 128 byte blocks. This allows for greater throughput (higher
- characters per second) with roughly the same error detection.
-
-
- ΓòÉΓòÉΓòÉ 5.1.4. Ymodem ΓòÉΓòÉΓòÉ
-
- Ymodem uses the same error detection and block size as 1k-Xmodem, but is a
- batch protocol. This means that in the first block the file size and name are
- sent. This keeps the receiver from having to type in the filename. it also
- allows you to send more then one file without have to start the transfer again.
- This protocol is second to Zmodem, in our opinion, when using non-error
- correcting modems.
-
-
- ΓòÉΓòÉΓòÉ 5.1.5. Ymodem-g ΓòÉΓòÉΓòÉ
-
- Ymodem-g is identical to Ymodem except it has no error correction. If an error
- is detected the transfer aborts. Because of this Ymodem-g should only be used
- with error correction modems. Pmcomm will allow you to use this protocol
- anytime, but again care should be taken on what hardware it is used with. With
- the proper hardware Ymodem-g has the fastest cps.
-
-
- ΓòÉΓòÉΓòÉ 5.1.6. Zmodem ΓòÉΓòÉΓòÉ
-
- Zmodem is almost as fast as Ymodem-g, however Zmodem does support error
- correction and file recovery. It only takes one aborted Ymodem-g transfer to
- lose all it's advantages. Zmodem has many advantages as for as the user is
- concerned. It is probably the easiest protocol to use. If using Pmcomm with the
- Auto-Zmodem download feature, the whole download is done automatically from the
- Pmcomm end. You have to select the file from the sender (BBS etc..) and once
- the sender starts sending, the transfer will begin on Pmcomm. It may take a
- moment before the sender sends the first sequence, so wait a moment. Some of
- the advanced features of Zmodem are listed below. Zmodem supports;
-
- 1. CRC-32 and CRC-16. The additional error detection of 32 bit CRC is
- supported.
-
- 2. File recovery. If a Zmodem download is aborted for any reason the transfer
- will resume at the point where it was aborted. You don't have to start
- the whole transfer over.
-
- 3. Auto-Download. When a Zmodem sending program starts up it first sends a rz
- and then a carriage return. Pmcomm will monitor for the startup sequence
- and automatically start the Zmodem download. Great care has been taken to
- make sure that it really is a Zmodem transfer and not someone typing it in
- at the keyboard (at either end). This feature makes downloading with
- Zmodem much faster and much easier.
-
- 4. Variable length headers. This reduces the amount of overhead that accrues
- with sending Zmodem headers. This is only used if both the sender and
- receiver support it.
-
- 5. RLE encoding. Run length encoding is a form of file compression. Instead
- of sending 20 spaces it will send a space and the number 20. The receiver
- will then decompress it. Because of the multi-thread (tasking)
- capabilities of OS/2 this works much better then with DOS. This also is
- only used if both the sender and receiver support it.
-
- 6. Variable length receive buffers. Some Zmodem receive programs have
- problems with writing to the disk and receiving from the comport at the
- same time. If necessary Zmodem will wait for an ACK from the receiver
- after the specified buffer size has been sent. This will only be done if
- the receiver requests it.
-
- 7. Retains original file size. Some people say that because Zmodem headers
- are larger that there is two much overhead. This really isn't the case.
- For example if comparing Zmodem to Ymodem-g (full flow Ymodem), Ymodem-g
- has less overhead with each packet. However Ymodem-g rounds the file size
- up to an even 128 byte size. In some cases it is even rounded up 1024
- bytes. This is done because Ymodem (g or other) only supports two block
- sizes, 128 and 1024 (the block size is actually 133 and 1029 to allow for
- the block header, STX or SOH, and the CRC value), so it has to send full
- blocks. However, Zmodem uses variable block sizes. The block sizes adjust
- from 32 bytes to 1024 bytes. If telephone line quality is poor smaller
- blocks are sent so that if an error does occur less data will have to be
- resent. As the line quality improves the size of the blocks will be
- increased. The starting block size is variable depending on the connected
- baud rate.
-
- 8. Error recovery. Because Zmodem can resend from any place in the file
- aborted transfers are rare.
-
- By reading this you can tell our favorite protocol is Zmodem. Once you have
- used Zmodem it's hard to get used to using other protocols.
-
-
- ΓòÉΓòÉΓòÉ 5.1.7. ASCII ΓòÉΓòÉΓòÉ
-
- The ASCII protocol can be used to transfer text files. There is no error
- detection or correction available with this protocol. It is recommended that
- one of the other protocols be used, even with text files.
-
-
- ΓòÉΓòÉΓòÉ 5.1.8. CISB ΓòÉΓòÉΓòÉ
-
- The CIS B protocol can be used to transfer files to and from CompuServe.
- CompuServe B,B+ and Quick B are supported. Quick B is the fastest variant of
- the B protocol and is automatically selected when it is supported on the host
- computer. The CIS B protocol is an automatic protocol where the host initiates
- the transfer and Pmcomm will automatically go into the send or receive mode. If
- you are sending a file, the file must exist in the download directory of
- Pmcomm. If Pmcomm is unable to find the file then the transfer will abort.
- Pmcomm can be configured to ignore the CIS B protocol by deselecting the
- Automatic CIS B option in the Protocol Option Dialog. Pmcomm may run slightly
- faster in terminal mode without this selection. Under most systems the
- difference will not be detectable. Another option for CIS B is for file
- recovery. What this option will do is if you started a download and aborted the
- transfer you can then re-start the transfer and CIS B will resume from the
- place where it was aborted. This can be very handy in poor phone line
- conditions. The packet size for CIS B is adjusted by the connecting baud rate.
- For example if you are connected to CompuServe at 2400 baud the packet size
- will be 1024 bytes. If you connect at 1200 baud the packet size will be 512
- bytes. This allows for speedy error recovery in case a error occurs because on
- phone line noise. Downloads will automatically be placed in the Pmcomm download
- directory and the download directory will automatically searched for any
- uploaded files. If you specify a path with the filename when CompuServe asks
- for a filename for your computer, then this path will be used. CIS B should be
- the protocol used when transferring files to and from CompuServe.
-
-
- ΓòÉΓòÉΓòÉ 5.1.9. Save to Dial Directory ΓòÉΓòÉΓòÉ
-
- When this option is selected the file transfer protocol that is selected will
- be saved into the dialing directory for this number. The next time a file
- transfer is used when connected to this number this same protocol will be
- selected and all the user will have to do is press the Ok button. If you do not
- want this protocol save then deselect this option.
-
-
- ΓòÉΓòÉΓòÉ 5.2. Upload ΓòÉΓòÉΓòÉ
-
- When sending a file to a remote computer you must select the same protocol that
- the remote computer will use to receive the file. After selecting the proper
- protocol, a file open dialog box will have you select the file you wish to
- send. You can either double click on the file name or select the file and click
- on the OK button. If you have Auto_CISB selected in the protocol options area,
- Pmcomm will automatically start the transfer as soon as the remote computer
- sends the transfer request. With a CISB transfer the filename is specified on
- the host and the file open dialog box is not displayed.
-
-
- ΓòÉΓòÉΓòÉ 5.2.1. Xmodem Checksum ΓòÉΓòÉΓòÉ
-
- Xmodem Checksum is one of the oldest protocols around and some people still use
- it exclusively. It is a moderately fast protocol that has fairly good error
- detection.
-
-
- ΓòÉΓòÉΓòÉ 5.2.2. Xmodem CRC ΓòÉΓòÉΓòÉ
-
- Xmodem CRC and Xmodem_Checksum are similar except CRC as better error detection
- then Checksum. Almost anywhere you call will offer at least one of these
- protocols.
-
-
- ΓòÉΓòÉΓòÉ 5.2.3. 1k-Xmodem ΓòÉΓòÉΓòÉ
-
- 1k-Xmodem uses the same error detection as Xmodem_CRC, but uses 1024 byte
- blocks instead of 128 byte blocks. This allows for greater throughput (higher
- characters per second) with roughly the same error detection.
-
-
- ΓòÉΓòÉΓòÉ 5.2.4. Ymodem ΓòÉΓòÉΓòÉ
-
- Ymodem uses the same error detection and block size as 1k-Xmodem, but is a
- batch protocol. This means that in the first block the file size and name are
- sent. This keeps the receiver from having to type in the filename. it also
- allows you to send more then one file without have to start the transfer again.
- This protocol is second to Zmodem, in our opinion, when using non-error
- correcting modems.
-
-
- ΓòÉΓòÉΓòÉ 5.2.5. Ymodem-g ΓòÉΓòÉΓòÉ
-
- Ymodem-g is identical to Ymodem except it has no error correction. If an error
- is detected the transfer aborts. Because of this Ymodem-g should only be used
- with error correction modems. Pmcomm will allow you to use this protocol
- anytime, but again care should be taken on what hardware it is used with. With
- the proper hardware Ymodem-g has the fastest cps.
-
-
- ΓòÉΓòÉΓòÉ 5.2.6. Zmodem ΓòÉΓòÉΓòÉ
-
- Zmodem is almost as fast as Ymodem-g, however Zmodem does support error
- correction and file recovery. It only takes one aborted Ymodem-g transfer to
- lose all it's advantages. Zmodem has many advantages as for as the user is
- concerned. It is probably the easiest protocol to use. If using Pmcomm with the
- auto-Zmodem download feature, the whole download is done automatically from the
- Pmcomm end. You have to select the file from the sender (BBS etc..) and once
- the sender starts sending, the transfer will begin on Pmcomm. It may take a
- moment before the sender sends the first sequence, so wait a moment. Some of
- the advanced features of Zmodem are listed below. Zmodem supports;
-
- 1. CRC-32 and CRC-16. The additional error detection of 32 bit CRC is
- supported.
-
- 2. File recovery. If a Zmodem download is aborted for any reason the transfer
- will resume at the point where it was aborted. You don't have to start
- the whole transfer over.
-
- 3. Auto-Download. When a Zmodem sending program starts up it first sends a rz
- and then a carriage return. Pmcomm will monitor for the startup sequence
- and automatically start the Zmodem download. Great care has been taken to
- make sure that it really is a Zmodem transfer and not someone typing it in
- at the keyboard(at either end). This feature makes download with Zmodem
- much faster and much easier.
-
- 4. Variable length headers. This reduces the amount of overhead that accrues
- with sending Zmodem headers. This is only used if both the sender and
- receiver support it.
-
- 5. RLE encoding. Run length encoding is a form of file compression. Instead
- of sending 20 spaces it will send a space and the number 20. The receiver
- will then decompress it. Because of the multi-thread(tasking) capabilities
- of OS/2 this works much better then with DOS. This also is only used if
- both the sender and receiver support it.
-
- 6. Variable length receive buffers. Some Zmodem receive programs have
- problems with writing to the disk and receiving from the comport at the
- same time. If necessary Zmodem will wait for an ACK from the receiver
- after the specified buffer size has been sent. This will only be done if
- the receiver requests it.
-
- 7. Retains original file size. Some people say that because Zmodem headers
- are larger that there is two much overhead. This really isn't the case.
- For example if comparing Zmodem to Ymodem-g (full flow Ymodem), Ymodem-g
- has less overhead with each packet. However Ymodem-g rounds the file size
- up to an even 128 byte size. In some cases it is even rounded up 1024
- bytes. This is done because Ymodem (g or other) only supports two block
- sizes, 128 and 1024 (the block size is actually 133 and 1029 to allow for
- the block header, STX or SOH, and the CRC value), so it has to send full
- blocks.
-
- 8. Error recovery. Because Zmodem can resend from any place in the file
- aborted transfers are rare.
-
- 9. Variable block sizes. The block sizes adjust from 32 bytes to 1024 bytes.
- If telephone line quality is poor smaller blocks are sent so that if an
- error does occur less data will have to be resent. As the line quality
- improves the size of the blocks will be increased. The starting block size
- is variable depending on the connected baud rate.
-
- By reading this you can tell our favorite protocol is Zmodem. Once you have
- used Zmodem it's hard to get used to using other protocols.
-
-
- ΓòÉΓòÉΓòÉ 5.2.7. ASCII ΓòÉΓòÉΓòÉ
-
- The ASCII protocol can be used to transfer text files. There is no error
- detection or correction available with this protocol. It is recommended that
- one of the other protocols be used, even with text files.
-
-
- ΓòÉΓòÉΓòÉ 5.2.8. CISB ΓòÉΓòÉΓòÉ
-
- The CIS B protocol can be used to transfer files to and from CompuServe.
- CompuServe B,B+ and Quick B are supported. Quick B is the fastest variant of
- the B protocol and is automatically selected when it is supported on the host
- computer. The CIS B protocol is an automatic protocol where the host initiates
- the transfer and Pmcomm will automatically go into the send or receive mode. If
- you are sending a file, the file must exist in the download directory of
- Pmcomm. If Pmcomm is unable to find the file then the transfer will abort.
- Pmcomm can be configured to ignore the CIS B protocol by deselecting the
- Automatic CIS B option in the Protocol Option Dialog. Pmcomm may run slightly
- faster in terminal mode with out this selection. Under most systems the
- difference will not be detectable. Another option for CIS B is for file
- recovery. What this option will do is if you started a download and aborted the
- transfer you can then re-start the transfer and CIS B will resume from the
- place where it was aborted. This can be very handy in poor phone line
- conditions. The packet size for CIS B is adjusted by the connecting baud rate.
- For example if you are connected to CompuServe at 2400 baud the packet size
- will be 1024 bytes. If you connect at 1200 baud the packet size will be 512
- bytes. This allows for speedy error recovery in case a error occurs because on
- phone line noise. Downloads will automatically be placed in the Pmcomm download
- directory and the download directory will automatically searched for any
- uploaded files. If you specify a path with the filename when CompuServe asks
- for a filename for your computer, then this path will be used. CIS B should be
- the protocol used when transferring files to and from CompuServe.
-
-
- ΓòÉΓòÉΓòÉ 5.2.9. Save to Dial Directory ΓòÉΓòÉΓòÉ
-
- When this option is selected the file transfer protocol that is selected will
- be saved into the dialing directory for this number. The next time a file
- transfer is used when connected to this number this same protocol will be
- selected and all the user will have to do is press the Ok button. If you do not
- want this protocol save then deselect this option.
-
-
- ΓòÉΓòÉΓòÉ 6. Hangup ΓòÉΓòÉΓòÉ
-
- Hang-up sends the hang-up command string (see the Option menu) and optionally
- drops the dtr line to the modem. Dropping dtr is the most effective is your
- modem is setup to hang-up when dtr is dropped. Using a hang-up string is also
- slower, because Pmcomm has to get the modem into the command state before
- sending the hang-up string. If you have dtr on and delete the hang-up string
- the hang-up will be much faster. The default string is : +++~~~~ATH^M. The +++
- is the default modem attention string, which puts the modem into the command
- state. The ~~~~ will make Pmcomm pause 2 seconds (.5 seconds per ~) and then
- the ATH will force the modem to go on-hook (hangup). The ^M sends a carriage
- return line feed combination.
-
-
- ΓòÉΓòÉΓòÉ 7. Options ΓòÉΓòÉΓòÉ
-
- Option allows you to tailor Pmcomm to your own tastes. The areas in option are
- Port, Dial_Setup, Modem, Protocols, Paths, Macros_Setup, Screen, Terminal,
- Color, Font, and Chat. The setup is not automatically saved. This allows you to
- change things temporally without changing your default setup file. If you do
- want to make the changes permanent be sure to save the setup file. To save the
- current setup file, use the Save_setup command under the File menu option.
-
-
- ΓòÉΓòÉΓòÉ 7.1. Port ΓòÉΓòÉΓòÉ
-
- The device name should be a valid com device name. Some third party device
- drivers allow you to use names other then COM1, COM2, etc., so Pmcomm does not
- limit you to these names. Hardware flow control and dtr should be on for most
- modems. There are currently a couple third party device drivers that support
- 38400 baud, so Pmcomm has been made to support this.
-
-
- ΓòÉΓòÉΓòÉ 7.1.1. Device Name ΓòÉΓòÉΓòÉ
-
- The device name should be a valid com device name. Some third party device
- drivers allow you to use, and in some cases require that you uses, names other
- then COM1, COM2, etc., so Pmcomm does not limit you to these names. If you are
- using Pmcomm across a LAN then normally there will be an Alias name for the com
- port you are using on the server. See your LAN administrator for the Alias
- name(s) that you should use to access the modem(s).
-
-
- ΓòÉΓòÉΓòÉ 7.1.2. Hardware Flow Control ΓòÉΓòÉΓòÉ
-
- Hardware Flow Control is generally the most reliable method of flow control.
- There are two basic times when flow control is needed. First if Pmcomm is
- sending information to the modem faster then the modem is able to send the
- information flow control is needed. If flow control is not enabled then a
- transmission error will occur. Second if the modem is sending information to
- Pmcomm faster then Pmcomm can receive it, then Pmcomm will try to tell the
- modem to stop sending the information. This can occur when an excessive about
- of processing is being preformed on the computer. Hardware Flow Control uses
- two modem signals to control the flow of information. For send flow control the
- CTS modem line is used. For receive flow control the RTS modem line is used. If
- your modem supports these flow control signals, then setup your modem and
- Pmcomm for Hardware Flow Control.
-
-
- ΓòÉΓòÉΓòÉ 7.1.3. XON/XOFF Flow Control ΓòÉΓòÉΓòÉ
-
- Xon/Xoff Flow Control should only be used when Hardware_Flow_Control is not
- available and when flow control is necessary. The only two file transfers that
- will work correctly with Xon/Xoff are ASCII and Zmodem. The only other protocol
- that should need flow control is Ymodem-g.
-
-
- ΓòÉΓòÉΓòÉ 7.1.4. Use DTR ΓòÉΓòÉΓòÉ
-
- DTR stands for Data Terminal Ready, which by lowering DTR you can signal the
- device you are communicating with( usually a modem) that you wish to go off
- line. If you are connected to a modem, you should set the modem up to go
- on-hook when the modem detects a drop in DTR. The command for a Hayes 2400 baud
- modem is AT&D2. If this option is selected in Pmcomm, then DTR will be dropped
- when the hangup command is selected, or after each redial attempt.
-
-
- ΓòÉΓòÉΓòÉ 7.1.5. Monitor DCD ΓòÉΓòÉΓòÉ
-
- DCD stands for Data Carrier Detect and is pin 8 on an RS-232C cable. When a
- carrier is detected by the modem, Pmcomm assumes that you are connected to a
- remote computer. If DCD is not supported by your modem or other hardware, then
- this option should be turned off. With this option turned on, if no DCD is
- present then Pmcomm will not Hangup, or go into a file transfer. The command
- for a Hayes 2400 baud modem is AT&C1. This will have the modem track the state
- of DCD.
-
-
- ΓòÉΓòÉΓòÉ 7.1.6. 8/N/1 ΓòÉΓòÉΓòÉ
-
- This selection means 8 data bits, No parity, 1 stop bit. This option will be
- overridden with the parameters listed in the dialing directory once you have
- connected with a remote computer.
-
-
- ΓòÉΓòÉΓòÉ 7.1.7. 7/E/1 ΓòÉΓòÉΓòÉ
-
- This selection means 7 data bits, Even parity, 1 stop bit. This option will be
- overridden with the parameters listed in the dialing directory once you have
- connected with a remote computer.
-
-
- ΓòÉΓòÉΓòÉ 7.2. Dial Setup ΓòÉΓòÉΓòÉ
-
- This allows you to select a dialing_directory from a list box and also lets you
- setup the prefix and suffix of the number to be dialed. There is a list box
- that will allow you to select how the dialing directory will be sorted. You can
- sort the dialing directory by, name number, baud rate, last on, number of times
- called,download cps, upload cps,dial prefix, and dial suffix. You can also
- select either ascending or descending order.
-
-
- ΓòÉΓòÉΓòÉ 7.2.1. Dial Auto Selected Entries ΓòÉΓòÉΓòÉ
-
- If the Dial Auto Selected Entries on program Startup is selected then any
- entries in the dialing directory that are marked as automatically_selected ,
- will automatically be dialed. This option will allow you to automatically dial
- selected numbers when Pmcomm is first invoked. This can be very useful if you
- dial the same numbers each time you run Pmcomm.
-
-
- ΓòÉΓòÉΓòÉ 7.2.2. Sort Dialing Directory ΓòÉΓòÉΓòÉ
-
- The dialing_directory can be sorted by either the name, phone number, baud
- rate, last time called, number of times called, download characters per second,
- upload characters per second, dial prefix, or dial suffix. The directory can be
- sorted in either ascending or descending order. For example you can sort the
- dialing directory by last time called in descending order, and all the most
- recently called numbers will be displayed at the top of the dialing directory.
-
-
- ΓòÉΓòÉΓòÉ 7.2.3. Dialing Directory List ΓòÉΓòÉΓòÉ
-
- A list of the available dialing_directories are displayed in a list box, so
- that a default directory can be selected. The selected directory will
- automatically be loaded when Pmcomm is started. You can add additional
- directories by pressing the add button.
-
-
- ΓòÉΓòÉΓòÉ 7.3. Modem ΓòÉΓòÉΓòÉ
-
- Initialization string should have the commands in it to enable word result
- codes, hang-up when dtr is dropped and enable hardware flow control. Not all of
- these are supported by all modems, but use them when possible. Pause before
- redial is the time Pmcomm waits before trying to re-dial a number. Seconds to
- wait for carrier is how long Pmcomm will wait for a connection before
- redialing.
-
-
- ΓòÉΓòÉΓòÉ 7.3.1. Modem Initialization String ΓòÉΓòÉΓòÉ
-
- Initialization string should have the commands in it to enable word result
- codes, hang-up when dtr is dropped and enable hardware flow control. Not all of
- these are supported by all modems, but use them when possible. The default
- modem string is for a Hayes 2400 baud modem. This is the default string :
-
- AT&F&D2&C1M0Q0S2=255S10=30X4
-
- For a Courier HST the following string should be entered.
-
- AT&FM0&B1&H1&K0&R2&S1&Y0S2=43S10=30X4
-
- This allows everything to be transferred to the modem at 19200 no matter what
- the connect baud is. This setting will give you the max through-put even at
- lower baud rates. To write this into memory of the HST run Pmcomm and then
- enter AT&F&W. This will set the NRAM to the factory defaults. Then type in the
- setup string and press enter. To save this to the NRAM enter AT&W. Then all
- you have to have for a initialization string in Pmcomm is an ATZ, which will
- restore these settings from the NRAM. On the HST I have the DIP switches set
- as follows:
-
- up: 1,2,4,6,7,9,10
- down: 3,5,8
-
- For a Hayes 9600 V.42 modem the following string should be entered.
-
- AT&F&K3W1&C1&D2S36=7S0=0S2=255S7=30M0S10=30X4N1
-
-
- ΓòÉΓòÉΓòÉ 7.3.2. Modem Pause Before Redial ΓòÉΓòÉΓòÉ
-
- Pmcomm will pause for the specified number of seconds before attempting to
- redial a phone number. Some phone systems take a few seconds before you can
- redail a phone number. The default value is 3 seconds and should work for most
- phone systems.
-
-
- ΓòÉΓòÉΓòÉ 7.3.3. Modem Dial Timeout ΓòÉΓòÉΓòÉ
-
- Pmcomm will wait for a Connect or Carrier message from the modem for up to 64
- seconds. The S7 register of the modem must also be set to a value at least as
- great as the dial timeout value. This can be done by issueing the following
- command to the modem: ATS7=30. This would set the modem to timeout after 30
- seconds. Setting the dial timeout to a value greater then 30 would not be
- effective, because the modem would still timeout after 30 seconds. The default
- timeout value for Pmcomm is 60 seconds.
-
-
- ΓòÉΓòÉΓòÉ 7.4. Protocols ΓòÉΓòÉΓòÉ
-
- The options under protocols are;
-
- Auto Zmodem Download.
-
- Zmodem file recovery.
-
- Zmodem CRC-32.
-
- Zmodem CRC-16.
-
- Auto CISB Transfer.
-
- CISB file recovery.
-
- Import File line delay.
-
- Auto Zmodem makes Pmcomm check for a Zmodem start sequence. When received
- Pmcomm automatically starts receiving the file. Zmodem file recovery allows
- Zmodem to resume a file transfer that was previously aborted. CRC-32 has
- improved error correction, but is slightly slower. If CRC-32 is not available
- Pmcomm will switch to CRC-16. Zmodem is only available on registered versions.
- Auto CISB is similar to Auto Zmodem except that both uploads and downloads can
- be started this way. This feature is for the CISB file transfer protocol. CISB
- file recovery allows CISB to resume a file transfer that was previously
- aborted.
-
-
- ΓòÉΓòÉΓòÉ 7.5. Paths ΓòÉΓòÉΓòÉ
-
- The download path allows you to have the files that you download, put into a
- different directory. The script path is where Pmcomm looks for the scripts
- listed in the dialing directory. If a script called startup.scr exists in this
- directory then it will be executed each time Pmcomm is started. The capture
- path is where all screen captures are stored. These paths must contain a valid
- directory. It defaults to the directory that Pmcomm was started from. There is
- also a call logging option here which when turned on will start call logging as
- soon as Pmcomm is run.
-
-
- ΓòÉΓòÉΓòÉ 7.6. Macros Setup ΓòÉΓòÉΓòÉ
-
- There are 10 user definable keyboard macros. These can be invoked by holding
- down the Alt key and pressing 0-9. Use ^M to send a carriage return. When the
- macro is invoked it will send the string that you have defined to the modem.
- Once you have setup the macro string, it can also be selected from the main
- menu using a mouse. Other special characters are:
-
- ^H = tab character. ^J = carriage return without a line feed. ^L = form feed.
- ^[ = escape character (Ascii 27) ^C = send the Ctrl-C character (Ascii 3) ^K =
- XON character ^S = XOFF character ~ = sleep for half a second
-
- You can also send any other special character by holding down the Alt key and
- typing in the Ascii number on the numeric key pad. For example if you want to
- enter the escape character into a macro you could hold down the Alt key and
- then press the two and the seven on the numeric key pad (while still holding
- down the Alt key). When you then release the Alt key the escape character would
- be inserted into the marco.
-
-
- ΓòÉΓòÉΓòÉ 7.7. Screen ΓòÉΓòÉΓòÉ
-
- This command allows you to tailor the screen handling to your tastes. The best
- thing to do is try them to see if you like them. Some features like the
- automatic horizontal scroll will probably only be used when typing messages and
- chatting. The hide window while dialing, and the hide window during a file
- transfer, will make the screen less "busy" while these tasks are going on. The
- Automatic vertical scroll, will make Pmcomm keep the cursor vertically in the
- Pmcomm window. The Automatic horizontal scroll will do the same thing only
- horizontally. The retain dialing dialog's position, will make Pmcomm restore
- the last position of the dialing dialog each time it is invoked. The same thing
- happens to the transfer dialog box if that selection is checked. If these
- options are not selected then OS/2 will decide where to place the dialog boxes.
- The Show Dial Message Box, makes Pmcomm display a message box and beeps at the
- user,when Pmcomm obtains a remote connection, until the OK button is pressed.
- This will make sure you notice that Pmcomm has a remote connection. The local
- echo on will make Pmcomm echo all keystrokes to the local screen as well as to
- the remote computer. The turn sound on option will make Pmcomm alert the user
- when certain functions have been completed. The sound must also be turned on in
- OS/2 for this option to work. This can be done through the control panel.
-
-
- ΓòÉΓòÉΓòÉ 7.8. Terminal ΓòÉΓòÉΓòÉ
-
- Terminal allows you to select which emulation you wish to use. There are also
- some options for the different emulations.
-
-
- ΓòÉΓòÉΓòÉ 7.8.1. TTY emulation ΓòÉΓòÉΓòÉ
-
- The TTY emulation makes Pmcomm act as a teletype device. Generally this is the
- least used emulation, but it is also the fastest. The reason for this is that
- there are very few special commands that Pmcomm has to process. None of the
- special ANSI control codes are processed.
-
-
- ΓòÉΓòÉΓòÉ 7.8.2. ANSI emulation ΓòÉΓòÉΓòÉ
-
- The ANSI emulation is probably the most used. It will execute the special ANSI
- screen control commands. This allows the remote program to be able to clear the
- screen, position the cursor, and change the colors. There are other screen
- control commands also, but those are the most commonly used ones. There are
- also options to have Pmcomm ignore the ANSI color changes, so that you can use
- the colors you want, instead of the ones the remote computer uses, and to send
- the ANSI cursor position commands with the arrow keys. When using the ANSI
- emulation you can also have Pmcomm strip off the ANSI commands before saving
- the information into a capture file. This will make the capture file much more
- readable. You can also change the length of the page, to correspond to the size
- of your screen. The default for the ANSI page length is 25 lines, and under
- most cases should be left there.
-
-
- ΓòÉΓòÉΓòÉ 7.8.3. VT100 emulation ΓòÉΓòÉΓòÉ
-
- In VT100 emulation, some keys have been changed to try to more closely emulate
- the VT100 keyboard. F1-F4 are now the PF keys. Because of this the F1 key will
- not display the normal help, and F3 will not exit the program. The PF keys will
- send the following characters:
-
- F1 = ESCOP
-
- F2 = ESCOQ
-
- F3 = ESCOR
-
- F4 = ESCOS
-
- Where ESC is equal to the ASCII character hex 1B. All other hot keys will not
- be available. When the num lock key is off the numerical key pad will be in
- the application mode. If you are connecting to a VT220 Host you can use these
- keys to send the VT220 PF key values. For example pressing the 1 on the
- numeric key pad will send the VT220 PF1 key. Pressing the 3 on the numeric key
- pad will send the VT220 PF3 key, and so on.With the num lock on the numbers
- will be sent. The plus key has been re-mapped to be a comma, again to be
- compatible with the VT100 keyboard. In most cases it is best to tell the host
- that you are a VT220 terminal. The VT100 emulation of Pmcomm supports most of
- the VT220 commands, and will allow you to use the extra support that VT220
- allows. If you tell the host that you are a VT220 terminal, for example, you
- will be able to use the Ctrl-R for reset and the Ctrl-C for clear. These are
- just a couple of examples of the additional benefit that you can get from
- VT220.
-
- The send DEL for backspace option is the default for many VT100 keyboards.
- When this is selected, Pmcomm will send a hex 7f character instead of the
- backspace character. You can still send a backspace character by pressing
- Ctrl-Backspace. This allows you to have both these characters available at one
- time.
-
- The translate CR/LF for LF option will act as if it received a carriage return
- and a line feed, each time it receives a line feed.
-
- The line wrap option will make Pmcomm wrap the line if the line is longer then
- the page width is. If this option is off the line will be truncated.
-
- The Insert mode option will allow you to insert characters into the middle of
- a line and the rest of the line will be shifted to the right to allow room for
- the new characters.
-
- The cursor visible option determines if the cursor will be shown on the screen
- or not.
-
- The Screen origin relative option determines if Pmcomm will keep everything on
- a 25 line screen or allow it to use the scroll back buffer. In most cases this
- option should be selected.
-
- The last two options are to set the width of the screen. Either 80 or 132
- columns are supported.
-
- Most of these options can be changed from the host. The default setup should
- work for most applications, and the host can change the options to meet
- different needs.
-
-
- ΓòÉΓòÉΓòÉ 7.9. Color ΓòÉΓòÉΓòÉ
-
- Allows you to set the background and foreground colors for the screen. There
- are 16 different background and foreground colors available, allowing for 256
- different color combinations.
-
-
- ΓòÉΓòÉΓòÉ 7.9.1. Foreground ΓòÉΓòÉΓòÉ
-
- Sets up the color to be used for the text used in the Pmcomm window.
-
-
- ΓòÉΓòÉΓòÉ 7.9.2. Background ΓòÉΓòÉΓòÉ
-
- Sets up the color to be used for the Pmcomm window background.
-
-
- ΓòÉΓòÉΓòÉ 7.10. Font ΓòÉΓòÉΓòÉ
-
- Allows you to select either a large or small font. If you use the small font
- you more lines of text will be displayed on the same size of window. The large
- font,however is more readable on most video adapters.
-
-
- ΓòÉΓòÉΓòÉ 7.11. Chat ΓòÉΓòÉΓòÉ
-
- This sets up Pmcomm to "chat" when connected to another computer that is also
- running Pmcomm. This mode automatically sets Pmcomm to echo characters locally
- and to send a carriage return line feed combination when the enter key is
- pressed.
-
-
- ΓòÉΓòÉΓòÉ 8. Macros ΓòÉΓòÉΓòÉ
-
- Allows you to pick, with a mouse, the macro you wish to send. Can also be
- selected with an Alt+corresponding number keystroke. Pmcomm allows you to set
- up ten different macros.
-
-
- ΓòÉΓòÉΓòÉ 9. Script Syntax ΓòÉΓòÉΓòÉ
-
- Both, internal and REXX, syntaxes are described in this section.
-
-
- ΓòÉΓòÉΓòÉ 9.1. REXX Functions ΓòÉΓòÉΓòÉ
-
- This describes the function calls that are available in the rxpmcomm.dll.
- Before using any of these calls you must include these lines in your REXX
- program:
-
- Call RxFuncadd " init_dll ","RxPmcomm","init_dll"
-
- Parse arg port portname screen_handle dde semaphore
-
- Call init_dll
-
- The rxpmcomm.dll must reside in a directory listed in your LIBPATH statement
- in config.sys. One of the default directories is \os2\dll. These functions are
- designed to make it easier to preform tasks necessary when writing scripts for
- asynch communications. To invoke a REXX program from a script, use the shell(
- ) function in the script. The format of the shell function is as follows:
- shell("\path\filename.cmd"); where filename.cmd is your REXX program. These
- functions have been tested with the REXX that comes with OS/2 1.2 EE, but
- should work with any totally function compatible REXX. There are some sample
- REXX programs included.
-
-
- ΓòÉΓòÉΓòÉ 9.1.1. init_dll ΓòÉΓòÉΓòÉ
-
- The init_dll function will register the functions in the rxpmcomm.dll, with
- REXX. This function must be called before any other rxpmcomm.dll function is
- called. The RxFuncadd must be called before init_dll to register this function
- with REXX.
-
-
- ΓòÉΓòÉΓòÉ 9.1.2. os2_shell ΓòÉΓòÉΓòÉ
-
- os2_shell port,port
-
- Example
-
- Call os2_shell port,port
-
- Description
-
- This command will allow a caller to shell to OS/2, remotely. The first
- parameter is input handle and the second is the output handle. In the example
- above, the command will receive and send the information to the com port.
-
- Returns
-
- 1 if successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.3. set_download_path ΓòÉΓòÉΓòÉ
-
- set_download_path directory,dde
-
- Example
-
- Call set_download_path "c:\pmcomm",dde
-
- Description
-
- The above example will set the download path to c:\pmcomm. This will store all
- of the files received in that directory. The dde, is the dde value passed on
- the command line.
-
- Returns
-
- 1 if successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.4. setcom ΓòÉΓòÉΓòÉ
-
- setcom baud,parity,data_bit,stop_bits,port
-
- Example
-
- Call setcom "2400","N","8","1",port
-
- Description
-
- This would set the com port to 2400 baud,no parity,8 data bits, 1 stop bit.
- Baud can be from 300 to 19200 with the standard OS/2 device driver. Parity can
- be N(none), O(odd), E(even), M(marked), or S(spaced). Data bits can be 5, 6, 7
- or 8. Stop bits can be 1, 1.5, or 2 (1.5 and 2 can only be use with 5 data
- bits). If a parameter is an empty string i.e. setcom "","E","7","1",port this
- leave the baud at the current rate but set the line characteristics to 7,
- Even, 1.
-
- Returns
-
- 1 if successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.5. sendb ΓòÉΓòÉΓòÉ
-
- sendb length,port
-
- Example
-
- Call sendb "300",port
-
- Description
-
- This call sends a break signal a certain time in milliseconds. The above
- example would send a break signal for 300 milliseconds. This call is mostly
- used to establish direct connects (not using a modem). Three hundred
- milliseconds should be ok for most situations.
-
- Returns
-
- 1 if successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.6. dcd ΓòÉΓòÉΓòÉ
-
- dcd port
-
- Example
-
- Call dcd port
-
- Description
-
- This call checks to see if there is a carrier detected on the modem. You can
- use this to see if Pmcomm is still online to a remote computer. For this
- information to be correct the modem must support dcd and the modem must be
- configured to support dcd. To find the command refer to your owner's manual.
-
- Returns
-
- 1 if carrier detected and 0 if no carrier.
-
-
- ΓòÉΓòÉΓòÉ 9.1.7. char_avail ΓòÉΓòÉΓòÉ
-
- char_avail port
-
- Example
-
- Call char_avail port
-
- Description
-
- This call checks to see how many characters are available in the device
- drivers receive buffer. You can use this function to check to see if the
- device driver has received any characters from the com port.
-
- Returns
-
- Number of characters in device driver receive queue.
-
-
- ΓòÉΓòÉΓòÉ 9.1.8. read_timeout ΓòÉΓòÉΓòÉ
-
- read_timeout timeout,port
-
- Example
-
- Call read_timeout 20000,port
-
- Description
-
- This call sets the length of time (in milliseconds) that wait_for, wait_fore,
- Get_ch will wait for a character from the com port. The above example will
- make the functions wait for 20 seconds.
-
- Returns
-
- 1 if successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.9. Get_ch ΓòÉΓòÉΓòÉ
-
- Get_ch port
-
- Example
-
- Call Get_ch port
-
- Description
-
- This call will get a character from the com port. If no character is available
- by the time set with read_timeout the function will return with a value of -1.
- Otherwise the function will return with the character read.
-
- Returns
-
- char value if successful and -1 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.10. ring_detect ΓòÉΓòÉΓòÉ
-
- ring_detect port
-
- Example
-
- Call ring_detect port
-
- Description
-
- This call can be used to inform a program if the phone is ringing.
-
- Returns
-
- 1 if ring detected, 0 if no ring, and 2 if invalid number of parameters.
-
-
- ΓòÉΓòÉΓòÉ 9.1.11. drop_dtr ΓòÉΓòÉΓòÉ
-
- drop_dtr port
-
- Example
-
- Call drop_dtr port
-
- Description
-
- This call is usually used to make a modem hang up. The modem must be
- configured to allow this. To find the command for your modem, check your
- owner's manual. Dtr needs to be dropped for about 2-3 seconds to make sure the
- modem sees the drop in dtr. After that length of time raise_dtr can be called
- to bring dtr back up. On a Hayes 2400 the above command will also keep the
- modem from doing an auto answer until you raise_dtr again.
-
- Returns
-
- 1 if successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.12. raise_dtr ΓòÉΓòÉΓòÉ
-
- raise_dtr port
-
- Example
-
- Call raise_dtr port
-
- Description This call is usually used after drop_dtr to allow the modem to
- process commands and enable it to answer the phone.
-
- Returns
-
- 1 if successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.13. Wait_for (REXX) ΓòÉΓòÉΓòÉ
-
- Wait_for string,string,string...,port
-
- Example
-
- Call Wait_for "first name?","last name?",port
-
- Description
-
- The above example would wait for either first name?, or last name?, from the
- com port. The function will return the index of the string that matched. For
- example if the Wait_for received last name?, then the result would be 2. You
- can specify any number of strings depending on memory available.
-
- Returns
-
- Index of matched string or zero if timeout or error.
-
-
- ΓòÉΓòÉΓòÉ 9.1.14. Wait_fore ΓòÉΓòÉΓòÉ
-
- Wait_fore string,string,string...,port,screen_handle
-
- Example
-
- Call Wait_fore "first name?","last name?",port,screen_handle
-
- Call Wait_fore "first name?",port,1
-
- Description
-
- The first example would wait for either first name?, or last name?, from the
- com port and echo the out_put to the Pmcomm screen. The second example would
- do the same except it would write the out put to StdOut(value 1) which would
- be the REXX screen.
-
- Returns
-
- Index of matched string or zero if timeout or error.
-
-
- ΓòÉΓòÉΓòÉ 9.1.15. Put_s ΓòÉΓòÉΓòÉ
-
- Put_s string,port
-
- Example
-
- Call Put_s "first name",port
-
- Description
-
- This call will send string out to port. In the above example first name will
- be sent to the com port. If port is not specified then 'string' will be sent
- to the REXX screen. If screen_handle is specified instead of port then the
- string will be sent to the Pmcomm screen.
-
- Returns
-
- Length of string actually written.
-
-
- ΓòÉΓòÉΓòÉ 9.1.16. Sleep (REXX) ΓòÉΓòÉΓòÉ
-
- Sleep time
-
- Example
-
- Call Sleep "1000"
-
- Description
-
- This call will delay the program for the amount of milliseconds specified. The
- above example will delay the computer for one second.
-
- Returns
-
- Unconditionally 0.
-
-
- ΓòÉΓòÉΓòÉ 9.1.17. beep ΓòÉΓòÉΓòÉ
-
- beep frequency,duration
-
- Example
-
- Call beep 495,100
-
- Description
-
- The above example will beep the speaker.
-
- Returns
-
- 1 if successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.18. xmodem_send ΓòÉΓòÉΓòÉ
-
- xmodem_send filename,dde,semaphore
-
- Example
-
- Call xmodem_send "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the Xmodem_CRC send routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- uploading from the menu.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.19. xmodem_receive ΓòÉΓòÉΓòÉ
-
- xmodem_receive filename,dde,semaphore
-
- Example
-
- Call xmodem_receive "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the Xmodem_CRC receive routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- downloading from the menu. The file will be downloaded into the download
- directory. The file name specified must not include a path.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.20. xmodem_1k_send ΓòÉΓòÉΓòÉ
-
- xmodem_1k_send filename,dde,semaphore
-
- Example
-
- Call xmodem_1k_send "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the 1K-Xmodem send routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- uploading from the menu.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.21. xmodem_1k_receive ΓòÉΓòÉΓòÉ
-
- xmodem_1k_receive filename,dde,semaphore
-
- Example
-
- Call xmodem_1k_receive "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the 1K-Xmodem receive routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- downloading from the menu. The file will be downloaded into the download
- directory. The file name specified must not include a path.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.22. ymodem_send ΓòÉΓòÉΓòÉ
-
- ymodem_send filename,dde,semaphore
-
- Example
-
- Call ymodem_send "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the Ymodem send routine, built into Pmcomm. Once issued
- the call will not return until the transfer either finishes or is aborted.
- Pmcomm will show the normal transfer dialog that it does when uploading from
- the menu.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.23. ymodem_receive ΓòÉΓòÉΓòÉ
-
- ymodem_receive dde,semaphore
-
- Example
-
- Call ymodem_receive dde,semaphore
-
- Description
-
- This call will invoke the Ymodem receive routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- downloading from the menu. The file will be downloaded into the download
- directory. This one call will receive multiple files. The filenames used are
- the ones sent from the remote computer.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.24. ymodemg_send ΓòÉΓòÉΓòÉ
-
- ymodemg_send filename,dde,semaphore
-
- Example
-
- Call ymodemg_send "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the Ymodem-g send routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- uploading from the menu.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.25. ymodemg_receive ΓòÉΓòÉΓòÉ
-
- ymodemg_receive dde,semaphore
-
- Example
-
- Call ymodemg_receive dde,semaphore
-
- Description
-
- This call will invoke the Ymodem-g receive routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- downloading from the menu. The file will be downloaded into the download
- directory. This one call will receive multiple files. The filenames used are
- the ones sent from the remote computer.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.26. zmodem_send ΓòÉΓòÉΓòÉ
-
- zmodem_send filename,dde,semaphore
-
- Example
-
- Call zmodem_send "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the Zmodem send routine, built into Pmcomm. Once issued
- the call will not return until the transfer either finishes or is aborted.
- Pmcomm will show the normal transfer dialog that it does when uploading from
- the menu.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.27. zmodem_receive ΓòÉΓòÉΓòÉ
-
- zmodem_receive dde,semaphore
-
- Example
-
- Call zmodem_receive dde,semaphore
-
- Description
-
- This call will invoke the Zmodem receive routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- downloading from the menu. The file will be downloaded into the download
- directory. This one call will receive multiple files. The filenames used are
- the ones sent from the remote computer.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.28. ascii_send ΓòÉΓòÉΓòÉ
-
- ascii_send filename,dde,semaphore
-
- Example
-
- Call ascii_send "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the ASCII send routine, built into Pmcomm. Once issued
- the call will not return until the transfer either finishes or is aborted.
- Pmcomm will show the normal transfer dialog that it does when uploading from
- the menu.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.1.29. ascii_receive ΓòÉΓòÉΓòÉ
-
- ascii_receive filename,dde,semaphore
-
- Example
-
- Call ascii_receive "filename.ext",dde,semaphore
-
- Description
-
- This call will invoke the ASCII receive routine, built into Pmcomm. Once
- issued the call will not return until the transfer either finishes or is
- aborted. Pmcomm will show the normal transfer dialog that it does when
- downloading from the menu. The file will be downloaded into the download
- directory. The file name specified must not include a path.
-
- Returns
-
- 1 if call is successful and 0 if unsuccessful.
-
-
- ΓòÉΓòÉΓòÉ 9.2. Internal Functions ΓòÉΓòÉΓòÉ
-
- These are script functions that are built into Pmcomm.
-
-
- ΓòÉΓòÉΓòÉ 9.2.1. wait_for (internal) ΓòÉΓòÉΓòÉ
-
- wait_for("string");
-
- This will wait until the word 'string' is received. One use of this is when
- logging onto a BBS you can have it wait until prompted for a first name.
-
-
- ΓòÉΓòÉΓòÉ 9.2.2. puts ΓòÉΓòÉΓòÉ
-
- puts("string");
-
- This will send string to the comport. The 'C' language special character
- '\r','\n','\b',and '\a' can also be used.
-
- The \r means carriage return.
-
- The \n means carriage return and line feed combination.
-
- The \b means backspace.
-
- The \a means alert (Pmcomm will beep).
-
-
- ΓòÉΓòÉΓòÉ 9.2.3. sleep (internal) ΓòÉΓòÉΓòÉ
-
- sleep(1000);
-
- This will wait for the number of milliseconds specified. In this example it
- would sleep for one second.
-
-
- ΓòÉΓòÉΓòÉ 9.2.4. call ΓòÉΓòÉΓòÉ
-
- call("filename");
-
- This allows you to nest scripts. If you put the name of the script that you
- want to execute where it says filename, it will execute that script and then
- continue. The limit on number of nested scripts is only by available stack
- space.
-
-
- ΓòÉΓòÉΓòÉ 9.2.5. capture_on ΓòÉΓòÉΓòÉ
-
- capture_on("filename");
-
- Captures all screen output to a file. Replace filename with the name of the
- file you want the output written to.
-
-
- ΓòÉΓòÉΓòÉ 9.2.6. capture_off ΓòÉΓòÉΓòÉ
-
- capture_off();
-
- Stops screen capture and closes the capture file.
-
-
- ΓòÉΓòÉΓòÉ 9.2.7. shell ΓòÉΓòÉΓòÉ
-
- shell("\path\filename.ext");
-
- Allows you to call an external program to run from a script.
-
-
- ΓòÉΓòÉΓòÉ 9.3. Sample Scripts ΓòÉΓòÉΓòÉ
-
- These are scripts to help you, when you start to write your own scripts.
-
-
- ΓòÉΓòÉΓòÉ 9.3.1. REXX Sample ΓòÉΓòÉΓòÉ
-
- /* Sample Script*/
-
- /* This script will allow you to log on to Compu-Plane once you change the
- strings stored in the variables called name and pass. Enter the sample.scr
- name for the script name of the Compu-Plane phone number, and change the name
- in the shell( ) function to the path and filename of this file.*/
-
- Call RxFuncadd "init_dll","RxPmcomm","init_dll"
-
- /* This function registers the init_dll function with REXX. The init_dll
- function will register the rest of the functions in the rxpmcomm.dll. */
-
- Parse arg port portname screen_handle dde semaphore
-
- /*These are the values that Pmcomm passes on the command line to an external
- program. These values can then be used in different REXX functions along with
- the rxpmcomm.dll functions. Following is the description of each value: */
-
- /* port = The handle of the open com port in Pmcomm */
- /* portname = The name of the opened com port ie.. COM1*/
- /* screen_handle = Anything written to the handle will be printed */
- on the Pmcomm screen. */
- /* dde = This must be passed to any file transfer function. It */
- /* allows the rxpmcomm.dll function to communicate with */
- /* Pmcomm. */
- /* semaphore = This also must be passed to any file transfer */
- /* function. It makes your REXX program wait until */
- /* the transfer has been completed. */
-
- Call init_dll
-
- /* Required before any other rxpmcomm.dll functions are called. */
-
- /* Setup variables */
-
- name = 'first;last' /* where first is your first name and last is*/
- pass = 'password' /* your last name and password is your password.*/
- cr = '0d'x
-
- Call read_timeout '20000',port
-
- /* This sets the read timeout for 20 seconds. This is used in the Wait_for,
- Wait_fore, and the Get_ch functions. */
-
- Say 'Waiting for first name ...'
-
- /* This will be printed on the REXX screen. */
-
- Do Forever
-
- Call Wait_fore 'name','password','continue?','?->',port,screen_handle
-
- /* This call will echo all characters to the Pmcomm screen that come from the
- open com port. When one of the strings are matched the function will return
- the index of the matched string in the variable result. For example if it
- receives the string password then the result will be equal to 2. If the
- functions waits longer then the read timeout value then result will be equal
- to 0. */
- match = result
- Select
- When match=1 then
- Do
- Call Put_s name||cr,port
- Say 'Waiting for password ...'
- End
- When match=2 then Call Put_s pass||cr,port
- When match=3 then Call Put_s cr,port
- When match=4 then Exit
- Otherwise nop
- End
- End
- Say 'Script ended -' date( ) time( )
- Exit
-
-
- ΓòÉΓòÉΓòÉ 9.3.2. Internal Sample ΓòÉΓòÉΓòÉ
-
- An example script to log onto a Multi-Net Communications BBS could be:
-
- wait_for ("first name");
- puts ("john\n");
- wait_for("last name");
- puts("doe\n");
- wait_for("password");
- puts("password\n");
- sleep (1000);
- puts("\n");
-
- Scripts can be executed automatically when logging onto a BBS by specifying
- the script filename in the dialing directory for that phone number. You can
- execute a script from the File menu at anytime.
-
-
- ΓòÉΓòÉΓòÉ 10. Installing Pmcomm Host Mode ΓòÉΓòÉΓòÉ
-
- To install Pmcomm's Host Mode, change to the Pmcomm directory and run the
- host.exe program. The first prompt will ask you to enter the maximum baud rate
- of your modem. At the next prompt you must enter the number of selection that
- matches your modem the closest. If you are unsure of which selection to make,
- choose the Hayes 2400 modem as your selection. Next, you must enter the path,
- including drive, of where you wish to install the Host Mode. When prompted,
- enter your first name, last name, and password. The install program
- automatically creates a password file in the necessary format. If this is an
- "open" system new users will be stored in this file automatically. If this is a
- "closed" system only the people that are registered in this file will be able
- to access the Host Mode. The six files that the install program creates is
- HOSTPASS.FLE, HOSTDIR.FLE, HOSTHEAD.FLE, HOST.SCR, HOSTNEWU.FLE, and
- HOSTHELP.FLE. The HOSTPASS.FLE file, is where all of the users' names,
- passwords, securities, and last time on are stored. The HOSTDIR.FLE file, is a
- list of the directoties that have been created for the host mode. The
- HOSTHEAD.FLE file is the file that is displayed to users when they logon. The
- HOST.SCRr file is the main executable script. The HOSTNEWU.FLE file is the file
- that is displayed to new users. In order for a user to be able to receive help
- from the menu, the HOSTHELP.FLE must contain the information that will be
- displayed.
-
-
- ΓòÉΓòÉΓòÉ 11. Pmcomm Host Mode ΓòÉΓòÉΓòÉ
-
- /* PMCOMM HOST MODE */
-
- /* This sets signals to call these routines when corresponding REXX errors
- occur. */
- Signal ON SYNTAX NAME SYNTAX_ERROR
- Signal ON NOVALUE NAME SYNTAX_ERROR
- Signal ON HALT NAME KILL_HOST_MODE
-
-
- /* These are the values that Pmcomm passes on the command line to an external
- program. These values can then be used in different REXX functions along with
- the rxpmcomm.dll functions. Following is the description of each value: */
-
-
- /* port = The handle of the open com port in
- Pmcomm
- portname = The name of the opened com port ie..
- COM1
- screen_handle = Anything written to the handle will be
- printed on the Pmcomm screen.
- dde = This must be passed to any file
- transfer function. It allows the
- rxpmcomm.dll function to communicate
- with Pmcomm.
- semaphore = This also must be passed to any file
- transfer function. It makes your REXX
- program wait until the transfer has
- been completed. */
-
-
- Parse arg port portname screen_handle dde semaphore
- Parse source . . fn .
-
-
- /* Required before any other rxpmcomm.dll functions are called. */
- Call RxFuncadd "init_dll","RxPmcomm","init_dll"
- Call init_dll
-
-
- Expose_list = 'cr crlf bs esc port screen_handle
- connection dde priv' ,
- 'dir_line. dir_name. dir_desc. fname
- lname default_dir' ,
- 'protocol last_login total_logins
- audit_file temp_file' ,
- 'pass_file pword semaphore upload_dir
- cmd_name. cmd_desc.',
- 'num_of_cmds help_file'
-
-
- Call Clear_buffer
- Call Drop_DTR port
- Call Sleep "2000"
- Call Raise_DTR port
-
-
- Begin:
- Do Main = 1
-
-
- /* Setup variables */
- header_file = "D:\PMCOMM\HOSTHEAD.FLE"
- pass_file = "D:\PMCOMM\HOSTPASS.FLE"
- temp_file = "D:\PMCOMM\HOST$$$$.FLE"
- audit_file = "D:\PMCOMM\HOSTAUDT.FLE"
- help_file = "D:\PMCOMM\HOSTHELP.FLE"
- newuser_file = "D:\PMCOMM\HOSTNEWU.FLE"
- dir_file = "D:\PMCOMM\HOSTDIR.FLE"
- upload_dir = "D:\PMCOMM\UPLOAD"
-
-
- /* The S0=1 must be included in the initialization string so the modem will
- answer the phone. */
- modem_string = "AT &C1&D2 S0=1 X4"
-
-
- /* If the system is designated as "OPEN", new users will be able to logon. If
- the system is designated as "CLOSED" only users listed in the hostpass.fle
- file will be allowed to logon. */
- system = "OPEN"
-
-
- /* If connection is designated as "DIRECT", no modem commands will be sent. */
- connection = "MODEM"
-
-
- /* If baud is designated as "AUTO", the Host Mode will match the incoming baud
- rate. If a baud rate is listed, the Host Mode will maintain that baud rate to
- the modem. */
- Baud = "19200"
-
-
- max_attempts = 3
- bs = '08'x
- cr = '0d'x
- esc = '1b'x
- crlf = '0d0a'x
-
-
- Parse value Directory() with orgdir
-
-
- Call read_timeout "5000",port
-
-
- /* This section intializes the modem. */
- If connection = 'MODEM' then
- Do
- Do Forever
- Call Put_s 'ATZ'||cr,port
- Call wait_for "OK",port
- Call Sleep "2000"
- Call Put_s modem_string||cr,port
- Call wait_for "OK",port
- If result = 1 then leave
- End
- End
-
-
- /* This section checks for valid paths, and changes to the default directory.
- */
- If system = 'CLOSED' then
- Do
- Parse value state_file(pass_file) with rc
- If rc = '' then
- Do
- Call Put_s 'Password file missing' crlf,screen_handle
- Call Put_s 'The password file must exist for
- CLOSED system operation ...'
- crlf,screen_handle
- Signal Kill_Host_mode
- End
- End
-
-
- Parse value state_file(dir_file) with rc
- If rc = '' then
- Do
- Call Put_s 'Directory file missing ...'
- crlf,screen_handle
- Signal Kill_Host_mode
- End
- i=0
- Do until lines(dir_file) = 0
- Parse value linein(dir_file) with temp_line
- If substr(temp_line,1,1) = '*' then iterate
- i=i+1
- Parse var temp_line dir_line.i
- Parse var dir_line.i dir_name.i dir_desc.i
- tempname = pos("\",dir_name.i)
- If tempname = 0 then dir_name.i = dir_name.i||'\'
- dir_desc.i = space(dir_desc.i)
- dir_name.i = translate(dir_name.i)
- End
- dir_line.0 = i
- Parse value stream(dir_file,"c","close") with rc
-
-
- Parse value Directory(dir_name.1) with default_dir
- If default_dir \= '' then
- Do
- Call Clear
- Call Put_s 'Default directory changed to'
- default_dir crlf,screen_handle
- End
- Else do
- Call Clear
- Call Put_s 'Default directory' default_dir 'not
- found ...' crlf,screen_handle
- Signal Kill_Host_mode
- End
-
-
- If upload_dir \= '' then Call Set_Download_Path upload_dir,dde
-
-
- /* Pmcomm Host Mode is now waiting for a connect message from the com port. */
- Connection_Pending:
- Call Put_s 'PMCOMM now running in HOST mode' crlf crlf,screen_handle
- Call Put_s 'Waiting for connection ...'
- crlf,screen_handle
- Call read_timeout "60000",port
- If connection = 'MODEM' then
- Do
- If baud = "AUTO" then
- Do
- Do Forever
- Call Wait_fore '1200','2400','4800','9600',port,screen_handle
- match = result
- Select
- When match = 0 then iterate
- When match = 1 then Call Setcom
- "1200","N","8","1",port
- When match = 2 then Call Setcom
- "2400","N","8","1",port
- When match = 3 then Call Setcom
- "4800","N","8","1",port
- When match = 4 then Call Setcom
- "9600","N","8","1",port
- Otherwise nop
- End
- Leave
- End
- End
- Else Do
- Call Setcom baud,"N","8","1",port
- Do Forever
- Call Wait_fore 'CONNECT',port,screen_handle
- If result = 1 then leave
- End
- End
- End
-
-
- Call Sleep "5000"
- /* The file HOSTHEAD.FLE is displayed to the user at this point. */
- Parse value Header(header_file) with rc
- invalid_login_count = 0
-
-
- /* This section is where the Host Mode receives the users name. */
- Sign_on:
- Do Forever
- fname = '' ; lname = '' ; pword = '' ; nuser = 'N'
- Parse value read_with_echo("Your first name?->") with
- rc fname .
- If rc \=0 then leave main
- If fname = '' then iterate
- Parse value read_with_echo(" Your last name?->") with
- rc lname .
- If rc \=0 then leave main
- If lname = '' then iterate
-
-
- /* This section checks the password file (HOSTPASS.FLE) to see if the user is
- listed. */
- Parse value read_password_file(pass_file) with rc priv
- protocol r_pass total_logins last_login
- If rc \= 0 then
- Do
- If system = 'OPEN' then
- Do
- Parse value read_with_echo(fname lname||",
- correct - [Y]es or [Return], [N]o?->")
- with rc okname .
- If rc \=0 then leave main
- If okname = 'N' then iterate
- Parse value Header(newuser_file) with rc
- Parse value read_with_echo("Would you like to
- register - [Y]es or [Return], [N]o?->")
- with rc nuser .
- If rc \=0 then leave main
- If nuser = 'N' then leave main
- nuser = 'Y'
- r_pass = ''
- End
- Else Do
- Call Put_s crlf||"Closed System, no access allowed" crlf,port
- Call Put_s crlf||"Closed System, no access
- allowed" crlf,screen_handle
- Leave main
- End
- End
-
-
- /* This section gets a password from a user and checks to see if the password
- matches the one in the password file (HOSTPASS.FLE). */
- Parse value read_without_echo("Enter your password
- (.'s will echo)->") with rc pword .
- If pword = '' then iterate
- If rc \=0 then leave main
- If r_pass = '' then r_pass = pword
- If nuser = 'Y' then Call Add_password_file(pass_file)
- If pword \== r_pass then
- Do
- If invalid_login_count = max_attempts then leave
- main
- Call Put_s crlf||"Invalid Login Attempt - Try again" crlf,port
- Call Put_s crlf||"Invalid Login Attempt - Try
- again" crlf,screen_handle
- invalid_login_count = invalid_login_count + 1
- Iterate
- End
- Leave
- End
-
-
- /* This section loads the login message into the audit file (HOSTAUDT.FLE). */
- login_msg = "Login by" fname "at" time('C') 'on'
- date('L') ', last login was on' last_login
- Call Put_s crlf crlf||login_msg crlf,port
- Call Put_s crlf crlf||Login_msg crlf,screen_handle
- Call Audit(date('L') time('C') "- Login by" fname
- lname)
- rc = time("R")
-
-
- /* This section displays the menu and receives a menu selection from the user.
- */
- Menu_loop:
-
-
- Do Forever
- Call Put_s crlf crlf, port
- Call Put_s crlf crlf, screen_handle
-
-
- Call Build_Menu
-
-
- cmdline = ''
- heading = crlf crlf crlf center("--- Main Options Menu
- ---",79)
- Call Put_s heading crlf crlf,port
- Call Put_s heading crlf,screen_handle
- Do i = 1 by 2 to num_of_cmds
- j=i+1
- line = overlay(cmd_name.j cmd_desc.j,cmd_name.i
- cmd_desc.i,40)
- Call Put_s line crlf,port
- Call Put_s line crlf,screen_handle
- cmdline = cmdline substr(cmd_name.i,2,1) substr
- (cmd_name.j,2,1)
- End
- cmdline = space(cmdline,1,',')
- Parse value read_with_echo("Enter choice"
- cmdline||"?->") with rc pick .
- If rc \= 0 then leave main
- If pick = '' then iterate
-
-
- Select
- When pick = "C" then Parse value Change_Dir()
- with rc
- When pick = "D" then Parse value
- File_Transfer("DOWNLOAD") with rc
- When pick = "F" then Parse value List_Files()
- with rc
- When pick = "G" then Parse value Good_Bye()
- with rc
- When pick = "H" then Parse value Help_Text()
- with rc
- When pick = "I" then Parse value
- User_Information() with rc
- When pick = "L" then Parse value
- List_Directories() with rc
- When pick = "S" then Parse value Shell_OS2()
- with rc
- When pick = "T" then Signal Kill_Host_Mode
- When pick = "U" then Parse value
- File_Transfer("UPLOAD") with rc
- Otherwise iterate
- End
- If rc \=0 then leave main
- End
-
-
- /* This section hangs-up the phone and recycles Pmcomm Host Mode for the next
- caller. */
- Call Clear_buffer
- Call Drop_DTR port
- Call Sleep "2000"
- Call Raise_DTR port
- Call Put_s crlf||'PMComm Host Mode Recycling' crlf,screen_handle
-
-
- End
-
-
- Call Clear_buffer
- Call Drop_DTR port
- Call Sleep "2000"
- Call Raise_DTR port
- Call Put_s crlf||'PMComm Host Mode Recycling'
- crlf,screen_handle
- Signal Begin
-
-
- /* This clears both the local Pmcomm screen and the remote screen. */
- Clear: Procedure expose (expose_list)
- Call put_s "1b5b324a"x,screen_handle
- Call put_s "1b5b324a"x,screen_handle
- Call put_s "1b5b324a"x,port
- Call put_s "1b5b324a"x,port
- Return
-
-
- /* This routine will be called when an error is detected. */
- syntax_error:
- fp = filespec("path",fn)
- fd = filespec("drive",fn)
- errormsg='REXX error' rc 'in line' sigl':'
- errortext(rc)
- errorfile = fd||fp||"SCRIPT.ERR"
- rc = lineout(errorfile,date() time() fn '-' errormsg)
- rc = lineout(errorfile,date() time() fn '-'
- sourceline(sigl))
- Exit
-
-
- /* This section performs both the send and receive file transfers. */
- File_Transfer: Procedure expose (expose_list)
- Parse arg direction
-
-
- Do i=1 until i=dir_line.0
- If default_dir = dir_name.i then
- Do
- Call Put_s crlf||'Current directory is ['||i||'] -' dir_desc.i crlf,port
- Call Put_s crlf||'Current directory is
- ['||i||'] -' dir_desc.i crlf,screen_handle
- i = 0
- Leave
- End
- End
- If i \=0 then
- Do
- Call Put_s crlf||"Current directory is "
- default_dir crlf,port
- Call Put_s crlf||"Current directory is "
- default_dir crlf,screen_handle
- End
-
-
- If protocol \= 'NONE' then
- Do
- Call Put_s "Current file transfer protocol is"
- protocol crlf,port
- Call Put_s "Current file transfer protocol is"
- protocol crlf,screen_handle
- t_protocol = protocol
- End
- Do Forever
- Parse value read_with_echo("Enter file name or Tap
- [Return] to abort?->") with rc dfn .
- If rc \=0 then return rc
- Parse var dfn fn '.' ft
- If dfn = '' then return 0
- If ft = '' then
- Do
- Call Put_s crlf||"Invalid filename ..."
- crlf,port
- Call Put_s crlf||"Invalid filename ..."
- crlf,screen_handle
- Iterate
- End
- If direction = "DOWNLOAD" then
- Do
- tempname = reverse(default_dir)
- If pos("\",tempname) = 1 then file_name =
- default_dir||dfn
- else file_name = default_dir||"\"||dfn
- Parse value State_file(file_name) with rc
- If rc = '' then
- Do
- Call Put_s crlf||"File not found ..."
- crlf,port
- Call Put_s crlf||"File not found ..."
- crlf,screen_handle
- Iterate
- End
- End
- If direction = "UPLOAD" then
- Do
- tempname = reverse(default_dir)
- If pos("\",tempname) = 1 then file_name =
- default_dir||dfn
- else file_name = default_dir||"\"||dfn
- Parse value State_file(file_name) with rc
- If rc = file_name then
- Do
- Call Put_s crlf||"File already exists
- ..." crlf,port
- Call Put_s crlf||"File already exists
- ..." crlf,screen_handle
- Iterate
- End
- End
- Leave
- End
-
-
- Parse value read_with_echo("Logoff after file transfer
- - [N]o or [Return], [Y]?->") with rc auto .
- If rc \=0 then return rc
- If protocol = 'NONE' then
- Do
- Parse value Set_protocol('NONE') with rc
- t_protocol = protocol
- protocol = 'NONE'
- End
-
- Select
- When t_protocol = "XMODEM" & direction =
- "DOWNLOAD" then
- do
- Call Put_s crlf||"Ready to send file ..."
- crlf,port
- Call Put_s crlf||"Ready to send file ..."
- crlf,screen_handle
- Call xmodem_send file_name,dde,semaphore
- ft_rc = result
- end
- When t_protocol = "XMODEM" & direction = "UPLOAD"
- then
- do
- Call Put_s crlf||"Ready to receive file
- ..." crlf,port
- Call Put_s crlf||"Ready to receive file
- ..." crlf,screen_handle
- Call xmodem_receive file_name,dde,semaphore
- ft_rc = result
- end
- When t_protocol = "XMODEM-1K" & direction =
- "DOWNLOAD" then
- do
- Call Put_s crlf||"Ready to send file ..."
- crlf,port
- Call Put_s crlf||"Ready to send file ..."
- crlf,screen_handle
- Call xmodem_1k_send file_name,dde,semaphore
- ft_rc = result
- end
- When t_protocol = "XMODEM-1K" & direction =
- "UPLOAD" then
- do
- Call Put_s crlf||"Ready to receive file
- ..." crlf,port
- Call Put_s crlf||"Ready to receive file
- ..." crlf,screen_handle
- Call xmodem_1k_receive file_name,dde,semaphore
- ft_rc = result
- end
- When t_protocol = "YMODEM" & direction =
- "DOWNLOAD" then
- do
- Call Put_s crlf||"Ready to send file ..."
- crlf,port
- Call Put_s crlf||"Ready to send file ..."
- crlf,screen_handle
- Call ymodem_send file_name,dde,semaphore
- ft_rc = result
- end
- When t_protocol = "YMODEM" & direction =
- "UPLOAD" then
- do
- Call Put_s crlf||"Ready to receive file
- ..." crlf,port
- Call Put_s crlf||"Ready to receive file
- ..." crlf,screen_handle
- Call ymodem_receive dde,semaphore
- ft_rc = result
- end
- When t_protocol = "YMODEMG" & direction =
- "DOWNLOAD" then
- do
- Call Put_s crlf||"Ready to send file ..."
- crlf,port
- Call Put_s crlf||"Ready to send file ..."
- crlf,screen_handle
- Call ymodemg_send file_name,dde,semaphore
- ft_rc = result
- end
- When t_protocol = "YMODEMG" & direction =
- "UPLOAD" then
- do
- Call Put_s crlf||"Ready to receive file
- ..." crlf,port
- Call Put_s crlf||"Ready to receive file
- ..." crlf,screen_handle
- Call ymodemg_receive dde,semaphore
- ft_rc = result
- end
- When t_protocol = "ZMODEM" & direction =
- "DOWNLOAD" then
- do
- Call Put_s crlf||"Ready to send file ..."
- crlf,port
- Call Put_s crlf||"Ready to send file ..."
- crlf,screen_handle
- Call zmodem_send file_name,dde,semaphore
- ft_rc = result
- end
- When t_protocol = "ZMODEM" & direction =
- "UPLOAD" then
- do
- Call Put_s crlf||"Ready to receive file
- ..." crlf,port
- Call Put_s crlf||"Ready to receive file
- ..." crlf,screen_handle
- Call zmodem_receive dde,semaphore
- ft_rc = result
- end
- Otherwise return 0
- End
-
-
- If ft_rc = 1 then
- Do
- Call Sleep "3000"
- Call Put_s crlf||'File transfer complete'
- crlf,port
- Call Put_s crlf||'File transfer complete'
- crlf,screen_handle
- If auto = "Y" then
- Do
- Parse value Good_bye() with rcode
- return rcode
- End
- return 0
- End
- Else do
- Call Sleep "3000"
- Call Put_s crlf||'File transfer aborted'
- crlf,port
- Call Put_s crlf||'File transfer aborted'
- crlf,screen_handle
- If auto = "Y" then
- Do
- Parse value Good_bye() with rcode
- return rcode
- End
- return 0
- End
-
-
-
- /* This section reads in characters from the remote computer and echoes it to
- the local Pmcomm screen as well as the remote computer. */
- Read_with_echo: Procedure expose (expose_list)
- Parse arg screen_output
-
-
- Call Clear_buffer
- Call Read_timeout '3000',port
- Call Put_s crlf||screen_output,port
- Call Put_s crlf||screen_output,screen_handle
- line = ' '
- j = 0
- time_out = 0
-
-
- Do Forever
- Parse value Get_CH(port) with char_in
- If connection = 'MODEM' then
- Do
- Call DCD port
- If result = 0 then return 99
- End
-
- If char_in = "-1" then
- Do
- time_out = time_out+1
- If time_out = 60 then
- Do
- Call Put_s crlf crlf||"Session being
- cancelled due to inactivity" crlf,port
- Call Put_s crlf crlf||"Session being
- cancelled due to inactivity"
- crlf,screen_handle
- Parse value Good_bye() with rcode
- return rcode
- End
- Iterate
- End
-
-
- If char_in = cr then
- Do
- Call Put_s crlf,port
- Call Put_s crlf,screen_handle
- line = space(line)
- line = translate(line)
- return 0 line
- End
-
-
- If char_in = bs then
- Do
- If j > 0 then
- Do
- line = delstr(line,j,1)
- Call Put_s bs,port
- Call Put_s bs,screen_handle
- j=j-1
- End
- End
- Else Do
- line = line||char_in
- Call Put_s char_in,port
- Call Put_s char_in,screen_handle
- j=j+1
- End
- End
-
-
- /* Reads characters from the remote computer and echoes back dots to the the
- remote screen and characters to the local Pmcomm screen. */
- Read_without_Echo: Procedure expose (expose_list)
- Parse arg screen_output
-
-
- Call Clear_buffer
- Call Read_timeout '3000',port
- Call Put_s crlf||screen_output,port
- Call Put_s crlf||screen_output,screen_handle
- line = ''
- j=0
- time_out = 0
-
-
- Do Forever
- Parse value Get_CH(port) with char_in
- If connection = 'MODEM' then
- Do
- Call DCD port
- If result = 0 then return 99
- End
-
-
- If char_in = "-1" then
- Do
- time_out = time_out+1
- If time_out = 60 then
- Do
- Call Put_s crlf crlf||"Session being
- cancelled due to inactivity" crlf,port
- Call Put_s crlf crlf||"Session being
- cancelled due to inactivity"
- crlf,screen_handle
- Parse value Good_bye() with rcode
- return rcode
- End
- Iterate
- End
-
-
- If char_in = cr then
- Do
- Call Put_s crlf,port
- Call Put_s crlf,screen_handle
- line = space(line)
- line = translate(line)
- return 0 line
- End
-
-
- If char_in = bs then
- Do
- If j > 0 then
- Do
- line = delstr(line,j,1)
- Call Put_s bs,port
- Call Put_s bs,screen_handle
- j=j-1
- End
- End
- Else Do
- line = line||char_in
- Call Put_s ".",port
- Call Put_s char_in,screen_handle
- j=j+1
- End
- End
-
-
- /* This procedure flushes the com port receive buffer. */
- Clear_buffer: Procedure expose (expose_list)
- Call Read_timeout '0',port
- Do Forever
- Parse value Get_CH (port) with rc
- If rc = "-1" then return
- End
- Return
-
-
- /* This procedure displays a help file (HOSTHELP.FLE). */
- Help_text: Procedure expose (expose_list)
- Parse value Header(help_file) with rc
- If rc \=0 then
- Do
- Call put_s crlf||'Help file not available ...' crlf,port
- Call put_s crlf||'Help file not available ...'
- crlf,screen_handle
- End
- Return 0
-
-
- /* This reads the password file (HOSTPASS.FLE) until it gets a match or
- reaches the end of the file. */
- Read_password_file: Procedure expose (expose_list)
- Parse arg pass_file
- protocol = "NONE"
- r_fname = '' ; r_lname = '' ; r_pass = '' ;
- r_priv = ''
- r_protocol = protocol ; r_total_logins = '' ;
- r_last_login = ''
- Do until lines(pass_file) = 0
- Parse value linein(pass_file) with pass_line
- If substr(pass_line,1,1) = '*' then iterate
- Parse upper var pass_line r_fname r_lname r_pass
- r_priv r_protocol r_total_logins r_last_login
- If fname \== r_fname | lname \== r_lname then
- iterate
- If r_protocol = '' then r_protocol = protocol
- If r_total_logins = '' then r_total_logins = 0
- r_total_logins = r_total_logins + 1
- If r_last_login = '' then r_last_login = 'UNKNOWN'
- Parse value stream(pass_file,"c","close") with rc
- return 0 r_priv r_protocol r_pass r_total_logins
- r_last_login
- End
- Parse value stream(pass_file,"c","close") with rc
- Return 99 1 protocol 'DUMMY' 1 date('L')
-
-
- /* This procedure updates the current users information in the password file
- (HOSTPASS.FLE). */
- Update_Password_file: Procedure expose (expose_list)
- Parse arg pass_file temp_file
- Do until lines(pass_file) = 0
- Parse value linein(pass_file) with pass_line
- Parse upper var pass_line r_fname r_lname r_pass
- r_priv .
- If fname \== r_fname | lname \== r_lname then
- Do
- Parse value lineout(temp_file,pass_line)
- with rc
- End
- Else Do
- last_login = Date('L')
- pass_line = r_fname r_lname pword r_priv
- protocol total_logins last_login
- Parse value lineout(temp_file,pass_line)
- with rc
- End
- End
- Parse value stream(pass_file,"c","close") with rc
- Parse value stream(temp_file,"c","close") with rc
- Address CMD "ERASE" pass_file
- pass_name = filespec("name",pass_file)
- Address CMD "RENAME" temp_file pass_name
- Return 0
-
-
- /* This procedure adds a new user to the password file (HOSTPASS.FLE). */
- Add_Password_file: Procedure expose (expose_list)
- Parse arg pass_file
- pass_line = fname lname pword 1 protocol 1 date('L')
- Parse value lineout(pass_file,pass_line) with rc
- Parse value stream(pass_file,"c","close") with rc
- Return 0
-
-
- /* This displays a file both locally and remotely. */
- Header: Procedure expose (expose_list)
- Parse arg text_file
- Parse value state_file(text_file) with rc
- If rc = '' then return 99
- Call put_s crlf,port
- Call put_s crlf,screen_handle
- Do until lines(text_file) = 0
- Parse value linein(text_file) with head_line
- If substr(head_line,1,1) = '*' then iterate
- Call put_s head_line crlf,port
- Call put_s head_line crlf,screen_handle
- End
- Parse value stream(text_file,"c","close") with rc
- Return 0
-
-
- /* This procedure adds the audit information to the end of the audit file
- (HOSTAUDT.FLE). */
- Audit: Procedure expose (expose_list)
- Parse arg audit_record
- Parse value lineout(audit_file,audit_record) with rc
- Return rc
-
-
- ΓòÉΓòÉΓòÉ 12. Pmcomm Host Mode (cont.) ΓòÉΓòÉΓòÉ
-
- /* This diplays a menu. The menu that is displayed depends upon the user's
- security level. */
- Build_Menu: Procedure expose (expose_list)
- command_tbl. = ''
- command_tbl.1 = "[C]hange Active Directory (or drive)
- ; 5"
- command_tbl.2 = "[D]ownload A File ; 1"
- command_tbl.3 = "[F]iles (List current directory)
- ; 1"
- command_tbl.4 = "[G]oodbye (Disconnect) ; 0"
- command_tbl.5 = "[H]elp (Main command help) ; 0"
- command_tbl.6 = "[I]nformation (User defaults) ; 0"
- command_tbl.7 = "[L]ist File Directories ; 0"
- command_tbl.8 = "[S]hell To OS/2 ; 9"
- command_tbl.9 = "[T]erminate Host mode ; 9"
- command_tbl.10 = "[U]pload A File ; 1"
-
-
- cmd_desc. = ''
- cmd_name. = ''
- j = 0
- Do i = 1 until command_tbl.i = ''
- Parse var command_tbl.i tbl_command tbl_desc ';'
- tbl_priv
- If tbl_priv > priv then iterate
- j = j + 1
- cmd_name.j = tbl_command
- cmd_desc.j = tbl_desc
- End
- num_of_cmds = j
- Return
-
-
- /* This procedure allows a user to choose a directory and the list the files
- within that directory. The directories that can be listed, along with their
- corresponding descriptions, are stored in the HOSTDIR.FLE file. If a user's
- security is less than 5, the disk directory names will not be displayed. */
- List_files: Procedure expose (expose_list)
- Parse value read_with_echo("Enter wildcard for files
- or Tap [Return] for ALL files?->") with rc wildcard .
- If rc \=0 then return rc
-
-
- Do i=1 until i=dir_line.0
- If default_dir = dir_name.i then
- Do
- Call Put_s crlf||'Directory ['||i||'] -' dir_desc.i crlf,port
- Call Put_s crlf||'Directory ['||i||'] -'
- dir_desc.i crlf,screen_handle
- Leave
- End
- End
-
-
- queue = 'PMCOMMQ'
- rc = rxqueue('delete',queue)
- rc = rxqueue('create',queue)
- rc = rxqueue('set',queue)
- Address CMD 'DIR' wildcard '/N 2>NUL | RXQUEUE' queue
- If queued() <= 5 then
- Do
- Call put_s crlf||'No files Found or Directory
- Empty' crlf,port
- Call put_s crlf||'No Files Found or Directory
- Empty' crlf,screen_handle
- rc = rxqueue('delete',queue)
- Return 0
- End
- Do 4
- Parse pull .
- End
- Do i=1 until queued()-1 <= 0
- Parse pull d_date d_time d_bytes . d_file
- If priv < 5 & datatype(d_bytes,'N') = 0
- then iterate
- outline = left(d_file,13) right(d_bytes,8)
- right(d_date,10)
- Call Put_s outline crlf,port
- Call Put_s outline crlf,screen_handle
- x = i // 21
- If x = 0 then
- Do
- Parse value read_with_echo ("More - Tap
- [Return] to continue or Q to abort?->")
- with rc more .
- If rc \=0 then return rc
- If more \= '' then leave
- End
- End
- rc = rxqueue('delete',queue)
- Return 0
-
-
- /* This section displays the available directories to the user. */
- List_Directories: Procedure expose (expose_list)
- Do forever
- Parse value read_with_echo ("List -
- [1.."||dir_line.0||"], [L]ist, [Return] to abort?->")
- with rc func .
- If rc \=0 then return rc
- If func = '' then return 0
- If func = 'L' then
- Do
- Do i=1 until i=dir_line.0
- Call Put_s '['||i||']' dir_desc.i crlf,port
- Call Put_s '['||i||']' dir_desc.i
- crlf,screen_handle
- x = i // 21
- If x = 0 then
- Do
- Parse value read_with_echo("More - Tap
- [Return] to continue or Tap Any Key to
- abort?->") with rc more .
- If rc \=0 then return rc
- If more \= '' then leave
- End
- End
- Iterate
- End
-
-
- If datatype(func,'N')=1 then
- Do
- If func > 0 & func <= dir_line.0 then
- Do
- Parse value directory(dir_name.func) with
- default_dir
- Parse value List_Files() with rc
- End
- End
- Iterate
- End
- Return 0
-
-
- /* This procedure changes the current directory. */
- Change_dir: Procedure expose (expose_list)
- Parse value directory() with default_dir
-
-
- Call Put_s crlf||"Current directory is " default_dir crlf,port
- Call Put_s crlf||"Current directory is " default_dir
- crlf,screen_handle
- Do Forever
- Parse value read_with_echo("Enter new directory name
- or Tap [Return] to abort?->") with rc newdir .
- If rc \=0 then return rc
- If newdir = '' then return 0
- Parse value directory(newdir) with tempdir
- If tempdir \= '' then
- Do
- Call Put_s 'Default directory changed to'
- newdir crlf,port
- Call Put_s 'Default directory changed to'
- newdir crlf,screen_handle
- default_dir = newdir
- upload_dir = newdir
- Call Set_Download_Path newdir,dde
- End
- Else do
- Call Clear
- Call Put_s crlf||'Directory' newdir 'not found
- ...' crlf,port
- Call Put_s crlf||'Directory' newdir 'not found
- ...' crlf,screen_handle
- Iterate
- End
- Return 0
- End
-
-
- /* This procedure sets the user's default file transfer protocol. */
- Set_protocol: Procedure expose (expose_list)
- protocol_sel = "[X]modem [C]rc-Xmodem-1K
- [B]atch-Ymodem [Y]modem-G [Z]modem [N]one"
- Parse arg call_type
- If call_type = '' then
- Do
- Call Put_s crlf||"Current file transfer protocol is" protocol crlf,port
- Call Put_s crlf||"Current file transfer protocol
- is" protocol crlf,screen_handle
- End
- Else Do
- Call Put_s crlf crlf,port
- Call Put_s crlf,screen_handle
- End
-
-
- cmdline = ''
- Do i = 1 to words(protocol_sel)
- Call Put_s word(protocol_sel,i) crlf ,port
- Call Put_s word(protocol_sel,i) crlf ,screen_handle
- cmdline = cmdline substr(word(protocol_sel,i),2,1)
- End
- cmdline = space(cmdline,1,',')
-
-
- Do Forever
- Parse value read_with_echo("Enter choice " cmdline
- "or Tap [Return] to abort?->") with rc pick .
- If rc \=0 then return rc
- If pick = '' then return 0
- Select
- When pick = "X" then protocol = "XMODEM"
- When pick = "C" then protocol = "XMODEM-1K"
- When pick = "B" then protocol = "YMODEM"
- When pick = "Y" then protocol = "YMODEMG"
- When pick = "Z" then protocol = "ZMODEM"
- When pick = "N" then protocol = "NONE"
- Otherwise iterate
- End
- Leave
- End
- Return 0
-
-
- /* This procedure allows a user to change their password. */
- Set_password: Procedure expose (expose_list)
- Parse value read_with_echo("Enter new password or Tap
- [Return] to abort?->") with rc tword .
- If rc \=0 then return rc
- If tword = '' then return 0
- pword = tword
- Call Update_password_file(pass_file temp_file)
- Call Put_s crlf||'Password changed ...' crlf crlf,port
- Call Put_s crlf||'Password changed ...' crlf
- crlf,screen_handle
- Return 0
-
-
- /* This procedure allows the remote user to shell to the OS\2 prompt. To
- return to the Host Mode the user needs to type in exit. */
- Shell_OS2: Procedure expose (expose_list)
- Call OS2_Shell port,port
- Return 0
-
-
- /* This procedure allows a user to list their current information and to
- change their password and their transfer protocol. */
- User_Information: Procedure expose (expose_list)
- Call Put_s 'Information - Self User Alterations' crlf crlf,port
- Call Put_s 'Information - Self User Alterations' crlf
- crlf,screen_handle
- Call Put_s "- First name ... :" fname crlf,port
- Call Put_s "- First name ... :" fname
- crlf,screen_handle
- Call Put_s "- Last name .... :" lname crlf,port
- Call Put_s "- Last name .... :" lname
- crlf,screen_handle
- Call Put_s "- Password ..... :" pword crlf,port
- Call Put_s "- Password ..... :" pword
- crlf,screen_handle
- Call Put_s "- Trans Protocol :" protocol crlf,port
- Call Put_s "- Trans Protocol :" protocol
- crlf,screen_handle
- Call Put_s "- Privilage .... :" priv crlf,port
- Call Put_s "- Privilage .... :" priv
- crlf,screen_handle
- Call Put_s "- Directory .... :" default_dir crlf
- crlf,port
- Call Put_s "- Directory .... :" default_dir crlf
- crlf,screen_handle
- Call Put_s "- Last call was on" last_login crlf,port
- Call Put_s "- Last call was on" last_login
- crlf,screen_handle
- Call Put_s "- Total number of calls todate is"
- total_logins crlf crlf,port
- Call Put_s "- Total number of calls todate is"
- total_logins crlf crlf,screen_handle
- Call Put_s "- Current date is" date() ", current time
- is" time('C') crlf,port
- Call Put_s "- Current date is" date() ", current time
- is" time('C') crlf,screen_handle
- Call Put_s "- Elapsed time this call is" time("E")%60
- "minute(s)" crlf,port
- Call Put_s "- Elapsed time this call is" time("E")%60
- "minute(s)" crlf,screen_handle
-
-
- Parse value read_with_echo("User Alterations -
- [P]assword, [T]rans, [Return] to quit?->") with rc
- attr
- If rc \=0 then return rc
- Select
- When attr = 'T' then Parse value
- Set_protocol('NONE') with rc
- When attr = 'P' then Parse value Set_password()
- with rc
- Otherwise return 0
- End
- Return rc
-
-
- /* This procedure checks to see if a file exists. */
- State_file: Procedure
- Parse arg file_name
- If file_name = '' then return file_name
- return(stream(file_name,'c','query exists'))
-
-
- /* This procedure logs the current user off. */
- Good_Bye: Procedure expose (expose_list)
- If fname = '' | lname = '' then return 99
- Call Put_s crlf||time("E")%60 "minute(s) logged this time." crlf,port
- Call Put_s crlf||time("E")%60 "minute(s) logged
- this time." crlf,screen_handle
- Call Put_s "Tap [Enter] to LogOff now." crlf,port
- Call Put_s "Tap [Enter] to LogOff now."
- crlf,screen_handle
- Call Put_s "Tap [Esc] to abort LogOff." crlf crlf,port
- Call Put_s "Tap [Esc] to abort LogOff." crlf
- crlf,screen_handle
- Call Clear_Buffer
- Call Read_timeout "1000",port
- Do i=9 by -1 until i = 0
- Call Put_s "Hanging up in :" i "seconds" cr,port
- Call Put_s "Hanging up in :" i "seconds"
- cr,screen_handle
- Parse value Get_CH(port) with char_in
- If char_in = "-1" then iterate
- If char_in = esc then return 0
- Leave
- End
- Call Put_s crlf||"Loggoff for" fname lname "complete"
- crlf,port
- Call Put_s crlf||"Loggoff for" fname lname "complete"
- crlf ,screen_handle
- Call Audit(date() time('C') "- Logoff by" fname lname)
- Call Update_Password_file(pass_file temp_file)
- Return 99
-
-
- /* Terminates Host Mode and hangs up the phone. */
- Kill_host_mode:
- Parse value directory(orgdir) with rc
- Call Put_s crlf||"Directory reset to" orgdir crlf,screen_handle
- Call Put_s "PMComm Host Mode Terminating ..."
- crlf,port
- Call Put_s "PMComm Host Mode Terminating ..."
- crlf,screen_handle
- If connection = 'MODEM' then
- Do
- Call Clear_buffer
- Call Drop_DTR port
- Call Sleep "2000"
- Call Raise_DTR port
- Call Put_s 'ATZ'||cr,port
- Call wait_for "OK",port
- Call Sleep "2000"
- End
- Exit
-
-
- ΓòÉΓòÉΓòÉ 13. How To... ΓòÉΓòÉΓòÉ
-
- This section gives you examples of how to set Pmcomm up to do different things.
-
-
- ΓòÉΓòÉΓòÉ 13.1. How to Use Pmcomm with a modem pool. ΓòÉΓòÉΓòÉ
-
- Because Pmcomm does not use ACDI, and will allow you to enter any valid 12
- character name for a device, it will work with a shared serial port modem pool.
- This allows you to have modems on a server that users can access from their
- workstations. This can save a considerable about of money.
-
- The following is a flash from IBMLink on how to setup a modem pool using Pmcomm
- and Lan Server.
-
- The rest of this scenario concerns the OS/2 LAN Server definitions. When LAN
- Server definitions and actions are complete, defined users at any OS/2
- Requestor can run the program from the OS/2 Public Applications Window. The
- serial port and modem at the LAN Server will be shared. To begin, logon as an
- administrator in the proper domain. Then follow instructions for the following:
-
-
- a. Defining the shared modem
-
- b. Defining the shared program files
-
- c. Defining the program as a public OS/2 application
-
- d. Defining the working directory
-
- e. Sharing the modem and the program
-
- f. Assigning the modem and the program to the users as they log on.
-
- DEFINING THE SHARED MODEM
-
- Follow this sequence:
- DEFINITION
- ALIASES
- SERIAL DEVICES
- --NEW-- (With cursor on --NEW--, press space bar to
- choose, press enter or click on ACTION)
- CREATE(Create a serial device alias - I used an
- alias of MODEM1, chose COM1 from the device
- pool using F4 for the list, and choose to
- share the port at server startup)
-
-
- *---------------------------------------------------------------------*
-
- Create Alias - Serial Device
-
- Complete the panel; then Enter.
-
- Alias . . . . . . . . . . . . . . . MODEM1
- Description . . . . . . . . . . . . Shared modem
- Server Name . . . . . . . . . . . . Chosen with the F4 key
- Server Device Pool. . . . . . . . . COM1
- Priority. . . . . . . . . . . . . . 5 (chosen arbitrarily)
- Maximum number of users . . . . . . (left blank)
- When shared . . . . . . . . . > At server startup
-
- |---------------------------------------------------------------------|
-
- ENTER Escape=Cancel F1=Help F4=List
-
- *---------------------------------------------------------------------*
-
- DEFINING THE SHARED PROGRAM FILES
-
- Follow this sequence:
- DEFINITION
- ALIASES
- FILES
- --NEW-- (With cursor on --NEW--, press space bar to
- choose, press enter or click on ACTION)
- CREATE (Create the file alias)
-
- *---------------------------------------------------------------------*
-
- Create Alias - Files
-
- Complete the panel; then Enter.
-
- Alias . . . . . . . . . . . . . . . PMCOMM
- Description . . . . . . . . . . . . Program to access shared modem
- Server Name . . . . . . . . . . . . Chosen with the F4 key
- Server Path to Directory. . . . . . :OS2:ASYNC:PMCOMM
-
- Maximum number of users . . . . . . (left blank)
- When shared . . . . . . . . . > At server startup
-
- |---------------------------------------------------------------------|
-
- ENTER Escape=Cancel F1=Help F4=List
-
- *---------------------------------------------------------------------*
-
- DEFINING THE PROGRAM AS A PUBLIC OS/2 APPLICATION
-
- Follow this sequence:
- DEFINITION
- APPLICATION
- PUBLIC OS/2 APPLICATION
- --NEW-- (With cursor on --NEW--, press space bar to
- choose, press enter or click on ACTION)
- CREATE
-
- *---------------------------------------------------------------------*
-
- Create OS/2 Application Details
-
- Complete the panel; then Enter.
-
- Application ID. . . . . . . . . . . PMCOMMX
- Description . . . . . . . . . . . . Shared modem communications
- Program location. . . . . . . . . . Remote
- Drive or alias. . . . . . . . . . . PMCOMM
- Remaining path to program . . . . . :
- Command line. . . . . . . . . . . . PMCOMM.EXE
- Prompt used for parameters? . . . . NO
- Program type. . . . . . . . . . . . OS/2 PM
-
- |---------------------------------------------------------------------|
-
- ENTER Escape=Cancel F1=Help F4=List
-
- *---------------------------------------------------------------------*
-
- DEFINING THE WORKING DIRECTORY
-
- PMCOMM has support files that should reside in the working directory at
- the server. If this directory is not assigned, each user must have these
- files on their own disk.
-
- Follow this sequence:
- DEFINITION
- APPLICATION
- PUBLIC OS/2 APPLICATION
- --PMCOMMX-- (With cursor on --PMCOMMX--, press space
- bar to choose, press enter or click on
- ACTION)
- WORKING DIRECTORY
-
- *---------------------------------------------------------------------*
-
- Working Directory
-
- Complete the panel; then Enter.
-
- Working Directory . . . . . . . . . REMOTE
- Drive or alias. . . . . . . . . . . PMCOMM
- Remaining path to program . . . . . :
- Assigned Drive. . . . . . . . . . . P (chosen arbitrarily)
-
- |---------------------------------------------------------------------|
-
- ENTER Escape=Cancel F1=Help F4=List
-
- *---------------------------------------------------------------------*
-
- SHARING THE PROGRAM AND THE MODEM
-
- Follow this sequence:
- ACTION
- RESOURCE SHARING
- --PMCOMM-- (With cursor on --PMCOMM--, press spacebar
- to choose, press enter or click on ACTION)
- START SHARING
- --MODEM1-- (With cursor on --MODEM1--, press spacebar
- to choose, press enter or click on ACTION)
- START SHARING
-
- ASSIGNING RESOURCES TO USERS AS THEY LOG ON
-
- Follow this sequence for each user, to assign MODEM1 as a user
- logs on:
- DEFINITION
- USERS
- -- User -- (With cursor on the user name, press F10)
- LOGON
- SERIAL DEVICE ASSIGNMENTS
- Assign MODEM1 to a COM port
-
- Follow this sequence for each user, to copy the program to the user's
- START PROGRAMS window:
- DEFINITION
- USERS
- -- User -- (With cursor on the user name, press spacebar
- to choose, press enter or click on ACTION)
- PROGRAM STARTER
- --PMCOMMX-- (With cursor on --PMCOMMX-- press the
- spacebar to choose)
-
- There maybe some problems when using Ymodem-g when Pmcomm is used with a modem
- pool. The reason for this is that hardware flow control is not available
- across a LAN, and XON/XOFF won't work with Ymodem-g. The Pmcomm Host mode will
- work, but it will not be able to tell if someone dropped carrier. If the user
- hangs up normally then the host mode will work with very few changes.
-
-
- ΓòÉΓòÉΓòÉ 13.2. How to Use Pmcomm with IBMLink. ΓòÉΓòÉΓòÉ
-
- If you have access to IBMLink (ask an IBM SE) you can use Pmcomm to call. The
- first thing you will need is a phone number that will work with Pmcomm. This
- type of number is call, an SS/EFS number. This stands for, Start Stop Enhanced
- Full Screen. It allows access to IBMLink through a 3708 protocol converter. To
- find a number in your area, ask your IBM SE, or order book number GC-34-22-34.
- It has a current list of all the public IBMLink phone numbers in it.
-
- Once you have the required phone number, you can add it to the Pmcomm dialing
- directory. You should set the Parity to Even,the Data bits to 7, and the Stop
- bits to 1. The terminal type should be set to VT100. Once connected you will
- see a prompt that asks you for your terminal type. If you press enter now it
- will display a list of available terminals. The best choice here is to select
- VT220, which is selection 18. Pmcomm supports most of the VT220 commands when
- in VT100 mode, and it supports all that are used with IBMLink. By selecting
- VT220 you are able to use additional commands that are not available with
- VT100. If you select VT220 the first nine PF keys will be the numeric key pad
- keys (the num lock must be off). For example PF1 will be the 1 on the key
- pad,PF2 will be 2 and so on. For PF10 it will be the F1 key,PF11 will be the F2
- key and PF12 will be the F3 key. To do a reset, press the Ctrl-R, and to do a
- clear press the Ctrl-C.
-
- Once logged onto IBMLink just follow the prompts and you shouldn't have any
- problem.
-
-
- ΓòÉΓòÉΓòÉ 13.3. How to Use a REXX program as a script. ΓòÉΓòÉΓòÉ
-
- A REXX program can only be executed from Pmcomm using the shell command from an
- internal script. This script can then either be invoked from the menu or by
- entering it, into the dialing_directory .
-
-
- ΓòÉΓòÉΓòÉ 14. Troubleshooting. ΓòÉΓòÉΓòÉ
-
- Following are some problems that may occur when using Pmcomm.
-
-
- ΓòÉΓòÉΓòÉ 14.1. Device Open error. ΓòÉΓòÉΓòÉ
-
- This message is displayed if Pmcomm can not open the specified device. If you
- are trying to open COM1, for example, and another program already has it open
- then this message will be displayed. If you are using the com ports on the
- machine you are running Pmcomm on (not across a LAN). Then you must have the
- com port device driver installed. There are two device drivers supplied with
- OS/2, com02.sys (for IBM PS/2's), and com01.sys for AT class machines. If you
- are running a PS/2, for example, you should have a statement in your config.sys
- file, DEVICE=C:\OS2\COM02.SYS. If not you will get the device open error. The
- default when installing OS/2 is not to install the device driver, so make sure
- that you either have, DEVICE=C:OS2\COM02.SYS or DEVICE=C:\OS2\COM01.SYS in your
- config.sys file.
-
- If you get this message when trying to access a com port on a server, refer to
- the Modem_Pool section. One of the common problems is not first logging onto
- the network before trying to access the com port. Also make sure you use Alias
- names that don't conflict with names on the local machine. For example don't
- try to use the name COM1 for the name of the remote com port. Instead use a
- name like MODEM1, or PMCOMM1.
-
-
- ΓòÉΓòÉΓòÉ 14.2. File transfers not available. ΓòÉΓòÉΓòÉ
-
- If you have Monitor_DCD turned on under Port Options and Pmcomm does not detect
- DCD then the upload and download options will be greyed out. You can turn the
- Monitor DCD option off and you will then be able to transfer files. Some common
- reasons for Pmcomm not being able to detect are:
-
- Serial cable that does not support the DCD line.
- Modem not configured to have DCD follow the state of the phone line.
- Modem does not support DCD.
-
- The monitor DCD option should also be turned off if using Pmcomm with a modem
- pool.
-
-
- ΓòÉΓòÉΓòÉ 14.3. Pmcomm will not dial out. ΓòÉΓòÉΓòÉ
-
- The most common cause of this is a DOS program that has corrupted the com port.
- Compiled basic program that are executed in the DOS box, for example will
- sometime poll the available devices. When this happens the com device driver is
- effected and Pmcomm will not be able to send information to the com port. When
- this happens you will have to IPL (boot) the computer.
-
-
- ΓòÉΓòÉΓòÉ 14.4. Help not available. ΓòÉΓòÉΓòÉ
-
- This message will be displayed if Pmcomm can not find the pmcomm.hlp file in
- the current directory. If you have Pmcomm installed in a Group menu make sure
- that you have the working directory set to the directory that Pmcomm is
- installed in.