The Stored Data Type: ACTUAL

In this section:

ACTUAL describes the type and length of data as it is actually stored in the data source. While some data types, such as alphanumeric, are universal, others differ between different types of data sources. Some data sources support unique data types. For this reason, the values you can assign to the ACTUAL attribute differ for each type of data source.


Top of page

x
ACTUAL Attribute

How to:

Reference:

This attribute describes the type and length of your data as it actually exists in the data source. The source of this information is your existing description of the data source (such as a COBOL FD statement). The ACTUAL attribute is one of the distinguishing characteristics of a Master File for non-FOCUS data sources. Since this attribute exists only to describe the format of a non-FOCUS data structure, it is not used in the Master File of a FOCUS data structure.

If your data source has a date stored as an alphanumeric field and you need to convert it to a WebFOCUS date for sorting or aggregation in a report, you can use the DATEPATTERN attribute in the Master File. WebFOCUS then uses the pattern specified to convert the alphanumeric date to a WebFOCUS date.



x
Syntax: How to Specify the ACTUAL Attribute
ACTUAL = format

where:

format

Consists of values taken from the following table, which shows the codes for the types of data that can be read.

ACTUAL Type

Meaning

DATE

Four-byte integer internal format, representing the difference between the date to be entered and the date format base date.

An

Where n = 1-4095 for fixed-format sequential and VSAM data sources, and 1-256 for other non-FOCUS data sources. Alphanumeric characters A-Z, 0-9, and the special characters in the EBCDIC display mode.

An accepts all the date-time string formats, as well as the Hn display formats. ACTUAL=An also accepts a date-time field as it occurs in an alphanumeric HOLD file or SAVE file.

D8

Double-precision, floating-point numbers, stored internally in eight bytes.

F4

Single-precision, floating-point numbers, stored internally in four bytes.

Hn

H8, H10, or H12 accepts a date-time field as it occurs in a binary HOLD file or SAVB file.

In

Binary integers:

I1 = single-byte binary integer.

I2 = half-word binary integer (2 bytes).

I4 = full-word binary integer (4 bytes).

I8 = double-word binary integer (8 bytes).

Note: The USAGE must be P or D. Decimals are honored, with proper conversion to the decimals of the P or D USAGE.

Pn

Where n = 1-16. Packed decimal internal format. n is the number of bytes, each of which contains two digits, except for the last byte which contains a digit and the sign (+ or -). For example, P6 means 11 digits plus a sign.

Zn

Where n = 1-31. Zoned decimal internal format. n is the number of digits, each of which takes a byte of storage. The last digit contains a digit and the sign.

If the field contains an assumed decimal point, represent the field with an ACTUAL format of Zn and a USAGE format of Pm.d, where m is the total number of digits in the display plus the assumed decimal point, d is the number of decimal places, and m must be at least 1 greater than the value of n. For example, a field with ACTUAL=Z5 and one decimal place needs USAGE=P6.1 (or P7.1, or greater).

Note:

  • Unless your data source is created by a program, all of the characters are either of type A (alphanumeric) or type Z (zoned decimal).
  • ACTUAL formats supported for date-time values are An, H8, H10, and H12. An accepts all the date-time string formats as well as the Hn USAGE display format. ACTUAL=H8, H10, or H12 accepts a date-time field as it occurs in a binary HOLD file or SAVB file. ACTUAL=An accepts a date-time field as it occurs in an alphanumeric HOLD file or SAVE file.
  • If you create a binary HOLD file from a data source with a date-time field, the ACTUAL format for that field is of the form Hn. If you create an alphanumeric HOLD file from a data source with a date-time field, the ACTUAL format for that field is of the form An.



x
Reference: ACTUAL to USAGE Conversion

The following conversions from ACTUAL format to USAGE (display) format are automatically handled and do not require invoking a function:

ACTUAL

USAGE

A
A, D, F, I, P, date format, date-time format
D
D
DATE
date format
F
F
H
H
I
I, date format
P
P, date format
Z
D, F, I, P


x
Reference: COBOL Picture to USAGE Format Conversion

The following table shows the USAGE and ACTUAL formats for COBOL, FORTRAN, PL1, and Assembler field descriptions.

COBOL USAGE FORMAT

BYTES OF COBOL PICTURE

INTERNAL STORAGE

ACTUAL FORMAT

USAGE FORMAT

DISPLAY
DISPLAY
DISPLAY
DISPLAY
X(4)
S99
9(5)V9
99
4
2
6
2
A4
Z2
Z6.1
A2
A4
P3
P8.1
A2
COMP
COMP
COMP*
COMP
COMP-1**
S9
S9(4)
S9(5)
S9(9)
—
4
4
4
4
4
I2
I2
I4
I4
F4
I1
I4
I5
I9
F6
COMP-2***
8
D8
D15
COMP-3
COMP-3
COMP-3
9
S9V99
9(4)V9(3)
8
8
8
P1
P2
P4
P1
P5.2
P8.3
FIXED
BINARY(7)
(COMP-4)
B or XL1
8
I4
I7

* Equivalent to INTEGER in FORTRAN, FIXED BINARY(31) in PL/1, and F in Assembler.

** Equivalent to REAL in FORTRAN, FLOAT(6) in PL/1, and E in Assembler.

*** Equivalent to DOUBLE PRECISION or REAL*8 in FORTRAN, FLOAT(16) in PL/1, and D in Assembler.

Note:

  1. The USAGE lengths shown are minimum values. They may be larger if desired. Additional edit options may also be added.
  2. In USAGE formats, an extra character position is required for the minus sign if negative values are expected.
  3. PICTURE clauses are not permitted for internal floating-point items.
  4. USAGE length should allow for maximum possible number of digits.
  5. In USAGE formats, an extra character position is required for the decimal point.

For information about using ACTUAL with sequential, VSAM, and ISAM data sources, see Describing a Sequential, VSAM, or ISAM Data Source. For other types of data sources, see your adapter documentation. Note that FOCUS data sources do not use the ACTUAL attribute, and instead rely upon the USAGE attribute to specify both how a field is stored and formatted.


WebFOCUS