Lignum PMCMD v1.0

User Manual

June 1994

Lignum Oy/Ltd

Contents

1 Introduction 2 1.1 What is Lignum PMCMD? . . . . . . . . . . . . . . . . . . . . 2 1.2 What is Lignum PMCMD for? . . . . . . . . . . . . . . . . . . 2

2 Using Lignum PMCMD 3 2.1 Installing and starting PMCMD . . . . . . . . . . . . . . . . . 3 2.2 Parameters to LIGPMCMD.EXE . . . . . . . . . . . . . . . . 4 2.3 The control window . . . . . . . . . . . . . . . . . . . . . . . . 5 2.4 Session windows . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.4.1 File menu . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4.2 Edit menu . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4.3 Command menu . . . . . . . . . . . . . . . . . . . . . 7 2.4.4 Focus menu . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4.5 Pop-up menu . . . . . . . . . . . . . . . . . . . . . . . 8

2.5 The editor window . . . . . . . . . . . . . . . . . . . . . . . . 9

3 How does PMCMD work? 9

4 What will not work with PMCMD? 9 4.1 What will work? . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.2 What will not work? . . . . . . . . . . . . . . . . . . . . . . . 10

5 Problems and other nice things to know 10 5.1 Surviving VIO requiring programs . . . . . . . . . . . . . . . . 11 5.2 Killing a hanging program . . . . . . . . . . . . . . . . . . . . 11 5.3 Other problems and hints . . . . . . . . . . . . . . . . . . . . 11

6 Liability and other legal stuff 13

7 How to get a license? 13 7.1 Ordering information . . . . . . . . . . . . . . . . . . . . . . . 13 7.2 Remember to take a backup . . . . . . . . . . . . . . . . . . . 17 7.3 Upgrades and so on . . . . . . . . . . . . . . . . . . . . . . . . 17

8 Platforms and hardware requirements 17

1 Introduction

This is the user manual for Lignum PMCMD — a PM-aware interface to OS/2 2.x command shells. At first we will have a brief look at the overall nature of Lignum PMCMD.

1.1 What is Lignum PMCMD?

Lignum PMCMD is a PM-aware interface to command shells. It is not itself a command shell, actually. Lignum PMCMD, hereafter PMCMD, can be best described as an asyncronous “front-end” to command shells. By this we mean that the input and output (and errors) of command shells are directed through PMCMD instead the normal “command window”.

One important thing to notice is that Lignum PMCMD is not a free software, in order to use Lignum PMCMD v1.0 after the initial three weeks trial time you have to pay for it. PMCMD will work one additional week after the testing time in order to compensate for possible delays in the handling of the purchase. This is mainly because Lignum PMCMD has been written by using company owned machines and on company’s time. The instructions how to purchase Lignum PMCMD v1.0 are given in this manual and in the file ORDER.FRM which are distributed with the program.

1.2 What is Lignum PMCMD for?

A short definition for Lignum PMCMD is that it is an asyncronous PM interface to OS/2 2.x command shells (CMD.EXE). The main use of PMCMD is to get rid of the frustrating CMD.EXE windows normally associated with command line processing in OS/2 2.x.

PMCMD offers, amongst other features, good ways to use mouse to copy and cut and paste and to manipulate files and execute commands — and it allows most of those things to be done by using pop-up menus which can be got by clicking the right button of the mouse (this is assuming that your mouse is set as a right handed one). The reason why PMCMD has been written is that the lack of the features provided by PMCMD was a great source of despair and frustration when we used the “OS/2 Window” to do our command-line oriented work.

In other words, Lignum PMCMD is to help us command-line users to get out as much as possible from our OS/2 2.x machines by providing several ways to make things easier.

2 Using Lignum PMCMD

In this section we will briefly outline how PMCMD is used.

2.1 Installing and starting PMCMD

In order to get PMCMD working right you have to have the following files in your package:

• ADDICON.CMD — a program to add icons to other programs.

• EXERC2.CMD — a necessary .CMD-file.

• EXERC3.CMD — a necessary .CMD-file.

