One of the most important functions of OUTREC processing is to convert a numeric data field or an expression to either an output numeric data format or a printable format with editing capabilities. OUTREC processing can convert 2-digit year fields into 4-digit year fields, as well as any 2-digit or 4-digit year full-date field into any other full-date field, including conversion between Julian and Gregorian formats. For details on converting 2-digit year data, see Converting Year Data with Century Window Processing on INREC, OUTREC, or OUTFIL OUTREC. When a single numeric field defined by p,l,fi is to be converted to a printable format without editing, the format and length of the field determine the length of the output field, as illustrated in the following two tables.
|
For full-date formats, the number of bytes in the input field can vary. The following table shows input lengths for full-date formats and the resulting output length:
|
For any other type of expression (those that are not a simple p,l,fi), MFX internally maintains a 31-digit number. The number of digits that are used for conversion or editing depends upon the lengths of the fields used in the expression. For more information, see the description of expression in the section The following describes the c: subparameter.
If all fields in the expression conform to the following, then 15 digits will be used. If any field in the expression exceeds these length values, 31 digits will be used for editing or conversion. Note that full-date formats in an expression (not a simple p,l,f) are treated as providing a 15-digit value when evaluating the following rules.
|
If you specify no other FIELDS subparameters, the result will be converted to printable output according to the default editing mask, M0. See Mm Subparameter (Editing Masks). Other forms of printable output can be created by using the EDIT, LENGTH, Mm, and SIGNS subparameters, which allow you to create your own edit patterns, or by using one of the 27 MFX-supplied editing masks, which are appropriate for many editing operations.
To convert to a numeric data field, specify an output format of BI, CSF/FS, FD, FI, PD, PDC, PDF, ZD, ZDC or ZDF. The default output field length is determined for CSF/FS, PD, PDC, PDF, ZD, ZDC and ZDF formats by table Default Output Lengths. For BI and FI formats, use Output Lengths for BI and FI Formats when Input is a Single p,l,fiField. For FD, use Output Lengths for FD Fields..
The number of digits (d) in the following table is obtained from column 3 of Data Conversion Table for an expression that is a single p,l,fi field. For any other type of expression (not a single p,l,fi), d is either 15 or 31 based upon the fields in the expression. If all fields in the expression conform to the lengths in table Field Lengths That Produce a 15-Digit Default Output Length, then d is 15. If any are longer, d is 31.
|
For BI or FI fields, when the field to be converted is a single p,l,fi field, the default output length is either 4 or 8 bytes depending upon the format and length of the field to be converted. See table Output Lengths for BI and FI Formats when Input is a Single p,l,fiField to determine the default length.
|
These lengths can be overridden by specifying the LENGTH parameter.
For any other type of expression (those that are not simple p,l,fi), the output length when converting to BI or FI is based upon the number of digits available for output. If all fields in the expression conform to the lengths in table Field Lengths That Produce a 15-Digit Default Output Length, then d is 15. If any are longer, d is 31. When the number of digits available is 15, the output length will be 4. When the number of digits is 31, the output length will be 8.
The table Output Lengths for FD Fields displays the formats that can be converted to FD and the default output lengths.
|
If a LENGTH parameter is specified with a conversion to an FD format, only 4, 8 and 16 bytes are allowed.
Converting Year Data with century window processing on INREC, OUTREC, or OUTFIL OUTREC
The EDIT Subparameter
The LENGTH=n Subparameter
The Mm Subparameter (Editing Masks)
The SIGNS Subparameter