Variable format records

With the exception of H records, which are fixed format records, all records are variable format records:

Indicator
Record type
V
Data value (see Data value records (V))
T
Data table description (see Data table description records (T))
R
Table row (see Table row records (R))
E
End of object (see End-of-object record (E))
*
Application data (see Application data record (*))
L
Report line (see Report line records (L))
C
Data continuation (see Data continuation records (C))

Variable format records are accepted on input. This refers to the records themselves, not the files, data sets, or CICS data queuesthat contain the records. Variable format records have the following general form:

Control area is to the left of Record data area

The control area is:

Byte position
Description
01
Record identifier (H,V,T,R,E,*,L,C)
02
Blank (sometimes omitted; see specific type of variable format record)

The record data area is a variable length area containing information about that specific record. Fields in this area are separated by a delimiter (a blank character is used in this book).

Data value records (V)

Value records are used to provide a value for a single field in an object, such as blank lines before the heading in the form. V records contain:

Appendix B. Export/Import Formats lists the assignments of field numbers to the fields contained in the prompted query, form, and report objects.

The contents of a V record are:

Control area for V records:

Byte Position
Description
01
Value record identifier (V)
02
Blank (used only for reports, omitted for forms and prompted query)

Record data area for V records

Byte position
Description
01
Blank
02-05
Field number (1001-9999)
06
Blank
07-09
Length of the data value (000-999). Can also be an asterisk (*) followed by two blanks. An asterisk indicates that the data value is delimited by the end of the record.
10
Blank
11-end
Data
Notes:
  1. Record data area byte positions are offset from the end of the control area, the length of which is indicated in the header record.
  2. An omitted data value (an end-of-record or only blanks following the length field) indicates that the field contains a null value.
  3. If the length field is zero, the default value for the field is applied and a warning message is issued.
  4. If the specified length is different from the actual data that follows, QMF issues a warning.
Examples of V records

Form: V 1511 * NONE

(See page Table and field numbers for the form object for a complete list of field numbers.)

Field
Width of wrapped report lines
Value
'NONE'

Report: V 1001 006 PERIOD

(See page Table and field numbers for the report object for a complete list of field numbers.)

Field
Profile DECIMAL option
Length
6
Value
'PERIOD'

Prompted query: V 1501 001 K

(See page Table and field numbers for the prompted query object for a complete list of field numbers.)

Field
Duplicate rows
Length
1
Value
keep

Data table description records (T)

In the encoded format, most data in an object appears in tables. These are not relational tables in the database, but rather a means of grouping information within the encoded format.

Each T record defines one table, and each table corresponds to a particular part of an object, such as summary calculations in the form. Thus, one exported file can contain many of these encoded tables. See Appendix B. Export/Import Formats for information about field numbers for encoded tables and their columns.

A T record is always followed by R records. The T record describes the R records that follow it. If there are no R records following a T record, the table is omitted.

Be sure your application program refers to the contents of tables of an exported form, report, or prompted query by using the encodings in the T record to correctly locate the values in the R records. Your application program should not use fixed offsets to locate information in R records.

The contents of a T record are as follows:

Control area for T records:

Byte position
Description
01
Table record identifier (T)
02
Blank (used only for reports, omitted for forms and prompted queries)

Record data area for T records

The byte positions in the following list are offsets following the end of the control area, the length of which is indicated in the header record.

Byte position
Description
01
Blank
02-05
Table number (1001-9999)
06
Blank
07-09
The number of rows (R records) in this table. An asterisk (*) used instead of a numeric value means that the table consists of all the R records that follow.
10
Blank
11-13
The number of columns in the record (000-999)
14
Blank
15-18, 24-27, ...
The field number for this column (repeating field)
19, 28, ...
Blank (repeating field)
20-22, 29-31, ...
The length of the data values in this column (repeating field)

Bytes 11-13 (number of columns) indicate how many field number/data value length pairs follow; this means that the information in bytes 15 through 22 is repeated for each column.

Examples of T records (Form)

T 1110 * 002 1112 007 1113 018

(See page Table and field numbers for the form object for a complete list of field numbers.)

Field
Column heading table
Rows
All
Columns
2
Column field
Column data type
Length
7
Column field
Column heading
Length
18
Examples of T records (Prompted Query)

T 1110 008 002 1112 001 1113 027

(See page Table and field numbers for the prompted query object for a complete list of field numbers.)

Field
Table definitions table
Rows
8
Columns
2
Column field
Table ID
Length
1
Column field
Table name
Length
27
Examples of T records (Report)

T 1010 005 003 1012 008 1013 003 1014 006

(See page Table and field numbers for the report object for a complete list of field numbers.)

Field
Formatted report table
Rows
5
Columns
3
Column field
BREAKn
Length
8
Column field
Edit code for data
Length
3
Column field
Starting position for field contain data
Length
6
Rules and notes:
  1. When a form or prompted query is imported, the number of R records must match the row count specified in bytes 07-09 of the record data area of the T record. Otherwise, QMF issues a warning.
  2. When a form or prompted query is imported, the number of columns indicated in bytes 11-13 must agree with the field number/length pairs in the bytes that follow. If not, QMF issues a warning.
  3. The number of field number/length pairs is limited to the number of columns in the table, and their order is arbitrary.
  4. Columns with a length of zero (or not included in this table) are set to their default values when the object in the temporary storage area is updated and a warning is issued. This is not always true for Prompted Query. Where possible, a default is supplied; otherwise an error occurs.
  5. To set a column field to blank, the column must have a positive length in the T record and a blank value in the R record.

Table row records (R)

R records provide a set of values for a single row in an encoded table. R records contain a list of values arranged in an order described by the associated T record. An R record matches the description of the positions and lengths of the data values specified in the T record. The contents of an R record are as follows:

Control area for R records:

Byte position
Description
01
Row record identifier (R)
02
Blank (used only for reports, omitted for forms and prompted queries)

Record data area for R records

Following the control area, the data area for R records consists of a series of values separated by a delimiter (blank character). The format is as follows:

_val.._val..._val..

where val... is the data value for this row and column and _ is the delimiter.

Examples of R records

In these examples, the length of the column value is always given in the T record for that column.

Form: R 2 SALARY

(See page Table and field numbers for the form object for a complete list of field numbers.)

Column Value
' 2'
Column Value
'SALARY'

Report: R GROUP L2

(See page Table and field numbers for the report object for a complete list of field numbers.)

Column Value
'GROUP '
Column Value
'L2'

Prompted query: R C A.DEPT

(See page Table and field numbers for the prompted query object for a complete list of field numbers.)

Column Value
'C'
Column Value
'A.DEPT'
Rules and notes:
  1. An R record must immediately follow another R or a T record.
  2. The number of data values (v..v) must match the description in the associated T record.
  3. A data value length of zero in the associated T record indicates that no value is to be applied to this row and column of the object; that is, it is set to its default value. However, the presence of the field in the T record requires that the R record contain an extra blank for this field (a zero-length value results in one blank followed by another in the R record).

End-of-object record (E)

The E record specifies the end of an exported object. It is the last record of an exported file, appearing as the character E. For an exported report, an E record is followed by a blank character to complete its control area. For a form, the blank is omitted.

Any records following the E record are ignored. If an E record is not included with the file being imported, QMF assumes that end-of-file implies the end of the object.

[ Previous Page | Next Page | Contents | Index ]