Previous Topic: DEBIT Statement

Next Topic: DISPLAY Statement

DESCRIPT Statement

The DESCRIPT statement, identified by the statement type DESCRIPT, is optional. When the data element description field is selected, it can provide a description of the control field break at the header and summary line. See the data element ID 02 in the IMS Interface Output Data Elements Table later in this chapter.

The summarization level defines which sort control break the DESCRIPT statement refers to. For example, you can select the two positions of the date field corresponding to the month as the major sort control field. The Wizard Report Writer then summarizes the accounting data and prints a summary line for all processing in each month and a final summary line for all months combined. To clarify the report, you can define a summarization description for each control break or summary line. In this example, you might prepare the following set of DESCRIPT statements:

ADESCRIPT101      JANUARY
ADESCRIPT102      FEBRUARY
ADESCRIPT103      MARCH
             .
             .
             .
ADESCRIPT1        UNIDENTIFIED DATE

For a description of the user sort control fields, see the SORT Statement section later in this chapter. Sort control fields can be a maximum of eight characters in length. Unused characters are padded with trailing blanks. The description control field must be the same as the eight-character sort control field. The description control field and a sort control field must match character for character to associate the correct description with the corresponding sort control break.

You may need the same DESCRIPT statements for different report formats -- the only variation being the summarization level. In one report you might use the date as the level one sort control field, as in this example, and in another report use the date as a level 2 or 3 sort control field. The only difference in the two sets of DESCRIPT statements would be the set code and the summarization level indicator.

You can, however, leave the set code blank and define the summarization level as 0 which makes the summarization description available to all reports and to any control break -- not just the level one break as in the example.

Use this any level summarization level with caution. Suppose a report were sorted by:

level 1=department number

level 2=group number

level 3=employee number

In such cases, you must specify summarization level to make sure that the right description appears at the right level.

Note: If fewer than five sort levels are used in a report, you may identify them as:

1, 2, and 3;

2, 3, and 4; or even

1, 4, and 5.

Level numbers indicate relative positions; the precise number selected is only important because the level number on the DESCRIPT statement must match that defined on the SORT statement.

Variable Description Feature

You may find that at a particular sort level, there are a number of fields whose descriptions are almost the same except for a small amount of variable information. For example, at level one a report might sort through the first three positions of the user information field which could identify an account number and so on for 20 or 25 account numbers. In this case, rather than code a separate DESCRIPT statement for each control break or summary line, you may prepare a single DESCRIPT statement and, by using the variable description feature, transfer the account number automatically from the sort control field into the description field, along with a constant, if desired. See the SORT Statement section later in this chapter.

To invoke this feature, replace the first four characters of the description control field with four asterisks. These indicate that the next four positions determine what is transferred from the sort control field. The four asterisks are followed by:

The following example illustrates a typical use of the variable description feature.

     Summarization Level Invokes
     Variable Description Feature
                 │
                 ▼
            ┌─────────┐ ┌───────────┐
ADESCRIPT1  │**** 0931│ │ACCOUNT XXX│
            └─────────┘ └───────────┘
                              ▲
                              │
                This will appear on every summary
                line at this sort control level.

This statement defines the format for Report A. The summarization level is 1, followed by the four asterisks that invoke the variable description feature. The variable information (the three position account number, in this case) located in the first position of the sort control field, is transferred to the ninth position of the description field (overlaying the XXX appearing in the example).

Note that DESCRIPT statements using the variable description feature and those that contain blank description control fields share one characteristic: they terminate the DESCRIPT statement searching logic, and are used regardless of the current contents of the sort control field. DESCRIPT statements with blank description control fields are intended to be used for catchall or miscellaneous descriptions and should follow all DESCRIPT statements with nonblank description control fields.

Statement Position

Field Length

Field Name

Notes

1

1

Set Code

Optional

2-9

8

Statement Type

DESCRIPT

10

1

Summarization Level

0 = any level
1 = 1st sort level (most general level)
2 = 2nd sort level
3 = 3rd sort level
4 = 4th sort level
5 = 5th sort level (most detailed level)

11-18

8

Description Control Field

Matches Sort Control Field unless variable description feature is used. In that case:

Statement Len Notes

Position

 

11-14 4 **** asterisks

 

15-16 2 TO location in DESCRIPT

field, relative to 1

 

17 1 Number of characters to

be moved

 

18 1 FROM location in control

field, relative to 1

(Refer to Variable Description Feature)

19-38

20

Description Field

Refer to DE ID 02 in the Output Data Elements Table

39-80

42

Reserved

Not used