SETL (Set Limits) Macro

The macro initiates the mode for sequential retrieval and initializes ISAM to begin retrieval at the specified starting address.

Note: Sequential processing must always be terminated by issuing an ESETL macro. The ESETL (end set limit) macro should be issued before issuing a READ or WRITE if ADDRTR and RANSEQ, or both, are specified in the same DTF. Another SETL can be issued to restart sequential retrieval.

Format

Read syntax diagramSkip visual syntax diagramnameSETLfilename( r1),id_name( r2)KEYBOFGKEY

Requirements for the caller

AMODE:
24
RMODE:
24
ASC Mode:
Primary

Parameters

filename | (r1)
Specifies the same name as that used in the DTFIS header entry, as a symbol or in register notation. Register notation is necessary if your program is to be self-relocating.
id-name | (r2)
Specifies that processing is by record ID. The operand specifies the symbolic name of the 8-byte field in which you supply the starting (or lowest) reference for ISAM use. This field contains the information that is shown in Table 1.
KEY
Specifies that processing begins with a key you supply. The key is supplied in the field that is specified by the DTFIS KEYARG operand. If the specified key is not present in the file, an indication is given at filenameC.
BOF
Specifies that retrieval is to start at the beginning of the logical file.
GKEY
Indicates that selected groups of records within a file that contains identical characters or data in the first locations of each key can be selected. GKEY allows processing to begin at the first record (or key) within the wanted group.

You must supply a key that identifies the significant (high order) bytes of the required group of keys. The remainder (or insignificant) bytes of the key must be padded with blanks, binary zeros, or bytes lower in collating sequence than any of the insignificant bytes in the first key of the group to be processed. For example, a GKEY specification of D6420000 would permit processing to begin at the first record (or key) containing D642xxxx, regardless of the characters that are represented by the x's.

Your program must determine when the generic group is completed. Otherwise, ISAM continues through the remainder of the file.

Note: If the search key is greater than the highest key on the file, the filename status byte is set to X'10' (no record found).
Table 1. Field Supplied for SETL Processing by Record ID
Byte Identifier Contents in Hexadecimal Information
0 m 02-F5 Number of the extent in which the starting record is located.
1-2   0000 (disk) Always zero for disk.
3-4 cc Cylinder number for disk
0000-00C7 For IBM® 2311, 2314/2319: 0-199
0000-0193 For IBM 3330/3333: 0-403
0000-015B For IBM 3340 with 3348 Model 35: 0-347
0000-02B7 For IBM 3340 with 3348 Model 70: 0-695
5-6 hh Head position for disk
0000-0009 For IBM 3221
0000-0013 For IBM 2314/2319
0000-0012 For IBM 3330/3333
0000-000B For IBM 3340
7 r 01-FF Record location