Previous Topic: FIND / GET MOST RECENTNext Topic: FIND / GET OWNER WITHIN SET


FIND / GET PHYSICAL SEQUENTIAL

FIND/GET PHYSICAL SEQUENTIAL retrieves records based on their physical position in a database area.

Access mode: The syntax below is invalid when the access switch is set to IDMS.

FIND locates database records but does not retrieve them into the report file. GET locates database records and does retrieve them into the report file.

Syntax:

►►─┬─ FINd ─┬─┬─────────────────────────────┬─┬─ PHYsical ────────────┬───────►
   └─ GET ──┘ ├─ FIRst ─┬────────────────┬──┤ ├─ SEQuential ──────────┤
              │         └─ record-count ─┘  │ └─ PHYsical SEQuential ─┘
              ├─ LASt ─┬────────────────┬───┤
              │        └─ record-count ─┘   │
              ├─ NEXt ◄ ─┬────────────────┬─┤
              │          └─ record-count ─┘ │
              ├─ PRIor ─┬────────────────┬──┤
              │         └─ record-count ─┘  │
              └─ ALL ───────────────────────┘

 ►─┬────────────┬─ record-name ─┬────────────────┬─ records ──────────────────►
   └─ view-id. ─┘               └─ (field-list) ─┘

 ►─┬──────────────────┬───────────────────────────────────────────────────────►◄
   └─ WHEre criteria ─┘
►►─── REPeat with ─┬────────────────────────────┬─────────────────────────────►
                   ├─ FIRst ─┬────────────────┬─┤
                   │         └─ record-count ─┘ │
                   ├─ LASt ─┬────────────────┬──┤
                   │        └─ record-count ─┘  │
                   ├─ NEXt ─┬────────────────┬──┤
                   │        └─ record-count ─┘  │
                   ├─ PRIor ─┬────────────────┬─┤
                   │         └─ record-count ─┘ │
                   └─ ALL ──────────────────────┘

 ►─┬─────────────────────────────────────────────────┬─ records ──────────────►
   └─┬────────────┬─ record-name ─┬────────────────┬─┘
     └─ view-id. ─┘               └─ (field-list) ─┘

 ►─┬──────────────────┬───────────────────────────────────────────────────────►◄
   └─ WHEre criteria ─┘

Parameters:

FIRST record-count

Retrieves the first n (where n defaults to 1) records at the beginning of the database area containing the named record type. The records retrieved are those with the lowest dbkey values.

LAST record-count

Retrieves the last n (where n defaults to 1) records at the end of the database area containing the named record type. The records retrieved are those with the highest dbkey values.

NEXT record count

Retrieves the next n (where n defaults to 1) occurrences of the named record type with the next-highest dbkey value. Currency for retrieval is based on the last record retrieved in the same database area. If currency has not been established, record retrieval cannot occur and no report file is built.

Note: Because NEXT records are retrieved based on current of area, the record retrieved may not always be the record required.

PRIOR record-count

Retrieves the previous n (where n defaults to 1) occurrences of the named record type with the next lower dbkey value. Currency for retrieval is based on the last record retrieved in the same database area. If currency has not been established, record retrieval cannot occur and no report file is built.

Note: Because PRIOR records are retrieved based on current of area, the record retrieved may not always be the record required.

ALL

Retrieves all occurrences of the specified record type within its associated database area.

PHYSICAL SEQUENTIAL

Specifies a serial sweep of the database. PHYSICAL and SEQUENTIAL are synonymous keywords; one is required, but both can be specified.

(field-list)

Specifies the fields within record-name to be displayed in the report file. Field-list must be enclosed in parentheses.

WHERE

Specifies criteria to be used by CA OLQ to select record occurrences.

REPEAT

Duplicates an immediately preceding FIND/GET PHYSICAL (or REPEAT for FIND/GET PHYSICAL) command.

FIRST record-count

Specifies that the first n records be retrieved.

LAST record-count

Specifies that the last n records be retrieved.

NEXT record-count

Specifies the next n records be retrieved.

PRIOR record-count

Specifies the prior n records be retrieved.

ALL

Specifies that all of the records be retrieved.

view-id

The qualifying ID for the record or logical record name. Use view-id when you are signed on to multiple subschemas. View-id refers to the subschema where the record (or logical record) can be found.

record-name

Specifies the database record type:

If no parameters are specified, the previous command is duplicated. If the field-list parameter or WHERE clause is used, record-name must also be specified.

Examples:

The following examples illustrate the use of the FIND/GET and associated REPEAT commands, based on the set occurrence diagram shown below:

Illustrate the use of the FIND/GET and associated REPEAT commands, based on the set occurrence diagram

For more information:

Global Syntax