Version 7.4.4
 —  Command Reference  —

S8 Command: Process ISN Lists

The S8 command combines two ISN lists from the same file with an AND, OR, or NOT operation. For more information refer to the section ISN List Processing.

This document covers the following topics:


Function and Use

The S8 command performs logical processing on two ISN lists that were previously created with Sx commands. Both ISN lists must be

ISN lists resulting from an S2 or S9 command that are not in ascending ISN sequence cannot be used.

No activity (access or update) may be performed on the ISN lists to be processed between the time they are created and the time the S8 command is executed.

The S8 command may be used to perform the following logical operations:

Operator The resulting ISN list contains those ISNS that are present in . . .
AND both ISN lists
OR either of the ISN lists
NOT the first ISN list but not the second ISN list

The resulting ISNs are returned in the ISN buffer and/or stored on the Work dataset in ascending ISN sequence, depending on the specified command option and the command ID field setting:

Top of page

Command: S8

User Control Block

Field Position Format Before Adabas Call After Adabas Call
  1-2 -- -- --
COMMAND CODE 3-4 alphanumeric F U
COMMAND ID 5-8 alphanumeric F U
FILE NUMBER 9-10 binary F U
RESPONSE CODE 11-12 binary -- A
ISN 13-16 binary -- A
ISN LOWER LIMIT 17-20 binary F U
ISN QUANTITY 21-24 binary -- A
  25-32 -- -- --
ISN BUFFER LENGTH 33-34 binary F U
COMMAND OPTION 1 35 alphanumeric F U
COMMAND OPTION 2 36 alphanumeric F U
ADDITIONS 1 37-44 alphanumeric F U
  45-48 -- -- --
ADDITIONS 3 49-56 alphanumeric F A
  57-72 -- -- --
COMMAND TIME 73-76 binary -- A
USER AREA 77-80 -- -- U

User Buffer Areas

Buffer Before Adabas Call After Adabas Call
FORMAT BUFFER * --
RECORD BUFFER * --
SEARCH BUFFER * --
VALUE BUFFER * --
ISN BUFFER -- A

where:

F Filled in by user before Adabas Call
A Filled in by Adabas
U Unchanged after Adabas call
* Not used but must be included in parameter list of call statement

Top of page

Control Block

Command Code

S8

Command ID

A nonblank, nonzero command ID must be specified in this field if a command option is specified in command option 1 field:

For more information refer to the section ISN List Processing.

The first byte of this field may not be set to hexadecimal 'FF'.

File Number

The number of the file from which both ISN lists to be processed were obtained.

Response Code

Adabas returns the response code for the command in this field. Response code 0 indicates that the command was executed successfully. Non-zero response codes, which can also have accompanying subcodes returned in the rightmost half of the additions 2 field, are described in the Adabas Messages and Codes documentation.

ISN

Adabas returns the first ISN of the resulting ISN list in this field. If there were no resulting ISNs, this field is not modified. This applies to both the initial call and any subsequent calls that are used to retrieve ISNs from the Adabas Work dataset.

ISN Lower Limit

This field may be used in an initial Sx call to limit the resulting ISN list to those ISNs that are greater than the ISN specified in this field. If this field is set to zeros, Adabas returns all qualifying ISNs.

This field is also used when a group of ISNs from a saved ISN list is being retrieved from the Adabas Work dataset.

ISN Quantity

As a result of an initial S8 call, this field returns the number of ISNs in the resulting ISN list.

As a result of a subsequent S8 call to retrieve ISNs from the Adabas Work dataset, this field contains the number of ISNs returned in the ISN buffer.

ISN Buffer Length

The ISN buffer length (in bytes). This length is used to determine the number of ISNs placed in the ISN buffer.

If this field is set to zeros, no ISNs are inserted in the ISN buffer. This field should be set to zeros if the resulting ISN list is to be read with the GET NEXT option of the L1/L4 command, or if the command is being issued only to determine the number of qualifying records.

If a non-zero value is specified, it should be a multiple of 4. If it is not, Adabas reduces the length to the next lower integer which is a multiple of 4.

Command Option 1: Save ISN List Option, Release Command ID Option
Option Description
H (save-ISN-list) stores the entire ISN list resulting from an S8 command on the Adabas Work under the specified command ID. A valid command ID must be specified. If no command ID is specified, the ISN list is not stored on Work and any ISNs not saved in the ISN buffer are lost.
I releases the command ID (CID) value specified in the command ID field and any related ISN list as the first action taken during the S8 execution. The specified command ID is released only from the table of ISN lists. The same command ID is then reused to identify the resulting list of ISNs.
Command Option 2: Logical Operator

The value entered in this field indicates the logical operation to be performed on the ISN lists:

Option Operation The resulting ISN list contains those ISNs that are present in ...
D AND both ISN lists.
O OR either ISN list.
N NOT the first ISN list but not the second ISN list.
Additions 1: Command IDs

The command IDs that identify the ISN lists to be processed must be specified in this field (four bytes per command ID). Each ISN list must be currently stored on the Adabas Work dataset and should contain ISNs from the same file.

Additions 3: Password

This field is used to provide an Adabas security or ADAESI password. If the database, file, or fields are security-protected, the user must provide a valid security or ADAESI password. Adabas sets the additions 3 field to blanks during command processing to enhance password integrity.

Top of page

ISN Buffer

Adabas places the list of resulting ISNs in this buffer. Each ISN is returned as a four-byte binary number. The ISNs are returned in ISN sequence.

If the ISN buffer is too small to contain all the resulting ISNs and a non-blank, non-zero command ID was used, Adabas stores the overflow ISNs on the Work dataset. These ISNs can be retrieved with further Sx calls using the same command ID. For more information refer to the section ISN List Processing.

Top of page

Example

Perform a logical OR operation between two ISN lists to produce a third ISN list that contains ISNs present in either list. The ISN lists to be processed were stored on the Adabas Work dataset under the command IDs "U020" and "U021". Store the resulting ISN list on the Adabas Work under the command ID "U999". Use the save-ISN-list option.

Control Block

Command Code S8  
Command ID U999 store the resulting ISN list under the command ID U999
ISN Lower Limit 0 select all of the resulting ISNs
ISN Buffer Length 0 no ISNs are to be returned in the ISN buffer
Command Option 1 H use the save-ISN-list option
Command Option 2 O perform an OR operation
Additions 1 U020U021 process the ISN lists identified by the command IDs U020 and U021
Additions 3 bbbbbbbb file not security-protected

Top of page