![]() |
AD Select/Reorganise the Displayed Column Ranges
AD { [col | const | seq] ["text"] } {, ... } ... [, FC= X'cc' | C'c']
Arrange Data. The Display mode of the file is changed such that only certain column ranges of the records are selected, and are displayed in a particular sequence. Character strings can be inserted between the column ranges. The display of each individual column can be in either character or hexadecimal format. Descriptive text can be assigned to each selected column range in the Scale line. Only the display of the file records is influenced by the AD command. The file itself remains unchanged.
col Value for the selected column range. Two different selection methods are possible.
:col1: len [B[S]|C|H|P[n]|Z]
First column in the required range. The column numbering begins with column 1.
len
Length of the column range.
:col1-col2: [B[S]|C|H|P[n]|Z|STCK]
Definition of the column range by specifying the first and last column. For last column (col2), the character $ (=end of record) can also be specified.
Example: :1-20: Columns 1 to 20 are selected. An equivalent selection would be to specify the first column as :1:, and a length of 20 (:1:20).
B[S] The specified column range contains a binary number, with (BS), or without (B) the sign. The length of the column range may only be 1, 2, 3 or 4.
C Display the column in character format (Standard).
H This option specifies whether or not the column is to be displayed in hexadecimal format. H sets one of the column-specific hexadecimal modes (see Display command H/NH). X can be specified instead of H.
P[n] The specified column range contains a packed binary number, with or without sign.
n Number of places before the comma. Standard: n = 0
Example: :35-38:P2 provides the following format: 99999,50
Z The specified column range contains a signed decimal number. This definition corresponds to the COBOL "PIC S9" format, and is stored in the following hex form: FaFb ... FnZm. Here, a, b, ... ,n, m represent digits 0, ..., 9. Z represents the sign: the hex values A, C, E, F correspond to positive values, and B, D to negative values.
Example: F1C2 equals +12, F1D2 equals -12
STCK The date and time will be stored in the specified column range as a binary value in STCK (Store Clock) format. The STCK field can be four or eight bytes long. The contents of the field will be displayed as YYYY-MM-DD HH:MM:SS: MMMMMM . MMMMMM corresponds to the millisecond and microsecond values of the time value.
Standard: The column is displayed in its original format (character).
const Constant which will be inserted in each record displayed before the next column, or after the last selected column.
[len] C'string' | X'string'
len
Total constant length. The constant specified in the form C'...'/X'...' will be repeated until the specified length is reached.
Standard: len = Length of the specified string.
C'string' | X'string'
Value of the constant to be inserted. C'string' can be abbreviated to 'string'.
seq Sequential numbering. For SAM and PAM files, a sequential numbering field will be inserted into the display.
Correct numbering for ISAM files can only be guaranteed if a write or search/rewrite command is performed on the file at the outset.
SEQ(len [, step])
len
Length of the numbering field. 1 <= len <= 10.
step
Numbering increment. 1 <= step <= 30000.
Standard: 1
"text" The text entered here defines a column heading which will appear in the Scale line of the display.
As many column/constant ranges can be specified as required. The individual ranges are separated from one another by commas. The selected columns/ constants will be displayed without gaps. Columns can also be duplicated or replaced with the AD command.
FC= Fill Character. Column ranges that lie partially or totally outside of a record are padded with this character. Exception: the last column area will not be padded. It will be restricted to the length of the available data. See the notes below for further details.
Standard: FC=C' '.