How to create a file in Spool with a customized file name and OUTPUT values?
When running the z/OS IEBGENER utility, the OUTPUT specifications are passed to Spool, but the file name cannot be changed:
With the Spool ESFPRINT utility, an OWNER can be specified which allows for setting the file name as needed, but the OUTPUT statement is then ignored:
The following sample z/OS JCL uses the IEBGENER utility and uses the SUBSYS interface:
When using this sample file MYFILE will be created in Spool with the attributes as defined with the OUTPUT statement.
Refer to the Spool System Guide , Chapter 8: SUBSYS Interface, item DD Statement SUBSYS Parameter for a list of the sub-parameters that can be specified while creating a Spool file.