There is a TO= subparameter available on the INREC, OUTREC and OUTFIL control statements. With OUTFIL, it can be specified in the OUTREC, HEADER and TRAILER parameters. The TO= subparameter can be specified wherever there is an foparameter which is used to define the output numeric data format of an expression. For example,
In general, there is no reason to include the ‘TO=’ because the meaning is the same. However, with field_name substitution, there can be different outcomes depending on whether or not ‘TO=’ is used. For instance, if a field_name were defined as:
And it was used in a substitution on an OUTREC statement as:
MFX would assume the ZD should replace the BI in the context of the OUTREC statement, resulting in the following substitution:
If the OUTREC statement were specified as:
MFX would create the following substitution:
To ensure that there are no ambiguities with the use of data dictionary_names and certain types of data conversions, you should use the TO= syntax when necessary. Since the PDC, PDF, ZDC and ZDF formats can only be specified as output formats, there is no ambiguity and the ‘TO=’ form is not required.