IBM Support

Message CPD0037 and Message CPF0001 from CL Program in Batch

Troubleshooting


Problem

When running a CL program interactively, it works fine. When running a CL program in batch, it fails with message CPD0037 and message CPF0001.

Resolving The Problem

Problem

When running a CL program interactively, it works fine. When running a CL program in batch, it fails with message CPD0037 and message CPF0001:

CPD0037 Diagnostic 30 mm/dd/yy hh:mm:ss.fffffff QCADRV QSYS xxxx PGMNAME LIB xxxx
Message . . . . : Automatic or selective prompting not allowed.
Cause . . . . . : Automatic and selective prompting are valid in control
language (CL) programs running interactively. Recovery . . . : Remove the
automatic or selective prompting request from the source, and then try the
command again.

CPF0001 Escape 30 mm/dd/yy hh:mm:ss.fffffff QCADRV QSYS xxxx PGMNAME  LIB xxxx
Message . . . . : Error found on <command name> command.
Cause . . . . . : The system detected errors in the command. Recovery . . .
: See the previously listed messages in the job log. Correct the errors
and then try the command again. *N instead of a command name means that the

Resolution

This is caused by trying to run a program that uses selective prompting in batch, for example:
         PGM
         CHGJOB     LOGCLPGM(*YES)
         DSPJOBLOG  ??OUTPUT(*PRINT)
         ENDPGM    

Selective prompting is not allowed in batch programs.
To resolve the issue, you should remove any '?' or '??' operators and recompile the program.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p0000006x8GAAQ","label":"CL"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

626525452

Document Information

Modified date:
23 November 2024

UID

nas8N1011106