Exporting a form

The form object contains all the information specified in all the QMF form panels. When you export a form, QMF converts to the encoded format any form panels whose values deviate from the default values.

The following panels are in the encoded format only if you modified the panel:
  • FORM.BREAKn, where n = 1-6
  • All variation panels greater than 1 for FORM.DETAIL

Eliminating unused panels from the externalized format helps you save space on your system.

Creating a default form to see example export results

You can create a default form by running any query that creates an empty report, such as the query shown here:

When QMF displays the report, enter EXPORT FORM TO DEFAULT (including the QUEUETYPE=xx parameter in CICS®).

How the exported form looks

Your data set or CICS data queue named DEFAULT contains the information shown in this sample format of an exported form:

H QMF 20 F 04 E V W E R 01 03 13/01/15 16:20
T 1110 001 011 1112 007 1113 040 1114 007 1115 006 1116 005 1117 005 1118 003 1119 008 1120 008
  1122 006 1121 050
R CHAR    JOB                                              2      5     C     1   DEFAULT  
V 1201 001 0
V 1202 001 2
T 1210 001 003 1212 004 1213 006 1214 055
V 1301 001 2
V 1302 001 0
T 1310 001 003 1312 004 1313 006 1314 055
V 1401 002 NO
V 1402 001 1
V 1403 001 0
T 1410 001 003 1412 004 1413 006 1414 055
R 1    RIGHT
V 1501 001 1
V 1502 003 YES
V 1503 003 YES
V 1504 003 YES
V 1505 003 YES
V 1506 003 YES
V 1507 003 YES
V 1508 003 YES
V 1509 003 YES
V 1510 003 YES
V 1511 004 NONE
V 1512 002 NO
V 1513 007 DEFAULT
V 1514 002 NO
V 1515 004 NONE
V 2790 001 1
V 2791 003 YES
V 2805 003 YES
T 2810 001 003 2812 004 2813 006 2814 055
R 1    LEFT
V 2901 002 NO
V 2902 001 1
V 2904 001 0
V 2906 002 NO
V 2907 002 NO
T 2910 001 003 2912 004 2913 006 2914 055
R 1    LEFT
V 3080 001 1
V 3101 002 NO
V 3102 002 NO
V 3103 001 0
V 3104 001 0
T 3110 001 003 3112 004 3113 006 3114 055
R 1    LEFT
V 3201 002 NO
V 3202 001 1
V 3203 001 0
V 3204 001 1T 3210 001 003 3212 004 3213 006 3214 055
R 1    RIGHT
V 3080 001 2
V 3101 002 NO
V 3102 002 NO
V 3103 001 0
V 3104 001 0
T 3110 001 003 3112 004 3113 006 3114 055
R 1    LEFT
V 3201 002 NO
V 3202 001 1
V 3203 001 0
V 3204 001 1
T 3210 001 003 3212 004 3213 006 3214 055
R 1    RIGHT

You can import your default data set or CICS data queue every time you log on by issuing the command IMPORT FORM FROM DEFAULT (including the QUEUETYPE=xx parameter in CICS) in your initial procedure.

Interpreting the header record in the exported data set or queue

The following example shows a header record for a QMF form:
H QMF 20 F 04 E V W E R 01 03 13/01/15 16:20

This table explains the example.

Table 1. Example of a form header record
Value from example Description
H QMF 20 F This record is a QMF form header record for Version 13.1.
04 The structure of the form is at object level 4.
E The format is encoded (the format used for exported forms, reports, and prompted queries).
V The exported form does not contain any errors or warnings.
W The file contains the entire form.
E The national language in use when the object was exported is English.
R When importing, the object in temporary storage is replaced.
01 The length of the control area is 1 byte.
03 The length of integer length fields is 3 bytes.

The date stamp specifies January 15, 2013.


The timestamp specifies a time of 4:20 PM.

When you export a form from a non-English session, you can either export the form in the current session language or in English. So, the national language identifier in the H record might not reflect the language of the session from which you exported the form.

Interpreting the records of the exported form

How the exported form looks shows an example of an exported form. The exported form contains V, T, and R records whose associated codes have special meanings to help you interpret the exported result. This table explains each field and code in the exported form.

Field 3080, a V record, acts as a trigger for the break panels that follow it. This record appears once for every break panel in your form. The value of the field reflects the number of the break panel that the fields that follow field 3080 describe.

Table 2. Table and field numbers for an exported FORM object
Table or field number Record type Description Form panel
1110 T Column headings table FORM.COLUMNS
1112 R Column data type

The column data type is not displayed on the form panels but is associated with the form in its external format.

The column data type is not required when a form is imported. If it is missing during import, CICS provides default data type information from the edit codes. (For more information, see Importing a form object.)

