💡 : Use DISP=(MOD,CATLG) if you aren't sure if the file exists; it will create the file if it's missing or append to it if it's there. To help you build a complete JCL step, tell me: The file name you want to create The record length (LRECL) or block size The storage type (Disk vs. Tape)
: You must usually provide space and DCB attributes.
: Attributes like Record Format (RECFM) and Logical Record Length (LRECL). Common Errors
The NEW parameter is almost always used within the three-part DISP structure: DISP=(status, normal-disp, abnormal-disp) . : DISP=(NEW,CATLG,DELETE) Creates the file. Keeps/catalogs it if the job succeeds. Deletes it if the job fails. Temporary storage : DISP=(NEW,PASS) Creates a file for use in a later step of the same job. Shortened version : DISP=NEW Defaults to (NEW,KEEP,KEEP) for permanent files. Critical Requirements
To successfully use NEW , you typically need these accompanying keywords: : The name of the file being created. UNIT : The device type (e.g., SYSDA, 3390). SPACE : The amount of disk storage requested.
: The user ID must have "Alter" or "Create" RACF authority.