Previous Topic: External PicturesNext Topic: Explicit External Pictures


Implicit External Pictures

What is an Implicit External Picture?

If the developer does not use the online or batch compiler to explicitly specify an external picture for the field, an implicit external picture is constructed for a field. The implicit external picture is derived from the internal picture and/or from the usage mode defined for the related record element.

If Automatic Editing is not Enabled

The status of automatic editing for the field determines the external picture that is constructed for the field:

If automatic editing is not enabled for the field, the online compiler constructs the external picture for a field:

For example, the following table illustrates how an external picture is constructed for a field for which automatic editing is not enabled:

Internal Picture

Usage Mode

External Picture

XXX

DISPLAY

X(3)

A(8)

DISPLAY

X(8)

S99V99

DISPLAY

X(4)

S9(4)

COMP

X(2)

 

COMP-1

X(4)

 

COMP-2

X(8)

9(7)V99

COMP-3

X(5)

 

Note: Internal pictures cannot be specified for COMP-1 or COMP-2 elements. The previous external pictures for COMP-1 and COMP-2 elements are the default external pictures for these elements when automatic editing is disabled for a field. To avoid an error (such as PROG-470, PROG-402, or PROG-403), automatic editing should be enabled for all fields with usage other than DISPLAY.

If Automatic Editing is Enabled

If automatic editing is enabled for the field, the online compiler assigns an external picture to the field:

The following table illustrates how an external picture is constructed for a field when automatic editing is enabled:

Internal Picture

Usage Mode

External Picture

XXX

DISPLAY

X(3)

A(8)

DISPLAY

A(8)

S99V99

DISPLAY

+99.99

S9(4)

COMP (Half word)

+9(4)

S9(8)

COMP (Full word)

+9(8)

S9(16)

COMP (Double word)

+9(4)

 

COMP-1

+9.9(7)+99

 

COMP-2

+9.9(16)+99

9(7)V99

COMP-3

9(7).99

Note: Internal pictures cannot be specified for COMP-1 or COMP-2 elements. The previous external pictures for COMP, COMP-1, -2 and -3 elements are the default external pictures for these elements when automatic editing is enabled for a field.

Internal to External Translation

Internal Picture Character

External Picture Character

X

X

A

A

9

9

S

S

V

. (Decimal point)

E

E

. (Decimal point)

. (Decimal point)