• INSTPMCM.CMD — the installation program.

• LIGPMCMD.EXE — the actual program.

• LIGPMCMD.DLL — a necessary library.

• LIGPMCMD.ICO — the icon for the program.

• LIGNUMDL.DLL — a necessary library.

• LIGNUMEX.EXE — a necessary executable.

• VPMBAS20.DLL — a necessary library.

• VPMRES.DLL — a necessary library.

• VPMVM20.DLL — a necessary library.

• MANUAL.PS — the manual in PostScript form.

• MANUAL.PCL — the manual in PCL form.

• MANUAL.DVI — the manual in .DVI form.

• MANUAL.INF — the manual in .INF form.

• README.1ST — important information.

• ORDER.FRM — the order form.

• LD.CMD — an example .CMD file.

The installation of the program is done by unpacking all the files to the target directory and typing INSTPMCM. The installation program creates an object to the desktop and the program can be started by simply doubleclicking that object.

2.2 Parameters to LIGPMCMD.EXE

The actual command-line interface program requires at least one parameter and accepts a few other command line parameters. Only one parameter is obligatory. With the other parameters it is possible to tune the behavior of LIGPMCMD.EXE according to your taste and your machine. Note that the best way to give those parameters to PMCMD is to use the parameters-field of the Lignum PMCMD v1.0 -object created to the desktop.

The possible parameters are

• -D<drive:directory>

• -W<milliseconds>

• -B<characters>

• -E<editor name>

• -N

• -C<color number>

• -F<font number>

of which only -D must be given.

The parameter -D is used to define the PMCMD home directory. It will be set by the installation program and it can be

     -Dc:\ligpmcmd

and note that there is no space between the drive letter and the parameter speficier.

Parameters -W and -B are used to tune PMCMD according to your system. The value for the parameter -W is used to set the obligatory idletime during which PMCMD allows other programs to take over. A smaller value may help if you have a slow machine. The value for the parameter -B defines the size of the character block read from the command shell and is a number. These parameters are optional.

If you do want to change the default editor used by PMCMD, then you can do it by using the parameter -E. If you want to use Emacs as your default editor, then use the parameter -Eemacsclient.exe. This parameter is optional.

It is possible to tune the characters and colors according to your personal taste. The parameter -C sets the color, and the default color is number -47 (as a command line setting -C-47). The colors resulting from other values may vary depending on your driver. The parameter -F sets the default font. The default font is number 16, but you can change the font by name and then find out the corresponding number. These parameters are optional. Note that the font changing dialog provided by the system does not have program wide effects and does not show if you chose the “show options” from the control window.

Although PMCMD is principally designed to be used as an interface to CMD.EXE, it is possible to use PMCMD as an interface to other command shells. The default behavior of PMCMD is to try to remove echoed lines, and this function may not be required if you use alternative shells. By giving the parameter -N you can tell PMCMD not to try to remove echoed characters. Note that alternative shells must be started from CMD.EXE. This parameter is optional.

2.3 The control window

The first window to open after you have double-clicked the Lignum PM-CMD v1.0 object is the control window. That window is titled as “Lignum PMCMD v1.0”. The window provides three push buttons: New, Manage, and Quit. By pressing New you can create a new session which acts as the actual interface to CMD.EXE. Manage lets you to do several management functions to open sessions, and Quit closes PMCMD. There are keyboard shortcuts to the same functions.

Manage allows you to clear the buffer of a session (or all sessions), change focus to a session, or close a session (or all sessions). By pressing the Manage button you will get a specific list-window from which you can choose the session to be manipulated. By pressing the right mouse-botton you can get a pop-up menu which allows you to choose a function. All the management functions are available from keyboard and pull-down menus also.

The pull-down manus provide a variety of functions, most of which can be easily find out by experimenting with their behavior.

Note that the starting of PMCMD takes a much longer time than starting a new session. Hence it is recommended that you open PMCMD only once, and do only close the unnecessary sessions.

2.4 Session windows

A session window is the actual interface. You can have at most four sessions open at once. Note that you cannot have more than one PMCMD running simultaneously.

