PRINTDS Command


PRINTDS command is used to print the contents of a dataset to a printer or a display terminal. It is similar to the PRINT command. However, the PRINTDS command provides additional options and flexibility for printing datasets.

Syntax -

PRINTDS DATASET(dataset-name) [options]

Where -

  • dataset-name is the name of the dataset to be printed.
  • options are the optional parameters that you can use to customize the printing.

Examples -

Scenario1 - Printing the dataset information.

PRINTDS DATASET('MATEPK.TSO.TESTPDS')

This would print MATEPK.TSO.TESTPDS information on the printer attached to the system.