The REFORMAT control statement defines the record layout to be produced by the join processing specified on an application’s JOINKEYS control statements.
Use the REFORMAT control statement to specify which fields from the SORTJNF1 and SORTJNF2 files are to be included in each record created by the join operation.
The REFORMAT control statement is normally required if JOINKEYS is specified. It is optional if a JOIN control statement with the ONLY option has been specified in a join application since no records will actually be joined. In that instance, if a REFORMAT control statement is not provided and ONLY the unpaired records from one join input (SORTJNF1 DD or SORTJNF2 DD) are requested on the JOIN control statement, the records will not be reformatted and the record type and length of the join input file will be retained.
If a REFORMAT control statement is not provided and ONLY the unpaired records from both join inputs are requested, the resultant records will be variable-length, regardless of the record formats of the join input data sets, and the record length will be the maximum of any fixed-length input file record length plus four (for an RDW) and any variable-length input file record length.