CA Pan/SQL: A046 SQL - ALL INTERNAL CURSORS HAVE BEEN USED, MAXCUR VALUE EXCEEDED IN DQSMCMD
search cancel

CA Pan/SQL: A046 SQL - ALL INTERNAL CURSORS HAVE BEEN USED, MAXCUR VALUE EXCEEDED IN DQSMCMD

book

Article ID: 215160

calendar_today

Updated On:

Products

Easytrieve Report Generator PAN/SQL

Issue/Introduction

 

 Receiving these errors:
       *******A046 SQL - ALL INTERNAL CURSORS HAVE BEEN USED, MAXCUR VALUE EXCEEDED IN DQSMCMD
       *******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR(S) 

Where is the documentation for MAXCUR and HLDCUR parameters, and where are the current values found for these parameters?

Environment

CA Easytrieve Report Generator, release 11.6

CA Pan/SQL 2.4C (0203)

Resolution

Please look in your DQSMCMD macro in your CA Pan/SQL CAIMAC.

These are the default values:
DQSMCMD &TYPE=PROGRAM,&MAXSTMT=10,&MAXCUR=6,&MAXGRP=1,                    
&HLDCUR=06,&MAXDSCB=1,&VWOWNR=PANSQL24,&PLAN=DQPS024,   
        &DB2REL=051,&ENV=MVS,&MAXSTLEN=4096

Please look in your CAIMAC in the DQSMCMD member to see what is specified for MAXCUR and HELDCUR.

The above values in DQSMCMD can be overridden in the OMSMCMD2 macro, so check for these two values in OMSMCMD2 first:

 DQSMCMD  MAXSTMT=05,                                  X
               MAXCUR=03,                                           X
               VWOWNR=PANSQL24,                           X
               PLAN=DQPS8NP,                                     X
               DB2REL=081,                                           X
               MAXGRP=01,                                           X
               HLDCUR=03,                                            X
               ENV=MVS,                                                X
               MAXSTLEN=4096
         END

Please see this documentation link: 
       https://ftpdocs.broadcom.com/cadocs/1/b000901e.pdf

HLDCUR:
This value specifies the maximum number of cursors defined
with the With Hold option that will be defined for the execution
of a given task, transaction, or program. This parameter is valid
only for DB2 for z/OS or OS/390 Release 2.3 or greater. 

MAXCUR:
This value specifies the maximum number of cursors that will be
defined for the execution of any user task, transaction, or
program. This parameter affects only the dynamic execution of
the programs. If too small of a value is specified, programs may
fail execution, and a warning message is reported at the end of
compile phase processing. The user must then specify a larger
value for this option and reinstall the interface.

A value between 1 and 99 is valid. The default value is 6. This
means that no user program can use more than 6 cursors for
execution. The value that is specified affects the size of the
CA-Pan/SQL Interface Command Processor, its plan, and each
interface module.