search cancel

Dataquery error "FIND TERMINATED BECAUSE: MAX WORK FILE BLOCKS EXCEEDED"

book

Article ID: 106078

calendar_today

Updated On:

Products

Datacom Datacom/DB

Issue/Introduction

DQW file is allocated at 12000 trks and has 12000 used. Do I need to expand file or can it be cleaned up?

Current Dataquery FIND/SELECT Statistics. 
--------------------------------------------------------------------------DQEF0
DATAQUERY: FIND STATISTICS QUERY NAME: GAT-SNSL-HSTRY 
-------------------------------------------------------------------------------

NUMBER REQUESTED: ALL COMPLETION DATE: 07/11/2018 
NUMBER FOUND: 9589 COMPLETION TIME: 10:51:32 

FIND TERMINATED BECAUSE: MAX WORK FILE BLOCKS EXCEEDED 

Environment

Datacom/DB 15.1 

Cause

  
FIND TERMINATED BECAUSE: MAX WORK FILE BLOCKS EXCEEDED                       
                                                                             
Explanation: Your batch query required more find blocks than allowed by the current DQW file allocation.                                                 
                                                                             
User Response: Increase the size of the DQW table or decrease the number of partitions in the current DQW table allocation.         


This means that the DQW table is either too small for the request or the request is generating too many rows (output too large).

Resolution

Here are the steps to enlarge the DQW table:

1- In CICS, issue the DBOC CLOSE=003 transaction

2- Run a DBUTLTY batch job with

//SYSIN     DD *
ACCESS  DBID=003,STATUS=OFF,USERS=FAIL
COMM    DBID=003,OPTION=CLOSE
/*

3- Manually allocate a new, larger DQW area and then run DBUTLTY to INIT and Null Load the DQW table:

//SYSIN     DD *
INIT AREA=DQW,DBID=003           
LOAD AREA=DQW,DBID=003,FORMAT=NONE 
/*

4-Run DBUTLTY to restore Write access to the database for further initialization: 

//SYSIN     DD *
ACCESS DBID=003,STATUS=WRITE
/*

5- Run batch DQWFINIT process 

//*      EXECUTE DQWFINIT TO INIT DATAQUERY DQW DATASET 
//*                                                     
//FINIT2  EXEC PGM=DQWFINIT,REGION=4M                   
//STEPLIB  DD ....                     
//SYSPRINT DD  SYSOUT=*                           
//SYSOUT   DD  SYSOUT=*                           
//SYSPUNCH DD  DUMMY                                    
//DDSNAP   DD  SYSOUT=*                           
//SNAPER   DD  SYSOUT=*                           
//BATCHOUT DD  SYSOUT=*                           
//SYSUDUMP DD  SYSOUT=*                           
//SYSIN  DD  * 
DQW 03                ==> Please see note below
/*                   

6 - Issue CICS transaction DBOC OPEN=003 to open the URT

Note: to know how many partitions you currently have, execute program DQWFINIT with input card DQW ???
DQW in positions 1-3 and ??? in positions 5-7. (Default is 3 partitions).

Additional Information

As always, please contact Broadcom support for Datacom if you have further questions.