Ch 4. Application Development [ COMMUNICATOR 3000 MPE/iX-Express 4 (SUBSYS B.40.05 and PowerPatch Tape) Based on ] MPE/iX Communicators
COMMUNICATOR 3000 MPE/iX-Express 4 (SUBSYS B.40.05 and PowerPatch Tape) Based on
Chapter 4 Application Development
Transact/iX A.05.00
by Susan Scotten
Software Services and Technology Division
Transact/iX Enhancements
This release of Transact/iX (A.05.00) adds 16 enhancements.
ALIGN Option for LIST Verb.
A new option ALIGN has been added to the LIST verb to list an item on an
even word boundary. The ALIGN option forces the item to be aligned on a
16-bit boundary.
Example:
LIST item1, ALIGN:
item2:
item3, ALIGN;
Item1 and item3 are forced on an even word boundary. Item2 may or may
not be on an even word boundary, depending on the length of item1.
CHCK Compiler Option.
A new compiler option CHCK has been added to issue a warning message if a
referenced item is never used in a LIST or PROMPT statement. CHCK causes
Transact to check that all items DEFINEd and referenced have been put in
the LIST register by either a LIST or PROMPT statement. The default is
NOCHCK.
STATUS Option for LIST Verb.
A new option STATUS has been added to the CALL verb. The status register
of the calling program is set to a value indicating whether an error
occurred in the called program.
Example:
CALL subprog, STATUS;
Upon return to the calling program, the status register contains the
value 0 if the subprogram had no errors or a value -2 if an error
occurred in the subprogram.
WORKFILE Option for FIND Verb.
The new option WORKFILE has been added to the FIND verb to allow use of a
work file without sorting the contents of the work file.
Example:
FIND(CHAIN) ORDERS, LIST=(#), WORKFILE,
PERFORM=DISPLAY-IT;
ASCII Function for LET Verb.
The new ASCII function of the LET verb returns the ASCII code of the
first character of the string.
Example:
LET (CODE) = ASCII("A");
The value of CODE is 65.
LENGTH Function for LET Verb.
The new LENGTH function of the LET verb returns the length of a string.
Trailing blanks are not included.
Example:
LET (COUNT) = LENGTH(" APPLE ");
The value of COUNT is 7.
POSITION Function for LET Verb.
The new POSITION function of the LET verb returns the starting position
of string2 in string1.
Example:
LET (INDEX) = POSITION("BAD DOG", "D");
The value of INDEX is 3, which is the first occurrence of "D" in "BAD
DOG"
VALUE Function for LET Verb.
The new VALUE function of the LET verb returns the numeric value of a
string containing the character representation of an integer or a
floating point number.
Example:
LET (NUM) = VALUE("-3A");
The value of NUM is -3.
CHAR Function for MOVE Verb.
The new CHAR function of the MOVE verb converts a numerical ASCII code to
its character equivalent.
Example:
MOVE (STRING) = CHAR(97);
The contents of STRING, if defined as X(4),
is "a ".
COL Function for MOVE Verb.
The new formatting function COL has been added to the MOVE verb. The COL
function moves an item to the specified position of the string.
Example:
MOVE (NAME) = (LNAME) + COL(FNAME,10);
Let LNAME contain "Smith" and FNAME contain "Joe".
The contents of NAME, if defined as X(15), is
"Smith Joe ".
LOWER Function for MOVE Verb.
The new LOWER function of the MOVE verb downshifts a variable or string
constant.
Example:
MOVE (NAME) = LOWER("SMITH");
The contents of NAME, if defined as X(5),
is "smith".
PROPER Function for MOVE Verb.
The new PROPER function of the MOVE verb upshifts the first character of
each word.
Example:
MOVE (NAME) = PROPER("smith,j");
The contents of NAME, if defined as X(8),
is "Smith,J ".
SPACE Function for MOVE Verb.
The new formatting function SPACE has been added to the MOVE verb. The
SPACE function prefixes the item with the specified number of spaces.
Example:
MOVE (NAME) = (LNAME) + SPACE(FNAME,1);
Let LNAME contain "Smith" and FNAME contain "Joe".
The contents of NAME, if defined as X(15) is
"Smith Joe ".
STRING Function for MOVE Verb.
The new STRING function of the MOVE verb returns a string that is a part
of another string at a given position for a given length.
Example:
MOVE (NAME) = STRING((NAME),1,3);
If NAME contained "BROWN J " before the MOVE,
after the MOVE, NAME contains "BRO ".
UPPER Function for MOVE Verb.
The new UPPER function of the MOVE verb upshifts a variable or string
constant.
Example:
MOVE (NAME) = UPPER("smith");
The contents of NAME, if defined as X(5),
is "SMITH".
Transact Error Messages in EXPLAIN.
Transact users with this release, can now get error information online
using the MPE Command EXPLAIN. When a Transact error is encountered, the
customer can run EXPLAIN from the MPE prompt, and provide the error
number. EXPLAIN displays information on what caused the problem and what
you can do to resolve it. For example, if the following error message
was received:
*ERROR: DATABASE BUFFER NOT ON WORD BOUNDARY (TXC 70,56) [PROG1]
type the following to get an explanation of the message:
:EXPLAIN TXC 70
--------------------------------------------------------------------
DATABASE BUFFER NOT ON WORD BOUNDARY
The data buffer for a database operation must start on a word
boundary. If necessary, insert a one-character fill item before
the first data item of the database list.
MSG GROUP: Transact/iX Errors
MSG CATALOG: TRAN000.PUB.SYS
MSG KEY: TXC 70
--------------------------------------------------------------------
MPE/iX Communicators