Previous Topic: Data RetrievalNext Topic: Logical Records


SELECT (IDMS access mode)

In order to use SELECT to access SQL tables, you must set the access switch to idms.

How to specify the access switch:

The access switch can be set in the following ways:

  1. At system generation time
  2. For an individual user in the Dictionary (IDD)
  3. For the session, interactively (or until the switch is changed)

Note: For more information about setting the access switch, see SET.

Allowing MRR:

Multiple Record Retrieval (MRR) must be allowed before you can use the SELECT (IDMS access mode) statement.

MRR is set in the Dictionary (IDD) with the USER statement.

Note: For more information about the the USER statement, see the CA IDMS IDD Quick Reference Guide.

SELECT (OLQ access mode)

Retrieving

The SELECT (OLQ access mode) statement allows you to retrieve multiple records with one command and also to sort and group the information during retrieval.

To enable use of SELECT, set the multiple record retrieval option in IDD. The syntax for the IDD statement is:

ADD/MODIFY USER user-name ...
MRR IS ALLOWED

Sorting

The ORDER BY clause of the SELECT statement allows you to sort information during retrieval instead of after retrieval. Sorting during retrieval eliminates the need for entering sort commands after the report is built.

To use the ORDER BY clause you must allow sorts through IDD. If the sort option in IDD is not allowed, your users cannot use the ORDER BY clause of the SELECT statement. The syntax for the IDD statement is:

ADD/MODIFY USER user-name ...
SORT IS ALLOWED

Note: The DISTINCT option implies that CA OLQ does a SORT