Previous Topic: When to UseNext Topic: Example JCL (Summary REFGROUP Report TYPE=S)


How to Use

To obtain a REFGROUP report, execute the REPORT function with the following command format:

►►─ REPORT ─ REFGROUP=n,TABLE=tname,DBID=dbid,TYPE= ─┬─ D ─┬──────────────────►
                                                     ├─ K ─┤
                                                     └─ S ─┘

 ►─┬──────────────────┬───────────────────────────────────────────────────────►◄
   ├─ ,FIRSTKEY= ─ n ─┤
   └─ ,LASTKEY= ─ n ──┘

Command

REPORT

Invokes the REPORT function.

Required Keywords

REFGROUP=n

Specify the number of blocks to treat as a reference group.

Valid Entries:

2 through 100

Default Value:

(No default)

,TABLE=tname

Specify the name of the table that you want to use. The area in which the table resides must be loaded with URI=YES. If you attempt to generate a REFGROUP report and the area was not loaded with URI, an error occurs and a return code is generated.

Valid Entries:

a valid table name

Default Value:

(No default)

,DBID=

Specify the name of the DBID that you want to use.

Valid Entries:

a valid DBID

Default Value:

(No default)

,TYPE=

Three types of reports are possible, indicated with D, K, or S. Summary reports a (TYPE=S) echo the DBUTLTY parameter specifications (standard within DBUTLTY) and process the entire data table to produce several summary rows. Detail reports (TYPE=D) echo the DBUTLTY parameter specifications (standard within DBUTLTY), process the entire data table, and create one detail row for each reference group as well as several summary rows. TYPE=K detail reports also include key value information.

Valid Entries:

D, K, or S

Default Value:

(No default)

Optional Keywords

,FIRSTKEY= and/or ,LASTKEY=

You can use FIRSTKEY= and/or LASTKEY= to limit REFGROUP to a segment of the specified key. We recommend you allow FIRSTKEY=/LASTKEY= to default. REFGROUP normally defaults to include the full specified key range from low values to high values. FIRSTKEY= overrides the default starting position while LASTKEY= overrides the default ending position, limiting what is processed by REFGROUP. If one keyword is specified and the other is not specified, a default value is selected for the missing keyword. Normal CA Datacom key lengths are from 1 through 180 bytes. The key value data entered for FIRSTKEY= and LASTKEY= can be from 0 (zero) through 59 bytes long. You only need to code the number of positions of the key value that are significant to you, but be aware that the value coded is left justified regardless of key field data type. The utility pads the low order or remaining positions of the key value with low values on FIRSTKEY= and high values on LASTKEY=. To use the entire key in one step, specify neither FIRSTKEY= nor LASTKEY=. Alternately, you could specify FIRSTKEY=00 and/or LASTKEY=00 to cause processing to start at low values and end at high values. The length of zero indicates that the padded key values (low values and high values) are to be used.

The data is not edited or interpreted. Therefore, if the key value data you need to enter is in binary, you must set up the JCL using a hexadecimal mode display and enter the key value data in hexadecimal. This data can contain blanks, commas, and any other special characters. CA Datacom/DB cannot edit this data for syntax, so the control statement can look invalid, especially when it includes blanks or commas or key value data containing English words. For example, FIRSTKEY=12121212121212 means the length is 12, key value is 121212121212. Another example, FIRSTKEY=10FIRSTKEY10 means the length is 10, key value is FIRSTKEY10.

Valid Entries:

A 2-byte length (in a range of 00 through 59) followed by a character string of key value bytes (for the length specified) that represents the key value.

Default Value:

The starting/ending position of the full key range from low to high values.