FIELDS


The FIELDS parameter specifies which field numbers in the record to print in vertical formatted mode. This parameter is valid only for the VPRINT function. The syntax of the FIELDS parameter is:

FIELDS=(field-list)

field-list

Specify any combination of field numbers and/or field number range. Separate each field number specification by a comma. Specify a range with a hyphen between the starting and ending field numbers. You may specify up to nine field number specifications or 60 characters.

Example:

$$DD01 VPRINT FIELDS=(1,3,10-14)

This example prints fields 1, 3, 10, 11, 12, 13, and 14 of each record in vertical formatted mode.


Important

The FIELDS parameter can only print data in the sequence that it resides in the record, for example FIELDS=(1,2,3,6,5,4) will print fields 1, 2, 3, 4, 5, and 6.
However, you can use File-AID/MVS Option 9, REFORMAT, to create a REFORMAT definition. First, create a Target Record Layout with the fields rearranged in the desired sequence. The REFORMAT definition can then be saved and inserted into a batch job for repeated use.

In the batch job:
Step 1: Execute REFORMAT into the new file with the new field sequence.
Step 2: Execute VPRINT against the new file, using the new layout. The new file can be deleted at the end of the job.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*