Tips for freeing up space in a full dictionary

Document ID : KB000047213
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

If your dictionary DDLDML area is getting full, it might be necessary to try and free up some space before being able to schedule an expansion.

This document gives some tips on what kind of things you might want to look at in order to delete unwanted entities and free some space.

Instructions:

First, take a back-up before trying any of the following.

CLEANUP
Use the CLEANUP utility to physically delete any logically deleted records.

Delete unused elements
In IDD, issue the command DIS ALL ELE VERB DELETE AS SYN. This will display a list of DELETE ELEMENT commands for every element in the dictionary. Erase the first line (the original command) and hit ENTER again. This will attempt to delete every element.
Those that are not in use by anything will be deleted. Those that are in use by either a record or a group element will get this error:-
*+ E DC601006 DELETE NOT ALLOWED WORD 9
*+ W DC601017 FORWARD SPACING TO NEXT PERIOD WORD 9

You can also use DREPORT 010 to generate a list of every element which does not participate in any records. Note that this list will include elements that are members of a group element if they are not in any records. Such elements will not be deleted by one execution of the above delete method in IDD, but successive executions will delete more subordinate elements as their owning group elements get deleted in prior executions.

Delete unused modules
Dictionary modules tend to take up a lot of space as they are just line-by-line representations of text, e.g. ADS or cobol program source, clists, OLQ qfiles, protocols.
It can be difficult to determine if a module can be deleted because even modules which are not physically linked to any other entity might be something which should not be deleted.

However, the following OLQ/batch source will return a list of all modules in the dictionary, sorted in descending order of size. This list could be used to identify those modules which, if not needed any more, will return the most benefit in terms of freeing space.

//SYSIPT DD *
SET USER username
SET ACCESS OLQ
SET DICTNAME SYSDIRL
SET DBNAME dictname
SET UNDERLINE '-'
SIGNON SS IDMSNWKA SCHEMA IDMSNTWK ( 1)
SELECT MOD-NAME-067, MOD-VER-067, COUNT(*) AS ROWS -
FROM MODULE-067, TEXT-088 WHERE MODULE-TEXT -
GROUP BY MOD-NAME-067, MOD-VER-067 -
ORDER BY 3 DESC
DISPLAY
 

If you are an SQL user with a suitably defined SQL schema describing your dictionary, then you could also use the following SQL statement in OCF to do the same thing (xxxxxxxx is the name of the SQL schema):

SELECT MOD_NAME_067, MOD_VER_067, COUNT(*) AS ROWS
FROM xxxxxxxx."MODULE-067", xxxxxxxx."TEXT-088"
WHERE "MODULE-TEXT"
GROUP BY MOD_NAME_067, MOD_VER_067
ORDER BY 3 DESC;

Additional Information:

CLEANUP utility

DREPORT 010

OLQ Batch

Accessing Network-Defined Databases (with SQL)

IDD Reference