A session window is actually an editor window which reads characters from a command shell and sends lines to that shell. Note that a session window sends complete lines, not single characters. The line is sent to the command processor after you press Enter or Ctrl-Enter.

There is no limit to the size of the text buffer. The buffer is cleared only when clearing is requested by the user.

2.4.1 File menu

The file menu allows you to open new sessions, open files for editing, save the contents of the command buffer and print the contents of the buffer.

2.4.2 Edit menu

The edit menu allows you to perform many editing tasks. Almost all those tasks can be performed by using keyboard short-cuts. Some of those tasks (and more) are present in the pup-up menu associated with the text buffer.

2.4.3 Command menu

The command menu implements the most interesting features. The available choices are:

• Do It lets you to paint text from the session window and execute it as a command.

• Detach process lets you to detach a process from the current directory. The program name and its parameters are prompted before starting the process.

• Start process lets you to start a process from the current directory. The program name and its parameters are prompted before starting the process.

• PM command practically equals START /C <your command line>. The PM command command is given instead of pressing Enter. This is especially useful if you want to start PM programs or programs which require the VIO-interface to be available.

• Repeat repeats the last typed command line and sends it to the command processor. It does not do PM command again if the last command was started by that.

• Expand filename lets you to expand the last typed word. This allows all legal (those understood by CMD.EXE) combinations of drive and directory specifications. Note that if the filename expands to a directory, then it will have \ as its last letter. If you want to cd to that directory, then you have to remove that \ before pressing Enter. If the filename cannot be expanded (matching names do not exist or it is not unambiguous), you will see a very short display of *-characters at the top of the window. Note that the filename must be separated by spaces from characters which do not belong to the filename.

• Break execution allows you to throw away the current command processor associated with the session and start a new one. Note that if your have started a program which requires VIO-interface, this may not help even if PMCMD is able to close the console window. The closing may take a quite long time because the PM message queue seems to hang. Answer yes to the questions about closing the console window. If focus does not return to the session sindow, then try pressing Enter a couple of times. In the case of stuck programs and Break execution not helping, you have to kill the command procesor by selecting the Console -window associated with the session and kill that window if it is possible.

• Clear all clears the text buffer of the current session.

There are obvious keyboard shortcuts to all other commands but Clear all.

2.4.4 Focus menu

The focus menu allows you to change focus from one session to another or to the control window. There are keyboard shortcuts for all possibilities.

2.4.5 Pop-up menu

The pop-up menu appears when you click the right button of your mouse (if your mouse settings are default). In the pop-up menu there are several alternatives:

• Open It allows you to open the file associated with the text you have painted by using mouse. This is especially nice if you want to read a specific file after issuing the dir-command. Note that the file is supposed to be in the current directory.

• Copy, Cut, and Paste are the normal editing functions.

• Copy+Append is a shortcut for painting some text, copying it, moving the cursor to the end of the buffer and pasting the text. This is very convenient when giving paramers to various commands.

• Do It, Start It, and Detach It enable you to perform those tasks for the text you have painted.

• Again lets you to perform a search again.

• Edit includes an editing submenu.

We recommand that you try how the pop-up menu works in order to find the best ways to use it.

2.5 The editor window

The default editor is a very simple one. It allows only the basic operations to be performed. In order to use a better editor use the -E parameter to specify the editor.

The default editor is, however, very fast to start because it is a part of PMCMD. Hence it can be sometimes much more convenient than bigger editors which are slower to start.

3 How does PMCMD work?

PMCMD is not a command shell, it is an interface to CMD.EXE. In practice PMCMD consists of a single window, the control window, after the startup. When you want to open a session, PMCMD opens an editor window (a session window) which works as the interface between PM and the command shell. The standard streams of the shell are directed through pipes to PMCMD which displays output and errors and allows you to send input to the shell.

In order to make the memory resources of PMCMD as small as possible you should close all sessions and have only the control window open. Note that starting PMCMD is so slow that you should not close PMCMD if it is not necessary.

