Trailing-Edge
-
PDP-10 Archives
-
BB-5372C-BM
-
documentation/traffic-20.differences
There is 1 other file named traffic-20.differences in the archive. Click here to see a list.
RELEASE 2 CHANGES AND COBOL V12
1 INTRODUCTION
TRAFFIC-20 was introduced in May 1977 for use on the DECSYSTEM-20.
The product included both screen formatting routines (TFR, TFRCOB,
TFRTRM, TFRUNV) and data routing routines (IP20). A new release of
TRAFFIC-20 is now being made in order to:
1. Make the TRAFFIC routines work with COBOL V12.
2. Add functionality which has been suggested by several
customers.
3. Correct problems.
The major changes have been to the screen formatting routines. The
routing routines include only one or two corrections plus changes
necessary for COBOL V12. Because of the large number of changes, the
updates to the screen formatting routines will be covered in detail.
1.1 COBOL Version 12
Versions of COBOL prior to version 12 have not contained a unified
memory management system. Because of this, foreign processes (not
formally part of the COBOL system) such as TRAFFIC-20 have had to do
their own memory management. With version 12 of COBOL two things
happen:
1. A unified memory management system for COBOL programs is
available with interfaces available to foreign processes.
2. The area of memory formally utilized by TRAFFIC-20 (pages
600-677) is now being utilized by LIBOL.
The new version of the TRAFFIC routines (TFRCOB and IP20) utilize the
new LIBOL memory management interface to secure additional memory. In
addition, this new version will run with COBOL V11 as well. Thus a
RELEASE 2 CHANGES AND COBOL V12 Page 8-2
user may convert from version 1 of TRAFFIC-20 to version 2 and then
subsequently from version 11 of COBOL to version 12. It should be
noted that version 1 of TRAFFIC WILL NOT run with COBOL V12.
By default, TFRCOB works with version 11 of COBOL. In order to make
it work with version 12, it must be reassembled with the constant
COB%VR set to 0.
COB%VR=-1, then COBOL V11
COB%VR=0, then COBOL V12
2 CHANGES TO THE ROUTING ROUTINES
During the previous year some minor fixes to the routing routines were
made and published. These are included along with some additions to
interface with version 12 of cobol and some code to pass capabilities
to created processes as a result of a call to IPRUNI. Since no large
changes were made in this module (IP20), no detailed discussion of the
changes will be made.
3 CHANGES TO THE FORMATTING ROUTINES
The formatting routines consist of four separate sources:
1. TFRUNV.MAC -- A MACRO universal file which contains symbol
definitions utilized in the other modules.
2. TFR.MAC -- A standalone forms compiler.
3. TFRCOB.MAC -- A collection of subroutines callable from COBOL
programs for gathering data entered at a terminal.
4. TFRTRM.V52 -- VT52 specific routines.
Because TRAFFIC-20 currently supports only VT52'S, and because a more
efficient interface could be made, TFRCOB.MAC and TFRTRM.V52 were
merged into one source module (TFRCOB.MAC).
3.1 Changes To TFRUNV.MAC
Some additional symbols were added to this module in the process of
making additions and corrections to the other modules. Thus this
version of TFRUNV should be compiled before compiling either TFR.MAC
or TFRCOB.MAC.
RELEASE 2 CHANGES AND COBOL V12 Page 8-3
3.2 Changes To TFR.MAC
The standalone forms compiler TFR.MAC had several had several problems
fixed.
1. Blank lines are allowed.
2. A blank FIELD parameter causes a name to be generated.
3. Most attributes were made independent from one another. Thus
YES-NO fields are not necessarily REQUIRED.
4. An addition was made to the record description file so that
it contains a field name to field number correspondence
table.
5. The field number was added to the summary listing.
In addition a new attribute was added for NUMERIC fields. This
attribute is:
LEADING-ZEROS or NO-LEADING-ZEROS
If a user does not specify this attribute for a NUMERIC field or
specifies NO-LEADING-ZEROS, then when the field is rewritten to the
screen right justified, leading zero's will be suppressed. If a
NUMERIC field has the LEADING-ZEROS attribute, then it will be
rewritten to the screen right justified and with high order zeros
where necessary.
3.3 Changes To TFRCOB.MAC
TFRCOB.MAC has received most of the attention in this release of
TRAFFIC-20. Several of the problems which were discovered with the
previous version have made it necessary to totally overhaul this
module. In doing this, the code has been streamlined and
documentation has been added. Customers who have made changes to the
current TRAFFIC should first determine if these changes are going to
be necessary (new features), and if they are, should go about making
the changes carefully. While the overall structure (routines, labels,
names) have been preserved, the exact implementation details of
TRAFFIC may have changed.
RELEASE 2 CHANGES AND COBOL V12 Page 8-4
3.3.1 Enhancements To TRAFFIC-20 -
Some of the customer made changes to TRAFFIC were becoming re-invented
at several sites, these enhancements have been incorporated as new
features. Features were also added to enhance the performance of
TRAFFIC applications.
INITIALIZATION OF WORKING STORAGE
Whenever TFRINI is called and an unprotected field (or fields) is
initialized, working storage is filled with ASCII blanks for
alphabetic and alphanumeric fields and with ASCII zeros for
numeric fields. Protected fields are unchanged.
BLANK FILLED NUMERIC FIELDS
When data is entered into numeric fields, it is rewritten right
justified. In the current implementation, this will cause
leading zeros to appear in the high order positions. In the new
version, the field will be written with leading zeros suppressed
unless the user overrides by using the LEADING-ZEROS attribute in
the forms description (see "Changes to TFR.MAC").
This only applies to NUMERIC and MONEY fields. Social security
numbers and dates continue to have leading zeros.
If a numeric field is tabbed over, nothing is rewritten. In a
MONEY field, at least one zero to the left of the decimal point
will be rewritten. As examples of blank filled numerics:
field: -------- entry: 345 rewrite: 345
field: -------- entry: -345 rewrite: -345
field: ----.--- entry: -345 rewrite: -0.345
field: ----.--- entry: rewrite: ----.---
field: -------- entry: rewrite: --------
WRITING TO UNINITIALIZED FIELDS
In version 1 of TRAFFIC-20, an error is returned if the program
attempts to write to a field which has not been initialized thru
TFRINI. In some applications, this is not desirable in that the
operator may want to correct some input value on a previous
screen. In these cases, the program must initialize the fields
and then write them. This wastes resources. Thus the default
condition is to allow the program to write to uninitialized
fields (with TFRWRT) and have them displayed on the screen. If a
field is written which is not on the screen, then a warning will
be returned in the ERROR variable (error 4). By changing a value
at assembly time, the old interpretation can be restored.
CORRECTING NEWLY ENTERED DATA
RELEASE 2 CHANGES AND COBOL V12 Page 8-5
Using the BLUE and RED keys, the operator can now back up over
previously entered fields in order to change them. The operator
cannot back up prior to the context of the current read operation
however. When backing up, the fields are not automatically
initialized and thus the user can decide whether or not to change
them on a field by field basis.
NEW SUBROUTINES
Four new subroutines have been added in order to increase the the
functionality of TRAFFIC-20 and to provide for higher
performance. These routines are fully described in the chapter
on Program Interaction With the Terminal.
1. TFRRNO -- Translation of Field Names to Field Numbers
2. Screen Control Subroutines
TFRSET -- resets the terminal to TRAFFIC'S desired
characteristics.
TFRRWT -- rewrites the screen (like using the black button).
3. TFRSYS -- System Variable Setting Routine
CONTROL KEYS
The left and right arrow keys function the same as backspace and
tab respectively. This makes it easier to enter data from the
numeric keypad. The up and down arrows and the carriage return
give an END-INDICATOR of five. The RUBOUT key is no longer
ignored and performs the same function as the Back Space key.
The XON/ and XOFF (CONTROL/Q and CONTROL/S) keys perform their
normal 'output pacing' function instead of being ignored.
PERFORMANCE IMPROVEMENTS
In addition to providing the new routines with which a user can
increase the performance of an application, many changes have
been made internally to increase the overall efficiency of
TRAFFIC.
The cost of reading characters from the terminal has been cut by
at least 40% by changing the monitor interface. Changes have
been made to eliminate unnecessary changing of data on the
screen. The most apparent such change will be that default
values for NUMERIC fields are no longer written when the user
aborts a read by typing a line-feed or carriage return.
Output thruput has been increased by buffer all output characters
RELEASE 2 CHANGES AND COBOL V12 Page 8-6
until the last possible moment and then sending them to the
terminal in one monitor call. The effect is especially noticable
when re-initializing a screen with filler characters.
Section and field tables have been added to limit the necessity
to interrogate every field in the form when the user is doing
accessing using a section number for field name. The section
table contains the first and last field in each section and the
field table contains a first and last field range based on the
entry to which a field name 'hashes'.
Some work has gone into making some of the screen writing
algorithms more optimal. However, making screen clearing smarter
is going to wait for another release of TRAFFIC-20.
HANDLING DIFFERENT FORM SIZES
When running with version 12 of COBOL, TRAFFIC requests space
from the common pool (as does the imbedded sort). If there is no
space available when the call is made, an error is returned. In
general this will mean that the programmer must re-layout memory.
Especially when overlay's are being used, the /SPACE parameter
might need to be adjusted. The errors associated with memory
are:
ERROR= 8 -- Error when PMAPing the form file.
ERROR=10 -- LIBOL could not find enough free pages.
3.3.2 Corrections To TFRCOB -
Several problems have been corrected. The most significant of these
deal with PREVIOUS-DUPE fields. A few minor problems (most of them
unreported) have also been fixed.
PREVIOUS DUPE
The PREVIOUS-DUPE problems in the current TRAFFIC appeared as an
erratic movement of the cursor during heavy loads and working
storage sometimes not matching the data on the screen.
These problems were corrected as a result of changing the monitor
interface used for reading from the terminal. PREVIOUS-DUPE now
works as documented and is no longer load sensitive.
SPACES IN ALPHABETICS
The old documentation stated that spaces should be allowed in
alphabetic only fields although it was not allowed. to
RELEASE 2 CHANGES AND COBOL V12 Page 8-7
compensate for this a new pair of attributes was added to the TFR
dialogue so that the user can either allow or disallow these
spaces in alphabetic fields. The attributes are 'SPACES' and
'NO-SPACES' respectively. NO-SPACES is the default.
LOWER CASE ALPHABETICS
Normally alphabetics are entirely upper case. Even if the
keyboard does not have the 'CAPS LOCK' key enabled, lower case
characters will be converted to upper case. By setting the
assembly switch OLD%LC to -1, lower case will be taken as is.
Note that fields like YES-NO fields demand upper case characters
and range checking is done strickly on collating sequence. This
implies that if the upper limit is 'ddddd' (lowercase) and the
operator types 'xxxxx' (uppercase), it will be accepted.
lower case can be enabled and disabled thru calls to tfrsys
dynamically while the program is running.
SIGNED NUMBERS
Entering a minus or plus sign does not work on MONEY fields in
the current TRAFFIC. In the new version, it is possible to enter
signs for all fields except those one character long. The field
length must be long enough for both data and sign; a one
character field is not big enough for both.
Plus signs are stripped from numerics before they are rewritten
to the screen right justified. Minus signs are rewritten to the
left of the first significant digit.
Negative numbers are stored in working storage with the least
significant character overpunched rather than with a leading
sign. This insures that the sign will stick with the number
even if it is then moved to a smaller variable with leading
digits truncated. Until edit 110, a leading sign was stored
with the variable.
RANGE CHECKING
Several problems were addressed with respect to range checking
and to the changing of range values.
1. Changing the range values with NUMERIC values now works.
2. Range checking with and for negative values works.
3. Turning range checking off and on works. This is done by
using TFRCHG in the following manner.
*turn off lower range checking.
MOVE LOW-VALUES TO RANGE-VALUE-OF-FIELD-FOO.
ENTER MACRO TFRCHG USING
'FIELD-FOO', 'LOWER-RANGE',
RANGE-VALUE-OF-FOO, ERROR.
*turn off upper range checking.
MOVE LOW-VALUES TO RANGE-VALUE-OF-FIELD-FOO.
ENTER MACRO TFRCHG USING
RELEASE 2 CHANGES AND COBOL V12 Page 8-8
'FIELD-FOO', 'UPPER-RANGE',
RANGE-VALUE-OF-FOO, ERROR.
*turn back on range checking.
ENTER MACRO TFRINI USING
'FIELD-FOO',FORM-NAME,ERROR.
It is important to note that this procedure does not destroy
the range values being used by TRAFFIC for the field. By
using section numbers instead of the field name used in the
example it is possible to turn off range checking for the
whole form or for a section.
4. Range checking of all dates is now in strict chronological
order.
VALUES CLAUSES IN FORM FILE
Values specified in the VALUE attribute for PROTECTED NUMERIC
fields are now displayed right justified.
The values specified in VALUE attributes for NON-PROTECTED fields
are cleared when the field is first initialized. Thus, they are
not used, nor do they cause any side effects.
CHANGING FIELD TYPES
Changing a field type from NUMERIC or ALPHABETIC to ALPHANUMERIC
now works.
CHANGING FIELD ATTRIBUTES
According to the documentation, attributes changed by the program
are supposed to be reset to the settings specified in the form
when the field is initialized with a call to TFRINI. In the
current TRAFFIC, this only happens if such a call changes the
form. In the new implementation this means that all attributes
will be reset and range checking will be re-enabled (if
applicable).
As an example, if a PROTECTED field is made NON-PROTECTED by a
call to TFRCHG, then a call to TFRINI will make it PROTECTED
again.
If users have been utilizing the fact that the attributes are not
reset (even though the documentation states that they should be),
then TFRCOB can be assembled to reflect this anomaly.
ATTRIBUTE COUPLING
RELEASE 2 CHANGES AND COBOL V12 Page 8-9
In the current TRAFFIC certain attributes are coupled together
without the documentation indicating that they should be. Thus
YES-NO fields are always REQUIRED. In the new implementation,
most of these attributes are independent. Specifically this
means:
1. YES-NO fields are not REQUIRED unless specified.
2. Having a range check on a field will not automatically make
it REQUIRED. If anything is entered, then it will be range
checked. If the field is tabbed over, and the field is
OPTIONAL, then the range checks will not be applied.
3. A field with the attribute of FULL, must have