PxPlus Installation and Configuration

Launching PxPlus

 

Formats

1.

Windows 32-Bit:  path \pxplus\pxplus.exe [ winprms ][ ini ][ overrides ][ prog ][ pvxprms ][ -ARG list ]

2.

UNIX:  path /pxplus/pxplus [ overrides ][ prog ][ pvxparms ][ -ARG list ]

Where:

path \pxplus\pxplus.exe
path /pxplus/pxplus

Specific Windows or UNIX/Linux command to start PxPlus in Command mode.
Use the full path name; e.g. in Windows: C:\MY_DIRECTORY\pxplus\pxplus.exe. The path and file name of the PxPlus executable may be retrieved during execution using ARG(0).

-ARG list

The dash and keyword (-ARG) mark the start of a list of optional arguments you can pass to the program on start-up. The list of arguments (arg1 arg2 ...) is space separated. If an argument contains spaces, enclose it in quotation marks.

For more information on arguments, see NAR system variable and ARG( ) function.

-cpl

When the Command line contains the -cpl tag, the *compiler program will look for the source file provided, convert it to a program file and output any errors on *stderr* or an error file specified on the Command line.

The syntax of the -cpl option is:

  pxplus -cpl [ sourcetext ] programfile [ -pswd password ] [ -err errfile ]

Where:

sourcetext

Optional pathname of the source program. If omitted, the *compiler program is to read the source file from *stdio* (stdin). If provided, this file must exist.

programfile

Output program file to receive the compiled code. This file will be created if it does not exist.

password

Password to apply to programfile.

errfile

File to receive the listing of any errors that are found in the source file. If the -err parameter is not supplied, errors (if any) will be sent to *stderr*.

See Command Line Compiler/Lister.

Note:
When using the -tag (-err|-pswd) optional parameters, the -tag is required. [ ] indicates optional parameters.

ini

Name of an INI file to use (for Windows and UNIX/Linux as of PxPlus v10). Optional. String expression.

You can have different start_up commands with different INI files so that each application can be set up with its own defaults for fonts, window size, etc.

Default: 

  windows dir path \pxplus.ini

Example:

  C:\pxplus\pxplus.exe this.ini that_program

To return the current value, use ARG(-1). PxPlus accepts quotes enclosing your INI file name and spaces within the INI file name in the command line argument.

See INI Files (Windows).

-lst

When the Command line contains -lst, the *compiler program is expected to take a program file and list it to either an ASCII text file or stdout.

The syntax of the -lst option is:

  pxplus -lst programfile [ sourcetext ] [ -pswd password ] [ -err errfile ]

Where:

programfile

Input program file that is to be converted to list format. This file must exist.

sourcetext

Optional pathname of the file to receive the ASCII list of the program. If omitted, the program will be listed to *stdio* (stdout). If provided, this file will be created if it does not already exist.

password

Password to apply to programfile.

errfile

Optional file to receive the listing of any errors that are found in the source file. If the -err parameter is not supplied, errors (if any) will not be presented.

See Command Line Compiler/Lister.

Note:
When using the -tag (-err|-pswd) optional parameters, the -tag is required. [ ] indicates optional parameters.

overrides

Optional arguments that override start_up. Valid overrides are:

-L: path

Path to PxPlus library location.

-K: path

Path to keys directory (i.e. location of ACTIVATE.PVX).

-C: path

Path to location of the INI to use for this session of PxPlus. The original ini syntax (above) is preserved, but the addition of this argument adds consistency with the activation program.

-ID= FID val

FID( 0) value that the session is to start with.

-DR= path

Path to directory PxPlus will use as its HWD (Home Working Directory).

-A: path

Path to the directory containing the ACTIVATE.PVX file, regardless of where the PxPlus Library is to the following programs: pxplus.exe, pxpreg.exe and pxpwactv.exe.(added in PxPlus 2016)

Note:
All programs - pxplus.exe, pxpreg.exe and pxpwactv.exe - also utilize the environment setting for PVXKEY to define the location of the activation file. (as of PxPlus 2016)

