Previous Topic: Implicit External PicturesNext Topic: Edit and Code Tables


Explicit External Pictures

To explicitly specify an external picture for a field, the developer uses the online or batch compiler. If an explicit external picture is specified for the field, an implicit external picture is not built.

When to Specify an External Picture

An external picture can be explicitly specified for a map field either during a map-definition session or in the IDD record element definition.

During Map Definition

An external picture is explicitly specified at map definition in any of the following:

An external picture specification made for a map field overrides any other external picture specification that has been made for the field.

Using IDD

An external picture can be explicitly defined by using IDD. Specifying INTERNAL for the map field's external picture causes the online compiler to use the external picture associated with the record element definition. External pictures for record elements are defined in the IDD DDDL RECORD ELEMENT or COBOL substatement.

Note: For more information about these substatements, see the CA IDMS IDD DDDL Reference Guide.

How External Pictures are Constructed

If INTERNAL is specified for the map field's external picture but the record element is not associated with an external picture, the online compiler will construct an external picture as described in the following table:

Data Type

Character

Description

Alphanumeric

X

A single alphanumeric character.

 

B

A single blank character; B can appear anywhere in the picture.

 

Other

Characters other than A, B, or parentheses can be used as insertion characters.

Numeric

9

A single numeric character (0 through 9).

 

Z

An insertion character when it is preceded by a 9, a decimal point, or a zero-suppression character. Otherwise, a Z is a zero-suppression character.

 

$

Multiple dollar signs at the beginning of an external picture represent a floating dollar sign. The dollar sign is an insertion character when preceded by a 9, a decimal point, or a zero-suppression character.

 

*

Multiple asterisks at the beginning of an external picture provide check protection. The asterisk is an insertion character when preceded by a 9, a decimal point, or a zero-suppression character.

 

+

In the first position of an external picture, indicates signed data, and appears as either a minus sign or a plus sign depending on the sign of the data. Multiple plus signs at the beginning of an external picture represent a floating sign. The plus sign is an insertion character when preceded by a 9, a decimal point, or a zero-suppression character.

 

- (Minus sign)

In the first position of an external picture, indicates signed data. The sign position appears as a blank if the data is positive and as a minus sign if the data is negative.

Multiple minus signs at the beginning of an external picture represent a floating sign. The minus sign is an insertion character when it is preceded by a 9, a decimal point, or a zero-suppression character.

 

. (Decimal point)

Used as a decimal point. Data is aligned with the decimal point in an external picture and is truncated or padded when necessary. The decimal point terminates zero suppression when zero-suppression characters precede the decimal point. Zero-suppression characters become insertion characters if placed after a decimal point. The first period in a series of period characters is the decimal point in a picture. If no decimal point exists in the data, a decimal point is assumed after the rightmost numeric character. The comma (,) is used as a decimal point if DECIMAL POINT IS COMMA is specified.

 

B

A single blank character; B can appear anywhere in the picture.

 

(n)

Follows a 9, A, Z, $, *, +, -, or B to represent n consecutive repetitions of the character. N must be an integer in the range 1 through 9999. When used following an implied decimal point position, as represented by a V, n must be in the range 1 through 255.

 

V

Indicates the decimal point position in fixed decimal data.

 

E+99

Indicates a floating point data field. The mantissa can be positive or negative. The exponent must be two numeric digits preceded by a plus sign. If more than two digits are entered, the online compiler truncates the picture; if less than two digits are entered, the picture is extended. The online compiler supplies a default external picture if automatic editing is enabled for the field. The default external picture for internal short float type data fields is +9.9(7)E+99. The default external picture for internal long float type data fields is +9.9(16)E+99.

 

Other

Characters other than 9, Z, $, *, +, -, B, V, or parentheses can be used as insertion characters.

Special Considerations

An alphanumeric external picture must be specified for a field associated with a group element, regardless of the data type of the subordinate elements in the group.

Alphanumeric, alphabetic, and numeric external pictures must begin with specific characters:

Allowing Insertion Characters

Including insertion characters in external pictures provides the terminal operator with flexibility in supplying data. The terminal operator need only type necessary data characters; the operator can include insertion characters in data, but omitting these characters does not constitute an error.

For example, given a telephone number with an external picture of XXXBXXX-XXXXB#BXXX, the terminal operator could enter any of the following values:

Considerations

The following considerations apply to the use of insertion characters in external pictures:

The following considerations apply to data supplied in fields with numeric external pictures:

Value input by operator

Value displayed

1

01.00

.1

00.10

10

10.00

Truncation

If data typed by the terminal operator exceeds the length permitted by the external picture, excess characters are deleted from the data as described in the following table:

Type of Field

Truncation Process

Alphanumeric

The rightmost characters are deleted from the data.

Numeric

  • If excess characters are supplied to the right of thedecimal, the rightmost (low-order) characters are deleted from the data.
  • If excess characters are supplied to the left of the decimal, the leftmost (high-order) characters are deleted from the data.

Data from which low-order characters are deleted is moved to program variable storage as usual. Numeric data from which high-order characters are deleted is not moved to program variable storage; an input error occurs for the field

Sample Truncations

The following sample external pictures demonstrate how excess characters are deleted from data:

External picture

Operator inputs

Data stored as

XXX

A234

A23

AAA

WXYZ

WXY

999

1234

no data

99.99

23.4

23.40

99.99

123.4

no data

99.99

23.456

23.45

A CA ADS dialog or application program can determine whether excess data has been deleted from data in a field by inquiring if the field has been truncated.