During export, the column data type QMF provides is based on the specified edit code. For edit codes U, V, M, or invalid edit codes, QMF specifies the data type keyword UNKNOWN. Table 3 shows the data type keywords that QMF uses.

1113 R Column heading FORM.COLUMNS
1114 R Column usage code FORM.COLUMNS
1115 R Column indentation FORM.COLUMNS
1116 R Column width FORM.COLUMNS
1117 R Column edit code FORM.COLUMNS
1118 R Column sequence FORM.COLUMNS
1119 R Column heading alignment FORM.COLUMNS
1120 R Column data alignment FORM.COLUMNS
1121 R Column definition FORM.COLUMNS
1122 R Pass nulls on column definition FORM.COLUMNS
1180 T Summary calculations table FORM.CALC
1182 R Calculation identification number FORM.CALC
1183 R Summary calculation expression FORM.CALC
1184 R Summary calculation width FORM.CALC
1185 R Summary calculation edit code FORM.CALC
1186 R Pass nulls on calculation FORM.CALC
1201 V Blank lines before heading FORM.PAGE
1202 V Blank lines after heading FORM.PAGE
1210 T Page heading table FORM.PAGE
1212 R Page heading line number FORM.PAGE
1213 R Page heading alignment FORM.PAGE
1214 R Page heading text FORM.PAGE
1301 V Blank lines before footing FORM.PAGE
1302 V Blank lines after footing FORM.PAGE
1310 T Page footing table FORM.PAGE
1312 R Page footing line number FORM.PAGE
1313 R Page footing alignment FORM.PAGE
1314 R Page footing text FORM.PAGE
1401 V New page for final text FORM.FINAL
1402 V Final summary line number FORM.FINAL
1403 V Blank lines before final text FORM.FINAL
1410 T Final text table FORM.FINAL
1412 R Final text line number FORM.FINAL
1413 R Final text alignment FORM.FINAL
1414 R Final text FORM.FINAL
1501 V Detail line spacing FORM.OPTIONS
1502 V Outlining for break columns FORM.OPTIONS
1503 V Default break text FORM.OPTIONS
1504 V Function name in column heading for grouping FORM.OPTIONS
1505 V Column-wrapped lines kept on a page FORM.OPTIONS
1506 V Across-summary column FORM.OPTIONS
1507 V Separators for column heading FORM.OPTIONS
1508 V Separators for break summary FORM.OPTIONS
1509 V Separators for across heading FORM.OPTIONS
1510 V Separators for final summary FORM.OPTIONS
1511 V Width of wrapped report lines FORM.OPTIONS
1512 V Page renumbering at breaks FORM.OPTIONS
1513 V Width of break or final text FORM.OPTIONS
1514 V Column reordering FORM.OPTION
1515 V Fixed columns FORM.OPTIONS
2790 V Detail variation number FORM.DETAIL
2791 V Detail variation selection FORM.DETAIL
2805 V Include column heading FORM.DETAIL
2810 T Detail heading table FORM.DETAIL
2812 R Detail heading text line FORM.DETAIL
2813 R Detail heading alignment FORM.DETAIL
2814 R Detail heading text FORM.DETAIL
2901 V New page for detail text FORM.DETAIL
2902 V Line number of column data FORM.DETAIL
2904 V Number of lines to skip after detail text FORM.DETAIL
2906 V Repeat detail heading FORM.DETAIL
2907 V Number of detail text lines to keep together FORM.DETAIL
2910 T Detail text table FORM.DETAIL
2912 R Detail text line number FORM.DETAIL
2913 R Detail text alignment FORM.DETAIL
2914 R Detail text FORM.DETAIL
3080 V Break panel number FORM.BREAKn
3101 V New page for break heading FORM.BREAKn
3102 V Repeat break heading FORM.BREAKn
3103 V Number of lines to skip before break heading FORM.BREAKn
3104 V Number of lines to skip after break heading FORM.BREAKn
3110 T Break heading text table FORM.BREAKn
3112 R Break heading line number FORM.BREAKn
3113 R Break heading alignment FORM.BREAKn
3114 R Break heading text FORM.BREAKn
3201 V New page for break text FORM.BREAKn
3202 V Break text summary line FORM.BREAKn
3203 V Number of lines to skip before break text FORM.BREAKn
3204 V Number of lines to skip after break text FORM.BREAKn
3210 T Break text table FORM.BREAKn
3212 R Break text line FORM.BREAKn
3213 R Break text alignment FORM.BREAKn
3214 R Break text FORM.BREAKn
3310 T Conditions table FORM.CONDITIONS
3312 R Condition identification number FORM.CONDITIONS
3313 R Conditional expression FORM.CONDITIONS
3314 R Pass nulls on conditions panel FORM.CONDITIONS