prog

Optional name of a program to run at start-up (lead program).

Example:

  C:\pxplus\pxplus.exe -PC=10
  C:\my_program\to_run_first

pvxprms

Optional PxPlus system parameters to be set from the Command line. Most PxPlus system parameters are valid, including:

-SZ= integer

Maximum memory (e.g. -SZ=16000).

-XT=0 or 1

Exit direct to OS (e.g. -XT=1).

The dash is mandatory and indicates that the argument is a parameter. Do not use single quotes. However, it is better programming practice to set/reset parameters from within PxPlus applications via the SET_PARAM directive.

See System Parameters.

winprms

(For Windows Only)

Optional window parameters:

-HD

Force start with initial window hidden.

-MN

Force start with initial window minimized.

-MX

Force start with initial window maximized.

-RS

Force start with initial window restored.

 

Note:
The Command line options -MN, -MX, -HD and -RS will override all other initial start window considerations. Normally, if the PxPlus icon is set to be minimized or maximized, then PxPlus will honour that setting for the initial window.

If the icon is set to "Normal Window", then PxPlus will look at its saved window location from the INI file to determine the state in which to bring the window up.

Description

The formats above describe the various syntax elements you can include in your Command line to start PxPlus. It is strongly recommended that you always include the full (absolute) path name of the executable file in this command.

To Return Command-Line Values

As noted above, you can use the ARG( ) and FID( ) functions, as well as the HWD, NAR and LPG system variables, to retrieve the values in current use.

Example:

The following example illustrates the basic command in Windows:

C:\my_directory\pxplus\pxplus.exe      This command includes a lead program: C:\my_directory\pxplus\pxplus.exe my_program

Other syntax elements appear as follows:

C:\pxplus\pxplus.exe -mn program_1 -dr=h:\acct_pay
C:\pxplus\pxplus.exe myapp.ini my_program -id=t0 -dr=mary -xt=1
C:\my_directory\pvx\pxplus.exe myapp.ini windx
C:\my_directory\pvx\pxplus.exe myapp.ini *nthost

Command Line Compiler/Lister

The *compiler program will automatically be called whenever the Command line starting PxPlus contains -cpl or -lst. Internally, when either of these parameters is detected in the Command line, the system will run *compiler as the lead program and pass all Command line parameters starting with the -cpl or -lst to the program.

The purpose of this program is to then parse the Command line to extract the name of a program file and either compile a text file from source to create the program or list the program. Errors will display in the error output as filename:lineno:chofst: errmsg.

Examples:

[path]pxplus[.exe] -cpl pgm\pgrm.txt pgm\pgrm.pxp -err tmp\err.txt -pswd password

[path]pxplus[.exe] -cpl pgm\pgrm.txt pgm\pgrm.pxp -err tmp\err.txt

[path]pxplus[.exe] -cpl pgm\pgrm.txt pgm\pgrm.pxp 2>tmp\err.txt

[path]pxplus[.exe] -cpl pgm\pgrm.pxp -err tmp\err.txt 0<pgm\pgrm.txt

[path]pxplus[.exe] -cpl pgm\pgrm.pxp 2>tmp\err.txt 0<pgm\pgrm.txt

[path]pxplus[.exe] -lst pgm\pgrm.pxp pgm\pgrm.txt -err tmp\err.txt

[path]pxplus[.exe] -lst pgm\pgrm.pxp pgm\pgrm.txt

[path]pxplus[.exe] -lst pgm\pgrm.pxp -err tmp\err.txt 1>pgm\pgrm.txt

[path]pxplus[.exe] -lst pgm\pgrm.pxp 1>pgm\pgrm.txt

[path]pxplus[.exe] -lst pgm\pgrm.pxp -pswd password 1>pgm\pgrm.txt

[path]pxplus[.exe] -lst pgm\pgrm.pxp -err tmp\err.txt -pswd password 1>pgm\pgrm.txt