Data Collection Transaction Program Builder
-------------------------------------------
This readme file describes the components of the IBM Data Collection Transaction
Program Builder (DCTPB). In addition, it covers version 3.0.8f (May 2013)
and later of the DCConnect Client because the Client now supports direct
compile of the same script files that DCTPB compiles.
Notices
-------
References in this document to IBM products, programs, or services do not
imply that IBM intends to make these available in all countries in which
IBM operates. Any reference to an IBM product, program or service is not
intended to state or imply that only IBM's product, program, or service
may be used. Any functionally equivalent product, program, or service that
does not infringe any of IBM's intellectual property rights may be used
instead of the IBM product, program or service. Evaluation and verification
of operation in conjunction with other products, except those expressly
designated by IBM, is the user's responsibility.
IBM may have patents or pending patent applications covering subject matter
in this document. The furnishing of this document does not give you any
license to these patents. You can send license inquiries, in writing, to
the IBM Director of Commercial Relations, IBM Corporation, Purchase, NY
10577.
Trademarks and Service Marks
----------------------------
The following terms are trademarks of the IBM Corporation in the United
States or other countries or both:
IBM
Other company, product, and service names may be trademarks or service
marks of others.
Table of Contents
-----------------
Overview
DCConnect Client Direct Compile of Scripts
History and Naming of the Product
Hardware Requirements
Software Requirements
Installation Instructions
Running BPTCD32
Running DCTPB32
Running IMBEDSCR
Overview of the Script File Format
Spacing and Punctuation
Comments
Legacy DCTPB Commands
Messages
Multiple Language Support
Global User Variables, Local Variables, Parameters
Rules for Variable and Parameter Names
Subroutines
Return Code User Variable
CFR Access To Variables and Parameters
Imbedding Files
Transaction Program Control Using If/Else Commands
Using AND, OR and NOT operators in If Commands
Configuration Commands for DCConnect Client Text Downloads
BUFFERING_MODE Command
CFR_FILE Command
COMMUNICATIONS_TIMEOUT
DATE_SEPARATOR
ERROR_LOGGING
FAST_CLOCK_INTERVAL
IDLE_DATE_FORMAT
IDLE_PROMPT_FORMAT
IDLE_TIME_FORMAT
INPUT_TIMEOUT
LOCAL_VALIDATION Command
NON_PROMPT_TIMEOUT
NUMERIC_DELIMITER
RS232_BACK_STRIP_LENGTH
RS232_BAUD_RATE
RS232_DATA_BITS
RS232_FRONT_STRIP_LENGTH
RS232_HEADER_STRING
RS232_PARITY
RS232_RETRY_COUNT
RS232_STOP_BITS
RS232_TIMEOUT
RS232_TRAILER_STRING
RS232_XON_XOFF
SYSTEM_MESSAGE Command
TIME_SEPARATOR
VALIDATION_TIMEOUT
Special Programming Commands
MAKEPGM Command
MESSAGE Command
PROGRAM Command
ENDPROGRAM Command
IMBED Command
TERMTYPE Command
KEY Command
ENDKEY Command
NAME_UV Command
SUB Command
ENDSUB Command
Start_Language Command
End_Language Command
Transaction Programming Commands
AK Command
AKA Command
APND Command
APNDSTR Command
AUTO Command
Block Commands { and }
BNAV Command
BOX Command
BRAUV Command
CALL Command
CCFR Command
CLRD Command
CLRP Command
CLRS Command
CMPUV Command
CURS Command
DB Command
DBI Command
DECLARE Command
DLAY Command
ELSE Command
ELSEIF Command
ENAV Command
ENCRYPT Command
FB Command
FRMT Command
GOSUB Command
GOTO Command
HF Command
IF Commands
INAV Command
KB Command
LABEL Command
LED Command
LF Command
MATH Command
MODE Command
MSG Command
NAV Command
NAVZONE Command
NK Command
NOOP Command
ONKEY Command
ONSUB Command
QUERY Command
RDDI Command
READ Command
RETURN Command
SEND Command
SET Command
SETSTR Command
Set_Language Command
SF Command
SHOW Command
TERM Command
TEST Command
VB Command
VERSION Command
VRFY Command
WRDO Command
WTDI Command
Command/Key Relationships
Overview
--------
The Data Collection Transaction Program Builder provides one utility program,
DCTPB32.EXE, which is an alternative to the DCConnect Toolkit for building
transaction program (.PGM) files for IBM 7524, 7525, 7526 and 7527 data
collection terminals as well as for any 3rd party terminal that is supported
by the DCConnect Client (formerly 752x Emulator for DOS). When writing
programs for terminals running the DCConnect Client, they should considered
the same type as the IBM 7524 terminal (DCT7524).
Note: This document uses 7524/Client throughout to indicate a particular
feature applies both to the IBM 7524 terminal and to terminals running
the DCConnect Client.
This utility gives experienced DCC/2 or DCConnect users a method for quickly
generating complex transaction programs using their favorite text editor.
After using the editor to create or modify the transaction program(s), these
text program files are 'compiled' by DCTPB32.EXE resulting in a .PGM file
that can be used with the DCConnect Server product.
The generated .PGM file(s) can be copied to the DCConnect .\job subdirectory
and then the DCConnect User Interface can be started so that the transaction
programs can be bound to one or more terminals and ultimately downloaded to
those terminals.
A second utility, BPTCD32.EXE, is also provided for converting 32-bit transaction
program files (.PGM) to the text file format used as input for the program builder.
With this second utility, it is possible to quickly generate DCTPB32 source files
for any of your existing transaction programs. Note that in June 2004 when
version 2.10 of the DCConnect Client was created introducing the new commands such
as SET, SETSTR, MATH, SUB / ENDSUB, RETURN as well as the use of local variables,
parameters and other related variable usage enhancements, the BPTCD32 utility was
NOT updated to reverse compile these commands. So this tool can only be used
for .PGM files that were created for the 7525 / 7526 / 7527 terminals or DCConnect
Client programs that do not include any commands that were introduced after June 2004.
New with fix pack D is another utility program, IMBEDSCR.EXE, which is useful if
your transaction programs are stored in several different files and you use the
IMBED command to link them altogether. IMBEDSCR.EXE allows you to generate a
single listing file that includes all of the imbedded files. The output can
either be a 'runnable' file that DCTPB32 can compile or it can be a listing shows
the line number from each imbedded file along with a letter indicating the
imbed level of that file (A for the top level, B for the next level, ...)
Versions of all utilities are provided for OS/2 3.0 or later and
Windows NT/2000/XP/7/Server or later.
DCConnect Client Direct Compile of Scripts
------------------------------------------
With version 3.0.8f of the DCConnect Client, the script processing functionality
of DCTPB has been replicated in the Client, eliminating the need to do a separate
compile step. The Client now accepts the SCRIPT_NAME parameter in its EMULATOR.INI
file (or -s command line parameter). It also has the "-o=compile_only" command line
option to indicate that only syntax checking of the scripts should be performed. Any
errors or warnings from the compile are written to etspt.msg (instead of dctpb.err).
Without the "compile only" switch in effect, the Client will process the script
file(s) and then establish communication with the DCConnect Server and be ready
for the user to run transactions without having to first receive a download from
the Server. But there is a new VERSION command that can be included in the
scripts which both the Client and Server will look at to determine if the Client
has the current set of scripts. Only if there is a difference in versions will
a download of the current scripts be sent to the Client from the Server. In addition
a manual download request of any or all devices can be made from the DCConnect
User Interface or other application.
The script processing functionality was added in version 3.0.9 of the DCConnect Server.
In this version, the Terminal Settings notebook includes a new option called
"Settings Source" which defaults to <Use Settings Notebook> but which can be
set to a script file name instead. The dropdown list for this option will show
all files in the \dcconn\job directory that have the extension .COD, .TOP and .TXT.
You pick only one file for a terminal or function group, but that file may use the
IMBED command to include other files. These other files can be located anywhere on the
DCConnect Server.
When the Settings Source is a specific script file rather than <Use Settings Notebook>
then all of the terminal resident configuration parameters in the Settings Notebook are
ignored - including CFR Name, Validation at Terminal, Program Bindings, Idle Menu and
System Messages. The only parameters in the Terminal Settings notebook that are used
in this case, are those that define the terminal rather than what is loaded to it:
- General tab, Page 1
- Terminal Name
- Terminal Address
- Terminal Model
- Settings Source
- General tab, Page 2
- Start Up State - In Service
- Start Up State - Polled
- Time tab, Page 3
- Terminal's Time Zone relative to the Server
All of the other parameters can now be set in your text-based script files using new commands
such as CFR_FILE, SYSTEM_MESSAGE, LOCAL_VALIDATION, DATE_SEPARATOR, NON_PROMPT_TIMEOUT and many
more. For more info, please see Configuration Commands for DCConnect Client Text Downloads.
When the DCConnect Server does download text scripts to the Client, in order to minimize
the download size and time, all imbedded files are combined into one file, all comments
are removed as well as any extra spaces. The result is a single file called SCRIPTS.TXT
when it is received at the Client. Note that on the server, in order to prevent name
conflict with terminals that are being downloaded simultaneously, the stripped down
text file is given the name of the format ttttttt.$TP where 'ttttttt' is the terminal name.
During a text file download, the first file that is downloaded is actually an .INI file
called MASTER.INI that includes two commands as illustrated here:
TERM_SUB_MODEL=Win32
SCRIPT_NAME=SCRIPTS.TXT
The TERM_SUB_MODEL command tells the Client what model is configured for this terminal in
the DCConnect configuration (General tab, Page 1, Terminal Model). The primary use for
this is to choose the correct CFR_FILE command, when there are multiple such commands
in the scripts, each specifying a different CFR executable for different terminal models.
The SCRIPT_NAME parameter tells the client what script file to load. This is always
SCRIPTS.TXT.
Starting With version 3.0.8f, the DCConnect Client looks for both MASTER.INI and EMULATOR.INI
when it starts up and after text files are downloaded to it. If any setting is found in
both files, the one in MASTER.INI takes precedence.
History and Naming of the Product
---------------------------------
The Data Collection Transaction Building Tool has existed in the past as a
tool for generating 16-bit .PGM, .CFG and .TDF files. Despite its official
name, this tool has come to be known as DCTPB - Data Collection Transaction
Program Builder. In fact its executable has that name.
Due to the history of that name, we will continue to use it for the tool
used to convert the text file to a .PGM file. However, the current version
of the product generates only 32-bit .PGM files directly; it does not
generate .JOB files. The rest of the terminal configuration can be set up
using the DCConnect terminal notebooks.
The second utility, for converting from .PGM files to text files, is called
BPTCD32 (BPTCD is the reverse of DCTPB which stands for Binary Program To
Command Decoder).
Hardware Requirements
---------------------
None
Software Requirements
---------------------
IBM OS/2 Version 3.0 or later
- or -
Microsoft Windows NT/2000/XP/7/Server later
Installation Instructions
-------------------------
The CD for this product includes versions to be used on OS/2 and Windows NT/2000/XP/7/Server.
In addition online documentation for this and other ERPBridge and DCConnect
products are provided in the \MANUALS directory of the CD. To view the
list of online documentation, enter the following URL in your browser:
file:///d:\manuals\index.htm
where d: is the drive letter for your CD-ROM drive. A page will be displayed
from which you can click on the book you want to read. There is also a link
to the ERPBridge / DCConnect home page.
To install this product on Windows NT/2000/XP/7/Server, run the following from the root
directory of the CD:
setup
To install this product on OS/2, run the following from the root directory
of the CD:
setupos2
The installation program will step you through the rest of the process.
Running BPTCD32
---------------
Note that in June 2004 when version 2.10 of the DCConnect Client was created introducing
the new commands such as SET, SETSTR, MATH, SUB / ENDSUB, RETURN as well as the use of
local variables, parameters and other related variable usage enhancements, the BPTCD32
utility was NOT updated to reverse compile these commands. So this tool can only be used
for .PGM files that were created for the 7525 / 7526 / 7527 terminals or DCConnect
Client programs that do not include any commands that were introduced after June 2004.
In order to run the BPTCD32 utility to convert a DCConnect (or 32-bit DCC/2)
.PGM files to a DCTPB32 source text file, issue the following command:
bptcd32 filename.PGM [messages_in_line]
where 'filename.PGM' is the name of the 32-bit .PGM file.
'messages_in_line' is an optional parameter indicating that message
text should be included directly in MSG, SHOW,
APND and SHOW commands. If this parameter is not
specified, MESSAGE commands are put at the start
of the output for all messages that are used and
the MSG, SHOW, APND and SHOW commands use a message
number instead of the actual text.
The output file generated by the BPTCD32 utility will match the name of the
.PGM file that is being processed but will have the extension .COD. The .COD
file is a valid source file for use as input to the DCTPB32 utility. If
processed by the DCTPB32 utility it would yield a .PGM file equivalent to the
one you started with.
Running DCTPB32
---------------
In order to run the DCTPB32 utility to convert a text script file to a
DCConnect (or 32-bit DCC/2) .PGM file, issue the following command:
dctpb32 source_file [INCLUDE_COMMENTS] [SHOW_STEPS]
where 'source_file' is the name of the source text file to be converted to
a .PGM file. Typically this file will have the extension
.COD, but that is not required.
INCLUDE_COMMENTS is an optional parameter which specifies that
comments denoted by double slash are to be included in
the .PGM file that is generated. If this parameter is
used, do not include the square brackets shown above.
As of fix pack D, February 2001, double-slash comments
are no longer included in the .PGM file automatically;
You must now use the INCLUDE_COMMENTS parameter if you
want them.
You may want to use the INCLUDE_COMMENTS parameter if
you want them to show up when the program is viewed
using, for example, the DCConnect Toolkit. However,
comments that are included in the .PGM file result in a
larger download to 7524/Client and 7527 terminals
(2 extra bytes per comment).
SHOW_STEPS is optional parameter that tells DCTPB to show the program
number and step number of each command as it is compiling.
You could then redirect the screen output of the compile
to a file in order to capture this information.
This information can be useful when trying to cross
reference your DCTPB source code with DCConnect Client
generated messages or error transactions which reference
a step number or steps numbers shown while STEPPING
mode is in effect in the DCConnect Client.
When this parameter is in effect, all MESSAGE commands
are also shown in the output so that you can cross
reference them with the message numbers or names used in
the transaction program commands.
This option was new as of May 16, 2005.
By default the output file name will be PGMFILE.PGM. However, the MakePGM
command can be used in the source file to specify a different output file name.
Read below for more information about the format of the input script file for
DCTPB32.
Running IMBEDSCR
----------------
To generate a single listing file which includes all imbedded files in the
listing, issue the following command:
imbedscr source_file
where 'source_file' is the same name that you would use when running
DCTPB32.EXE. Typically this file will have the extension .COD, but that
is not required.
The output file will have the same 'file name' (before the period) as the
input file, but the extension of the output file will be .LST - unless the
extension of the input file is already .LST in which case the extension of
the output file will be .OUT.
Initially this tool generated a listing file that could not actually be compiled
by DCTPB32. But the latest version generates a 'runnable' output file. This
might be useful if the set of scripts need to be sent to a colleague to illustrate
something or if the set of scripts need to be sent to IBM so that a problem can
be replicated.
If you prefer to get a listing with line numbers, then you can add a second
parameter, 'listing', to the command line. For example:
imbedscr source.cod listing
The listing shows the line number from each imbedded file along with a letter
indicating the imbed level of that file (A for the top level, B for the next
level, ...).
Overview of the Script File Format
----------------------------------
A single input script file can contain definitions for more than one
transaction program. Each program starts with the PROGRAM command, specifying
the name and type. Each program ends with the ENDPROGRAM command. In between
are the commands that make up the transaction program.
At the start of the file you would typically have a MakePGM command which is
used to specify the name of the output .PGM file. To illustrate:
MakePgm(TIME_ATT.PGM)
PROGRAM(CLOCK_IN, DCT7526_200)
/* Commands for CLOCK_IN program here */
/* Commands for CLOCK_IN program here */
/* Commands for CLOCK_IN program here */
ENDPROGRAM()
PROGRAM(CLOCK_OUT, DCT7526_200)
/* Commands for CLOCK_OUT program here */
/* Commands for CLOCK_OUT program here */
/* Commands for CLOCK_OUT program here */
ENDPROGRAM()
Note: The commands TERMTYPE/KEY/ENDKEY commands can be used in place of
PROGRAM/ENDPROGRAM to specifies the start and end of programs as
well as their terminal types. However, these alternate commands
should only be used if all programs in the file are for the same
terminal type and the binding information from the KEY command will
be used. See the TERMTYPE command below for more details.
For text scripts that are to be loaded directly by the DCConnect Client,
the Key / EndKey commands must be used instead of Program / EndProgram
so that each program is properly associated with a key. In addition, the
MakePgm command is not used - and will be ignored if encountered.
Spacing and Punctuation
-----------------------
Spaces before commands and between parameters can be used as desired. DCTPB32
looks for specific keywords and delimiters, ignoring preceding and intervening
spaces.
Commas must be used to separate parameters. An opening parenthesis
must precede the first parameter of a particular command and a closing
parenthesis must follow the last parameter. An optional semicolon may be
added after the closing parenthesis. If a comma or parenthesis is part of
inline message text of the text of any parameter, that parameter's text should
be enclosed in double quotes. If a string that is enclosed in double quotes
must contain one or more double quotes within it, use a pair of double quotes
to represent each one. For example, to show the message:
Dean said "Time to go home!" and he did.
you would set up the MSG command as follows:
MSG("Dean said ""Time to go home!"" and he did.");
Blank lines can be interspersed throughout the text as desired.
A single command may be split across multiple lines.
The maximum total command length is 4000 after leading and trailing spaces and
trailing comments are removed.
Comments
--------
The DCTPB32 script may contain comments for describing what your programs are
doing. There are two ways comments can be entered into the script:
1) Preceded by slash-star and ending with star-slash. For example:
/* The following code prompts the user for the userid and password */
Comments of this type are NOT included in the .PGM file and thus result
in a smaller download to 7527 and 7524/Client terminals.
2) Preceding the comment using double slashes. For example:
// The following code prompts the user for the userid and password
As of fix pack D, February 2001, these comments are no longer included
in the .PGM file unless a second command line parameter, INCLUDE_COMMENTS,
is specified when DCTPB32.EXE is run.
You may want to use the INCLUDE_COMMENTS parameter if you want them to
show up when the program is viewed using, for example, the DCConnect
Toolkit. However, comments that are included in the .PGM file result
in a larger download to 7524/Client and 7527 terminals (2 extra bytes
per comment).
If a line starts with a comment, the entire line is ignored. For example, the
command on the following line is NOT processed:
/* Unlock door for 5 seconds */ WRDO (0, SET_DO_POINT, 5, DO_SYNCH)
However, comments may follow a complete command on the same line. For
example, the following WRDO command is processed:
WRDO (0, SET_DO_POINT, 5, DO_SYNCH) /* Unlock door for 5 seconds */
For commands that are split across multiple lines, it is legal for each
line in the split command to have a comment at the end of the line. For
example, the following If command is split over two lines but each line
has a comment at the end:
if ((uvRow #< 1) || (uvRow #> 16) || // Row must be 1-16
(uvCol #< 1) || (uvCol #> 20)) // Column must be 1-20
Goto (THIS_PROGRAM, INVALID_DIMENSIONS)
Legacy DCTPB Commands
---------------------
Throughout the history of DCTPB other commands have been allowed which may
not be documented here. These old commands, which related to the generation
of the old DCC/2 terminal configuration files (.CFG, .TDF) - such as
TXBUFFERSIZE, ALIAS or FASTCLOCKTIME, are also still accepted without error.
However, these have no real effect because the current DCTPB32 only generates
program files. This does allow any old DCTPB script to be used to generate
program files for DCConnect - even if those scripts included the entire
terminal configuration.
Messages
--------
For commands that can have message text as a parameter (MSG, APND, SEND and
SHOW), there are three ways you can set up the message text:
1) Put the message text directly into the command enclosed in double
quotes. For example:
SHOW(SRC_MESSAGE_FILE, "Enter badge:", 1, 1, NORMAL);
Messages designated this way are referred to as "inline".
2) Set up a message number for the message text using the MESSAGE command and
then use that message number in the command instead of the text:
MESSAGE( 300, "Enter badge:", 0);
...
SHOW(SRC_MESSAGE_FILE, 300, 1, 1, NORMAL);
3) Set up a message name for the message text using the MESSAGE command and
then use that message name in the command instead of the text:
MESSAGE( MSG_ENTER_BADGE, "Enter badge:", 0);
...
SHOW(SRC_MESSAGE_FILE, MSG_ENTER_BADGE, 1, 1, NORMAL);
Use of inline messages has the following advantages:
- You see the text of the message directly in the command and do not have to look for it elsewhere in
the program. This improves the readability of the program.
- It is easier to merge programs developed for different project (i.e. no need to re-number messages).
When using the inline method, DCTPB32 save space by detecting messages that are the same and will set up the .PGM file
so that the text is stored only once and referenced multiple times.
Advantages to the numbered method are:
- You need only change the message text in one place (e.g. a separately imbedded message file) if a single message
is used in more than one place. Of course the Find/Replace function of your editor could also be used to
accomplish that when using the inline method.
- You can write the code once and compile using different language translations of the messages file
- It is easier to keep your message file organized as you add new functions
The use of named messages combines the advantages of inline and numbered messages, assuming you use meaningful names
that reflect the message text. The message name can be up to 64 characters in length.
If using MESSAGE commands, they should be defined before they are referenced.
If using message numbers it is not necessary for the numbers to be consecutive; message numbers
can be skipped as desired. For 7524/Client, 7525 and 7527 transaction
programs, the first message number used should be 10 or above; for 7526
transaction programs start with 11 or above.
As of the May 2000 release of the product, it is now possible to mix inline
messages along with messages defined using the MESSAGE command. In addition,
the message numbers in MESSAGE commands no longer need to be sequential -
although for maintenance purposes it is a good idea to organize them that way.
New in version 2.1.0 is the option to eliminate the SRC_MESSAGE_FILE
parameter from the APND, SEND and SHOW commands. So the three show commands
above could instead be entered as:
SHOW("Enter badge:", 1, 1, NORMAL);
SHOW(300, 1, 1, NORMAL);
SHOW(MSG_ENTER_BADGE, 1, 1, NORMAL);
When DCTPB compiles named messages into a .PGM file, the message names are handled strictly during the
DCTPB compile; the names are not seen by the DCConnect Server or the terminals; The DCTPB compile
converts the names to numbers when the .PGM file is generated.
And when the DCConnect Client is reading the text script files directly, the messages names are also
not visible anywhere, just the actual message text.
The ability to define multiple languages and switch which one is active is a feature that
is only available in version 3.0.8f of the DCConnct Client and later; it is not available when
using DCTPB to compile scripts. See the following commands in the rest of this document for
more details:
Start_Language
End_Language
Set_Language
Multiple Language Support
-------------------------
When text based scripts are being used - supported with version 3.0.8f and later - you can
define messages in multiple languages using Start_Langage, End_Language blocks and the
'named message' method for defining messages using the Message command. The System_Message
command can also be included in Start_Language / End_Language blocks.
The following example shows how language blocks are set up.
Start_Language ( English )
Message ( MSG_THANK_YOU, "Thank you" )
Message ( MSG_YOURE_WELCOME, "You're welcome" )
...
End_Language()
Start_Language ( Spanish )
Message ( MSG_THANK_YOU, "Gracias" )
Message ( MSG_YOURE_WELCOME, "De nada" )
...
End_Language()
Within any one Start/End_Language block, each message name must be unique. (In the example
above, the message names are MSG_THANK_YOU and MSG_YOURE_WELCOME). But each language block
should include the exact same set of message names. When the script file is processed by
the Client, an error will be given if duplication is found within a block or if the set of
messages between blocks is not the same.
Of course all SHOW, SEND, APND, … commands that reference messages will need to use the
message names that are used in the language blocks. For example:
Show (MSG_THANK_YOU, 1, 1, Normal)
The actual message text that is shown will depend on what language is currently in effect.
The first Start_Language command encountered will determine which language will be shown
first. To change the current language, use the new command:
Set_Language (language_name)
The changing of a language would likely be done in response to some kind of logon transaction
where the response from the server indicates what language the signed in user has been
assigned. Assuming the language is parsed out of the response into a variable called
uvLanguage, the following code is example of how the language could be set:
If (uvLanguage = “English”)
Set_Language (English)
Elseif (uvLanguage = “Spanish”)
Set_Language(Spanish)
Elseif (uvLanguage = “German”)
Set_Language(German)
Note that the language name used in any Set_Language commands must match the name used in one
of the Start_Language commands. However, the language names shown in double quotes against
which the uvLanguage variable is compared can be whatever you establish as the means of
identifying the language between server and client.
If there are any system messages, such as those for the idle menu that need to be defined when
multiple languages are in use, the System_Message command can be used in each of the language
blocks, for each of these system messages.
When language blocks are in use you can also have Message commands that are not inside any
message block. You would do this for messages that do not need to be translated - such as
those that contain only numbers, spaces, dashes, identifiers, ... Message defined outside of
language blocks are referred to as 'common' messages. For the Message commands that define
these common messages, message names must still be used; message numbers cannot be used. You
can also use inline messages; these are considered common messages as well. Up to 256 common
messages can be defined.
Note: When language blocks are being used, the System_Message command cannot appear outside
of those language blocks.
Of course if only one language is being used, no Start_Language / End_Language blocks are needed
and therefore all Message and System_Message commands will not be inside a language block.
Note that when compiling scripts with DCTPB, Start_Language and End_Language are not considered valid
commands. But Set_Language can be included in scripts that are compiled by DCTPB; it will just be
ignored.
This behavior allows you to use the same set of scripts for a device that does not support multiple
languages (e.g. the version of the Client built for the DOS-based Antares terminal does not support
multiple languages due to limited memory) as well as for devices that do support multiple languages.
The following example illustrates how the scripts files can be organized to accomplish this.
- Assume that English is the language to be used on the devices that support only one language
- Named messages are used everywhere; numbered messages are not used.
- COMMON.MSG is created to contain messages that would not need to be translated - such as numbers,
strings of blanks, symbols, ...
- MSG_EN.MSG contains the English versions of messages
- MSG_SP.MSG contains the Spanish versions of messages
- SYSMSG_EN.MSG contains the English versions of the system messages (not used by DOS-based scripts)
- SYSMSG_SP.MSG contains the Spanish versions of the system messages (not used by DOS-based scripts)
- The transactions programs used by all devices are defined in TP1620.COD (which may IMBED other
script files)
- Create a 'top-level' script file for the Antares (e.g. ANTARES.TOP) that imbeds the English messages
and programs that it needs (Note that TERMTYPE must be the first command):
TERMTYPE ( DCT7524, ENFORCE_BINDINGS )
MakePGM ("TP1620.PGM")
IMBED ( COMMON.MSG )
IMBED ( MSG_EN.MSG )
IMBED ( TP1620.COD )
This file, ANTARES.TOP, will be compiled by DCTPB to generate TP1620.PGM. Because this is being
compiled by DCTPB, the MakePGM command is needed to tell it what .PGM file should be generated.
In the DCConnect User Interface, the Terminal Settings notebook will the Settings Source set to