The following table shows the data-type keywords QMF generates for the edit codes specified on the form. In this table, x represents the number of decimal places to be displayed, where x is an integer from 0 to 99.

Table 3. Data type keywords generated for edit codes specified on the QMF form panels
Edit code specified Data type keyword
E, D, I, J, K, L, P, EZ, DZ, IZ, JZ, KZ, LZ, PZ, DZC, Dx, Ix, Jx, Kx, Lx, Px NUMERIC
Any edit code that starts with the characters TD DATE
Any edit code that starts with the characters TT TIME
Invalid edit codes entered UNKNOWN

When you export a form, QMF exports only those variation panels with values that were changed from the default. Therefore, the total number of variations in the external form can be fewer than what is shown in the variation count indicator on the panel. QMF can alter the individual variation numbers to put the variations back into a continuous sequence.

Importing a form object

When you import a form, these fields must be in uppercase:
  • Record identifier for all records
  • The following fields in the header record:
    • Product identifier (QMF)
    • Type of object (F)
    • Format of object (E)
    • Action against object (R)
  • Data type values (numeric, character, graphic, or unknown data types) in the R records for the COLUMNS table

    If your site supports date/time data types, data type values DATE, TIME, TIMEST, and TSTMPTZ must also be in uppercase.

  • All the form keywords and substitution variables used in the form panels

    When a form is imported, all the input in the form is left intact. If a form keyword is in lowercase, the error indicator in the form panel is turned on. To correct the error, the field must be typed over. If the data-type value is not in uppercase, an error occurs, and the IMPORT ends.

The T record of the COLUMNS table (field number 1110) must immediately follow the header record. The T record must also include a numeric count of the number of rows in the encoded format (an * row count is not allowed).

If the entire COLUMNS table is read in, unspecified fields are set to their default values, and the form is displayed.
  • Variation panels

    The variation number field (field number 2790) determines which variation panel is updated by all the variation panel information that follows the field. This V record should precede all other V, T, and R records for a variation panel.

    If a value for a particular variation appears more than once in the encoded format, the later values replace the original values. The number of variations in the form are equal to the highest variation number in the form. There is no required order for variation numbers when importing.

  • Translated forms

    When you import an English-language form into a non-English session and the national language identifier in the H record is an E, QMF translates the reserved words. QMF translates the reserved words into your current session's language. Examples of reserved words are values in the USAGE column in FORM.COLUMNS

  • Omitting data type, edit code, and width in an imported form
    In the COLUMNS table, data type (field number 1112), edit code (field number 1117), and width (field number 1116) can optionally be omitted when the following rules are observed:
    • Edit code must be included if data type and width are omitted. Based on the specified edit code, QMF inserts appropriate defaults for data type and width.
    • Data type must be included if edit code and width are omitted. QMF provides default values for edit code and width.
    • Width must be accompanied by either data type or edit code.

    This table contains information about values for the field that contains the data type of the column. In addition to the data type values shown here, there is an UNKNOWN data type keyword that QMF uses in response to a U, V, or invalid edit code.

    Table 4. Values for the field that contains the data type of the column
    Data type as it appears in externalized form

    Code in decimal

    Data type Meaning
    Small integer
    Big integer
    Floating point
    Decimal floating point
    Varying-length character
    Fixed-length character
    Long varying-length character
    Row identifier
    Varying-length graphic
    Fixed-length graphic
    Long varying-length graphic
    Varying-length binary
    Fixed-length binary


    Timestamp with time zone

  • Detecting errors during import

    If QMF detects an error in the format of the form file during import, the import function ends. QMF issues a message describing the error and its location in the file.

    If an error is encountered in the header record and a form exists in the temporary storage area, the existing form is displayed. If the form is successfully imported, QMF displays the form panel.

    If an error is encountered after the header record is read, any existing form in the temporary storage area is discarded, and the home panel is displayed. However, if the data object exists, QMF generates a default form for the data but does not display it.

    Certain minor errors detected by QMF do not terminate the import. In such cases, QMF issues a warning message and, where appropriate, applies defaults. Some examples are:
    • V records
      • Zero-length fields
      • The specified length field does not match the length of the data supplied.
    • T records
      • Zero column length
      • The number of columns specified does not match the following field number/length pairs.

    You can respond to errors and warnings as follows:

    • Fix one problem at a time.
    • Set the TRACE option of the profile to L2 (by using the command SET PROFILE (TRACE=L2) and run the IMPORT FORM command. The L2 tracing option traces messages and commands at the highest level of detail. This option allows you to see all the message text related to the IMPORT command.
    The following command displays the message text associated with a particular message code:
    HELP DSQnnnnn
    where nnnnn is a 5-character, unique message code.