Service Group Application Reference

Service Group Application Reference

Operation - Function 1

Operation - Function 1

Function 1
is used to develop or modify and test a Scheme without needing to alter the Scheme definition file.
The user calls the
DEBUG
Service with the name of a Scheme and a dynamic Scheme definition. Later calls to the Matching Service from the same application, or another application using the same Service Group, and which use the same Scheme, will use this dynamic definition instead of the one from the Scheme definition file.
The structure of the dynamic Scheme definition is identical to the structure of the Scheme definitions in the Schemes table. It is a sequence of names and numbers which are interpreted by the Matching Service routine. All names are 8 bytes long and all numbers are 4-byte binary. The following is a COBOL data description of the parameters passed to the
DEBUG
Service:
BINARY fields are four bytes in length.
01 SCHEME 02 METHOD OCCURS 3 TIMES 03 NAME PIC X(8) 03 WEIGHT BINARY 03 GLOBAL-OPTIONS BINARY 03 LOCAL-OPTIONS BINARY 03 EXTRA-OPTIONS BINARY 03 FIELD 04 OFFSET BINARY 04 REP BINARY
This defines space for a Scheme with two Methods (plus a third used as a terminating entry). You store the method name in the
NAME
field, then fill in the weight for each, assign options and define the field offsets. The
OFFSET
will hold the field offset in the record.
REP
should be set to zero. The last method
NAME
entry is mandatory and must be set to all blanks; it defines the end of the methods list for a Scheme.
In COBOL one would write something like the following code example if the first field in a record is a 50 bytes name and the next field is a 8 byte string, to be matched with equal weights:
MOVE "LPERS " TO NAME(1) MOVE 50 TO WEIGHT(1) COMPUTE GLOBAL-OPTIONS(1) = 65536 * 50 MOVE 0 TO LOCAL-OPTIONS(1) MOVE 0 TO EXTRA-OPTIONS(1) MOVE 0 TO OFFSET(1) MOVE "STRING " TO NAME(2) MOVE 50 TO WEIGHT(2) COMPUTE GLOBAL-OPTIONS(2) = 65536 * 8 MOVE 0 TO LOCAL-OPTIONS(2) MOVE 0 TO EXTRA-OPTIONS(2) MOVE 50 TO OFFSET(2) MOVE " " TO NAME(3) CALL "N3SGUS" USING "DEBUG " RC "1" "PERSZIP " SCHEME WORK AREA.
This Call redefines the Scheme "
PERSZIP
". Later you will access the new Scheme with code something like this.
CALL "N3SGUS" USING "MATCH " RC "1" "PERSZIP " MATCH SREC FREC WORK AREA.

Binary Values for Matching Options

The Global- (GOPT), Local- (LOPT) and Extra- (XOPT) Options are coded as 32 bit words. The options are controlled by setting various bits and/or bytes within these words.
The layout of these 32-bit words are documented in the file
ssascrm
. Each line in this file relates an option to its bit position within the appropriate Option Word (GOPT, LOPT, XOPT). The options which are represented by a byte are marked with a
*N
under the
USAGE
column. All other options are represented by bit fields.
Options represented by bit fields can be enabled by adding the desired options together and storing the result in the option word. This is possible because each bit position is unique within the option word.
Options which occupy a
byte (*N)
can be enabled by multiplying the option name by the value to be inserted. For example, if you look at the
ssascrm
file you will see the following line listed under the
GLOBAL OPTIONS
:
LENGTH EQU X’00010000’ 8 *N\index{EQU!used in SSASCRM}
This line equates the constant
LENGTH
with the value 00010000hex or 65536dec. When
LENGTH*50
is specified in the Global Options section of a Scheme Definition we are actually saying, "put the value 65536x50 into the global options word"
This has the effect of placing the value 50 in the third byte of the four-byte options word. It is valid to combine addition with multiplication to enable bit and byte fields. For example,
GOPT=(LENGTH*32+REFMIN)

0 COMMENTS

We’d like to hear from you!