Many PMCMD commands detect the current directory by finding a directory specification from the output read from the shell. This means that PMCMD will not work if you do not use the default OS/2 2.x prompt for CMD.EXE or alternative shells you are using. This is a consequence of the fact that there is not direct connection between PMCMD and the command shells — all communication is passed through pipes.

4 What will not work with PMCMD?

Due to the nature of PMCMD, there are several things to be considered when determining the suitability of PMCMD for a specific task.

4.1 What will work?

Principally every program which does write and read to/from standard streams will work. This includes most of the command line programs, both commercial and free.

All software writers out there, please make sure that your programs have an option to make it to work with standard streams only.

4.2 What will not work?

There are programs which do not work with PMCMD, mostly because they suppose direct VIO input/output. Those programs include:

• IBM’s TCP/IP telnet and ftp do not work because they do not like redirecting at all. We think that this is not a good feature, those programs should work with redirecting.

• Procs.exe and some other free or shareware programs require VIO input. Some of them, like procs.exe, have an option to set that requirement off.

• More and similar paging commands do not work. There is no need to use those, though. You can just type the file or open it.

• In addition to the VIO-interface related things, remember that the prompt of the command shell you use must be the OS/2 2.x default prompt. In other case several PMCMD commands or features will not work.

• PMCMD does not currently work with the latest OS/2 beta, the socalled “Performance Beta”.

There are some other non-working programs too, but most of the problems are due to the requirement of the VIO-interface.

5 Problems and other nice things to know

Here are some practical hints how to survive some of the most common problems.

5.1 Surviving VIO requiring programs

If you happen to start a program which requires VIO-interface, then you can give input to that program or end the program by choosing a “PMCMD Console - X” window from the window list and performing the necessary steps in that window. The “X” is the number of the session from which you have started the program.

5.2 Killing a hanging program

A program which hangs can be killed by giving the command Break execution. It should help because it tries to close the console window associated with the session. If it does not help, then try killing the console window by hand. Look at the explanation of Break execution command.

5.3 Other problems and hints

Here is a list of some other problems and useful hints.

• If PMCMD cannot expand the filename, make sure that your prompt is the OS/2 2.x default prompt. Note that the character in paths must be \.

• If PMCMD complains about a runtime error, you should try to use PMCMD as nothing had happened and close and restart PMCMD if the error appears again or PMCMD does not work.

• If PMCMD does not work, make sure that you have a license or that there has been less than 21 days after the installation.

• The errors do not always appear in their right place. This is because PMCMD may get confused about the actual order in which it should show output and errors.

• Programs like yaos which do require specific characters to be given in order to enable it to expand a filename or something will not work. This is because PMCMD sends output only after you have pressed Enter. In other words, PMCMD sends complete lines. This is not, however, a problem in most cases.

• DIR may not work right in every case. We do not know the reason for this problem, but we have included a command file named LD.CMD which you can use instead of the normal DIR command.

• The default PMCMD editor starts so fast that it might be a good idea to have it as the dafault and start bigger editors only when their functionality is required.

• There are some commands which cause additional echo of the input line. This may not look very good, but it does not make anything to work wrong. We have not yet been able to fix this problem.

• Sometimes the Sessions list window which pops up when you press the manage button from the control window uses wrong fonts. Most of the fonts work OK, but some do not. We do not yet know why.

• Use the font selection facility provided by the options menu of the control window. There are some problems with the other method.

• If a new session seems not to start normally, it may be caused by a hanging program. You can survive that by closing the possibly hanging console window and then reopening that session window.

• The OS/2 command line command CLS does not work. Use the clear command from the pull-down manu instead.

• Filename completion does not know how to handle some special characters and spaces inside the filename. That produces a runtime error, but you should not care about that error, correct the filename and choose filename completion again and you should be able to proceed as nothing had happened.

There may be other problems also, but we think that the above ones are the most common and should enable you to find possible workarounds for other ones.

If you find other problems and want to let us to know about it or your wishes, please send us email or surface mail. But please note that if you have not purchased a license, we will not answer. Note that if you use surface mail you have to include an envelope and an international postal coupon (or something) in order to get an answer.

6 Liability and other legal stuff

