PLBCMP Command Line Syntax
The PLBCMP compiler (PLBCMP.PLC) not only generates transportable code but is, itself, a PL/B program. As such, it requires PLB, PLBCON, or PLBWIN in order to execute. In an effort to facilitate easier use of the compiler, a batch file named PLBCMP has been provided for PLBCON. The following demonstrates the command line for invoking PLBCMP through PLBCON, PLBWIN, or using the distributed PLBCMP batch file:
(or)
(or)
Parameters:
path
The optional subdirectory where the runtime is located if not within the current directory or within a directory in the operating system search list (PATH).
dir
The optional subdirectory where PLBCMP.PLC is located if not within the PLB_PATH or the PLB_SYSTEM directory.
pls
The required PL/B source file name.
plc
The optional output object code file name.
lst
The optional generated print file name.
wrk
The optional compiler work file directory.
plbm
The optional compiler metadata file directory.
opt
One or more of the options below preceded by a hyphen (-):
|
Option |
Result |
|
A |
Automatically executes the program if compilation was successful. |
|
C="command" |
Creates a PLC with a header that includes the "command" line specified. |
|
B |
Force a compiler error instead of a compiler warning when the compiler processes the operand of a %IFDEF, %IFNDEF, CIFDEF, or CIFNDEF directive and the data label is not terminated with a blank. |
|
D |
Display the source lines on the screen during compilation. |
|
E |
Output only those lines that generate errors to the print device/file. |
|
E={nn} |
Allows compiler default source extension to be changed to nn}. |
|
F |
Output false 'IF' lines with an 'F' after the line number. |
|
I |
Do not output warning messages. |
|
L |
Output all source lines to the print device/file. |
|
L={nn} |
Define label size as {nn} bytes. Thirty-two (32) is the assumed size. |
|
N |
No Duplicate default for IFILEs (PREPAREd IFILEs have NODUP bit set). |
|
O |
Output the generated code to the print device/file. |
|
P |
Direct the output to a spool file ({prt} or default). |
|
Q |
Append the output to an existing print file. If the specified {print} or default spool file does not exist, it is created. |
|
R |
If this compiler option is used, the compiler generates a PLC with a header setting that causes a 9.7 runtime version or later to give an U68 error when the restricted '.plc' program is being executed from a PLB runtime command line. The intended use of the restricted PLC is to protect from misuse or probing for PLB applications\programs by unauthorized end-users. A restricted PLC can be loaded and executed using PLB CHAIN and\or LOADMOD operations. |
|
S |
Generate a symbol table file for use with PLBDBUG. |
|
S=0 |
Generate an encrypted symbol table file for use with PLBDBUG. |
|
T |
Automatically invoke 'pxlat' program to convert from forward byte order to reverse byte order. This option is automatically added to the compile line by the PLBCMP script on forward byte order machines and should not be used on reverse byte order machines. |
|
V |
Generate EQUATEd labels from the command line. The format is "VNAME=value" where 'name' is the label name and 'value' is the EQUATEd value. |
|
WE={0|1} |
This compiler option disables support for open ended numeric expressions. By default, the 10.4B PL/B compiler supports and allows open ended numeric expressions the same as using 'WE=1'. If the 'WE=0' compiler is used, the compiler does not allow the open ended numeric expression syntax in a program. (10.4B) |
|
WF=0 |
This option causes the compiler to invoke the normal/default behaviors when processing embedded comments which can exist at the end of PL/B instructions. The normal compiler behavior is to ignore any text at the end of a PL/B instruction that is separated by a blank character from the normal expected instruction syntax. |
|
WF=1 |
This option causes the compiler to give a warning for embedded comments that exist at the end of a PL/B instruction as follows:
1) The compiler only checks embedded comments in LFUNCTION and FUNCTION instructions.
2) The compiler gives a warning if the embedded comments do not have a leading comment delimiter character of '//', ';', '.', or '+'. |
|
WF=2 |
This option causes the compiler to give a warning for embedded comments that exist at the end of a PL/B instruction as follows:
1) The compiler checks embedded comments in PL/B instructions for all program source being compiler.
2) The compiler gives a warning if the embedded comments do not have a leading comment delimiter character of '//', ';', '.', or '+'. |
|
WF=3 |
This option causes the compiler to give a warning for embedded comments that exist at the end of a PL/B instruction as follows:
1) The compiler checks embedded comments in PL/B instructions for all program source being compiler.
2) The compiler gives a warning if the embedded comments do not have a leading comment delimiter character of '//'. |
|
WH="nnn,mmm,..." |
This compiler option is used so WARNING messages specified in the comma delimited string are ignored by the compiler. For this option, the 'nnn', 'mmm', etc decimal values are warning numbers found in the 'plberrors.xml' file. The double quotes in the delimited string are required. |
|
WS |
Generate program meta data which is stored in the 'program.plbm' output file. The '.plbm' data is used to enhance the development of PL/B programs. The PLBCMP compiler ignores any WS{=n} options when the compiler is executed by a PL/B Linux/Linux runtime. (10.3) |
|
WS=0 |
Do not generate any program PL/B meta data. (10.3) |
|
WS=1 |
Generate program meta data which is stored in the 'program.plbm' output file. The '.plbm' data is used by the SunIDE to enhance the development of PL/B programs. (10.3) |
|
WS=2 |
Generate program meta data which is stored in the 'program.plc' output file. The PLBM data is appended to the end of the actual PLC program which can be used by the SunIDE to enhance the development of PL/B programs. (10.3) |
|
wu |
This option sest a PLC program header flag to save a copy of the UDA when a PLC program is loaded. This option is required to allow the MODULE object 'InitializeUda' method to restore a programs UDA (User Data Area) to its original state/values. |
|
X |
Generate a Cross Reference Listing. |
|
Y |
Abort compile upon detection of first error. |
|
Y{=nn} |
Abort compile upon detection of {nn} errors. |
|
ZA={nnnnn} |
Default buffer size for all IFILE and AFILE declarations. |
|
ZC |
Causes the compiler to compile in Datapoint DOS mode. |
|
ZC=0 |
Causes the compiler to compile in Sunbelt mode. |
|
ZC=1 |
Causes the compiler to compile in Datapoint DOS mode. |
|
ZC=2 |
Causes the compiler to compile in Datapoint RMS mode. |
|
ZC=3 |
Causes the compiler to compile in DBC compatibility mode. |
|
ZD |
Override the LISTOFF directive to create a complete listing. |
|
ZG |
Allow Graphical User Interface (GUI) extensions to PL/B to be compiled. |
|
ZH |
Delete output file if errors were encountered during compile. |
|
ZI[={nn}] |
Pause {nn} seconds for errors and statistics. Default 5 seconds. |
|
ZJ |
This option changes the default Auto Load DIM size of a DIM. The Auto Load DIM is used when a DIM variable is created as the program is loaded. By default the compiler forces a DIM variable to be an Auto Load DIM when the DIM size is larger than 65,535 bytes. The ZJ option changes this default value. If the ZJ option is used without the 'nnnnn' value, the default Auto Load DIM size is set to 256. If the 'nnnnn' value is specified, the 'nnnnn' value is used as the Auto Load DIM default size. See "DIM" in the language reference for additional information. |
|
ZL |
This option causes the compiler to delete a spooled file listing output if a program compiled without any errors. This option only takes affect when the 'p' option is specified. |
|
ZM |
Allow multiple character traps in program. |
|
ZN |
Run the compiler in NOCOLOR mode for compiler display. |
|
ZP={nnn} |
Specifies the printed output right most column boundary at which a source line wrap operation is controlled by the compiler. If the value of 'nnn' is zero, the compiler printed wrap output disabled. A value of zero is the default if this option is not specified. With the exception of zero, any value of 'nnn' less than 50 is reset to be 50. |
|
ZQ[={level]] |
Execute in a quiet mode where no heading nor statistics data is displayed. In this mode, only errors and warnings for the compilation are displayed. {level} is an optional level value. This modification allows a specification of 'ZQ=1' that causes the compiler to suppress all displayed output except for the line counter. This change is being made to provide a compilation activity indication. |
|
ZR="{string}" |
Allows specification of up to two (2) characters for the {string} that identifies a comment delimiter used for embedded source line comments. The option also accepts a string that contains user defined comment delimiter characters. The delimiter characters in the ZR string must be separated by a blank character. A compiler error occurs if the ZR string format is invalid. Example of ZR option:
plbcon plbcmp prog -ZR="//" plbcon plbcmp prog -ZR="// ; . +" plbcon plbcmp prog -ZR="//;." ;Compiler Error! |
|
ZS |
Allow case sensitive labels. Default is non case sensitive labels. |
|
ZT |
Open include files in READ only mode. Default is EXCLUSIVE mode. |
|
ZU |
Include expanded MACRO source statements when a macro is invoked. When this option is not specified, the default action of the compiler is to not output expanded MACRO source statements when a macro is invoked. |
|
ZV[{=|#|:}{0|1|2}] |
Produce an error when the label for any of the following data variable types are the same as a language flag name. This option affects the label detection for the following: CONST, DIM, EQU, FORM, INIT, and INTEGER.
Optional clarification values that identify label name conflicts with the PLB Condition Flag and Function Key names in enhanced expressions. The 'zv' option has been changed as follows:
-zv - Gives error for label declares that conflict with condition flag and function key names.
-zv#0 - Warning for expressions with a variable that overrides condition flag usage.
-zv#1 - Warning for expressions with a variable that overrides function key names.
-zv#2 - Warning for expressions with a variables that override either condition flag or function key names. |
|
ZW={nnn} |
Specifies the displayed output right most column boundary at which a source line wrap operation is controlled by the compiler. If the value of 'nnn' is zero, the compiler displayed wrap output is disabled. A value of zero is the default if this option is not specified. With the exception of zero, any value of 'nnn' less than 50 is reset to be 50. |
|
ZX |
Prevent the compiler from storing a timestamp into the PLC output program module. |
|
"xx" |
The information between the quotes ("") is the TITLE for the output. |
|
nnn |
Number of lines per page for the output. |
Note the following:
1. Each file name specified must either be unique or specified without an extension. If an extension is not specified, the following extensions are assumed:
The default source name {pls} extension is .pls.
The default object name {plc} extension is .plc.
The default list name {lst} extension is .lst
2. Any INCLUDE files that do not have an extension specified within the inclusion name default to an extension of .pls.
3. If the object file name {plc} is not specified, the source file {pls} name is used with an extension of .plc.
4. If the list file {lst} name is not present but the "p" option is specified, the list file name defaults to the source file {pls} name with an extension of .lst.
5. Compilation may be paused by pressing F1 and aborted by pressing either F2 or ESCape. If paused with F1, compilation may be resumed by pressing the F1 key again.
6. {wrk} specifies a directory where the compiler is to create its work files. Alternatively, the user can specify the PLBCMP_WRK keyword. The compiler will give an appropriate error if a directory specified by {wrk} is invalid.
7. One or more options may be specified in either upper or lower case without delimiters between the options. The first option given must be preceded by a space and a hyphen (i.e., `-?'). Any additional options given after the first, need no delimiters between them.
8. If a listing was specified and a heading was not given, the user is prompted for a page heading. If a heading is not entered within 30 seconds, the compiler continues with the compilation. This allows for unattended operation with listings.
9. The compiler displays the name of each inclusion file as it is processed, plus a running counter of line numbers. When the compilation is complete, the total number of lines in all included files along with the number of errors and warnings are displayed.
10. When PLBCMP is run using the supplied batch file (PLBCMP.BAT), the equal sign (=) used by some of the options are interpreted by the command processor of DOS as a batch assignment. To correctly associate a compiler option using the batch file, substitute the pound (#) sign or colon (:) character for the equal sign (=).
11. The '-c[="command line"]' option causes the PLC module output to contain a header that includes the "command line" specified. If the '-c' option is specified without a user command line, a default command 'plb' is put into the header. This command line header format allows execution of a PLC module on a Linux platform directly without specifying a runtime on the command line.
12. The '-c' command line option overrides any LinuxCMD directives found in a program's source. The compiler will give an appropriate compiler warning when a LinuxCMD is being ignored.
13. When the PLC command line header format is used, all 8.7 and later runtimes will recognize and properly execute the program. However, if the PLC module is executed by a runtime for a prior release, a U12 error will occur.
14. The Datapoint DOS compatibility mode (ZC=1 or ZC) processes *COLOR controls the same as an *FGCOLOR control and a CALL USING for VARLIST/RECORD statement is output as individual variables.
15. In DATAPOINT RMS compatibility mode (ZC=2), the CALL USING for VARLIST/RECORD is output as individual variables.
16. The DBC compatibility mode supports numerous language variations.
Example 1:
(or)
Compile the source file test.pls into test.plc.
Example 2:
(or)
Compile the source file test.pls into test.plc.
Example 3:
(or)
Compile the source file prog.pls into prog.plc, generating a listing of the file with the heading "PROG" and spooling it to the file prog.lst.
Example 4:
(or)
Compile the source file prog.pls into prog.plc, allowing label lengths of thirty-two characters. Compiler work files are place on drive "r" in the "temp" directory.
Example 5:
Compile the source file prog.pls into prog.plc adding a special header containing the command "newplb". Execution of the command "prog" is then identical to executing "newplb prog".
Example 6:
In this example, the 'program.pls' is compiled and a '.plbm' meta data file is created in the same directory location where the 'program.plc' is located.
Example 7:
In this example, the 'program.pls' is compiled and a '.plbm' meta data file is created in the 'c:\temp\myplbm' directory.
Example 8:
In this example, the 'program.pls' is compiled and the warnings for 140 (Obsolete data type) and 331 (Obsolete keyword control) are ignored.
See Also: PLBCMP Keywords, PLBWIN INI File Format, DBC Compatibility Mode, Compiler and Runtime Options
![]() |