Using Lignum PMCMD v1.0 is your own choice, and Lignum Oy does not take any responsibility about anything. If you decide that you can use PM-CMD to improve your productivity, Lignum Oy is pleased to sell you a license but you must understand that PMCMD is provided as is and everything is on your own responsibility.

Note that testing PMCMD and/or purchasing a license means that you agree to the above terms.

7 How to get a license?

You can get a license only by paying 20 USD to Lignum Oy.

7.1 Ordering information

You can purchase a license by using one of the following alternatives. Those possibilities are:

1. Buy a license by using the CompuServe shareware registrations service. Note that when this manual has been written (June 1994) we did not yet know if CompuServe will accept PMCMD for that service. Look for the name Lignum PMCMD at CompuServe. But note that you have to send an email message with the filled order form even if you have paid for the license by using the CompuServe service. Just write “Paid through CompuServe” to the comments field. If CompuServe agrees to include PMCMD for their service, then you can, also, ask you friend to pay and ask him to send the email message with your name as the owner of the license.

2. Send us cash.

3. Send us a cheque which we can cash in a Finnish bank.

4. Pay directly to our Finnish bank account. If you can do this, please send us email/mail and ask our bank account number.

We would prefer the CIS alternative or you paying directly to our account, but paying directly to our bank account may not be easy for people living outside Finland. No credit cards yet, unfortunately.

Filling out your name, address, and phone number (and your fax number if you have one) is a requirement. The installation identification number is required in order to enable you to get the license number in order to allow your copy of PMCMD to work after the testing perior.

Send the license purchase form to us by

• Paying the license through CompuServe and sending email to 100343,1736 at CompuServe. Note that you are required to send the registration form even if you purchase the license by using CompuServe shareware registration service — this is to enable us to send you the required license number.

• Sending a filled copy of the registration form with the money or the cheque (remember to check that we can cash your cheque if you send one - we will not send you a license or even answer to you if we cannot cash the cheque) to the address:

Lignum Oy

Sepänkatu 43 A 4 80100 Joensuu Finland

Lignum PMCMD v1.0 order form

Name    ______________________________________________
Address ______________________________________________
        ______________________________________________
        ______________________________________________
        ______________________________________________
Phone # ______________________________________________
Fax   # ______________________________________________
Installation identification number:
        ______________________________________________
Your license number (will be filled by us):
        ______________________________________________
Comments:
        ______________________________________________
        ______________________________________________
Signature:
        ______________________________________________

The cost of the license number is 20 USD, which includes handling. We accept US currency, Finnish currency (note that if you pay from Finland, then you should add 22% VAT to the price of the license, and remember to use the official exchange rate between USD and FIM if you are paying in Finnish currency), and checks which we can cash in a Finnish bank (or any other form of similar things we can cash in Finnish banks).

7.2 Remember to take a backup

Note that the license number is installation specific. In other words, you have to buy another license if you format your OS/2 hard disk, reinstall OS/2 and reinstall Lignum PMCMD. Hence you should take a backup of your OS/2 home drive.

7.3 Upgrades and so on

If you have bought a license, then your license will be OK for bug fixes and small upgrades. Because the license is so cheap, only 20 USD including handling, we feel that you should buy a new license for bigger upgrades.

After purchasing a license you can get help from us by using email. We will answer to at least a few messages. But if you send surface mail, then you should include an international reply coupon or something like that with you message.

8 Platforms and hardware requirements

This program exists only under OS/2 2.x operating system. Because PM-CMD heavily utilizes multiprocessing and OS/2 2.x specific features, it would not be an easy task to port PMCMD to any other system.

If you have networking installed on your machines (especially TCP/IP), it is recommended that you should have more than 8 MB of RAM in order to run PMCMD and other programs easily. We do not know how the “Personal OS/2” will affect the memory requirements because there seems to some problems when trying to run PMCMD under the so-called “Performance Beta”.

Note that if your machine is a slow one (a 16MHz 386SX, for example) you should not try to open and close sessions vary fast because PMCMD may get confused and be unable to connect to command shells properly.