330 likes | 662 Views
Written by: Kay Sussmann Consultant. Presented by: Martin Cox Cogito Ltd. 1211 Recovery Techniques. Abstract. This session discusses a variety of techniques for recovering from an “out of space” condition (IDMS Error Status 1211) including when and how
E N D
Written by: Kay Sussmann Consultant. Presented by: Martin Cox Cogito Ltd. 1211 Recovery Techniques
Abstract This session discusses a variety of techniques for recovering from an “out of space” condition (IDMS Error Status 1211) including when and how to use EXTEND SPACE, the EXPAND PAGE Utility and the UNLOAD/RELOAD Utilities.
Topics • 1211 Causes • EXTEND SPACE • EXPAND PAGE • UNLOAD/RELOAD
1211 IDMS Error Status No database page in the area and page range assigned to the specified record contains sufficient space to store the record occurrence. Note that pages containing 255 records are considered full and are not available for storing additional records. Note that if the DMCL specifies a PAGE RESERVE clause for the area in question, space may be avail- able but not accessible for the STORE function. This space can be accessed by changing the DMCL.
AREA Definition CREATE AREA EMPDEMO.EMPAREA PRIMARY SPACE 1000 PAGES FROM PAGE 10001 MAXIMUM SPACE 2000 PAGES PAGE SIZE 4096 CHARACTERS PAGE RESERVE SIZE 2048 CHARACTERS WITHIN FILE EMPFILE FROM 1 FOR ALL BLOCKS; MAXIMUM SPACE 2000 PAGES
1211 Recovery Techniques DCMT VARY SEGMENT segment RETRIEVAL TAKE A BACKUP!
1211 Recovery Techniques Remove or reduce page reserve 1. DCMT VARY SEGMENT EMPDEMO OFFLINE; 2. ALTER AREA EMPDEMO.EMPAREA PAGE RESERVE SIZE 0 CHARACTERS; 3. GENERATE DMCL CVDMCL; PUNCH DMCL CVDMCL; Link-edit DMCL CVDCML 4. DCMT VARY DMCL CVDMCL NEW COPY; 5. DCMT VARY SEGMENT EMPDEMO ONLINE;
EXTEND SPACE • Allows you to logically extend the page range of an area if page range numbers are available • BAND-AID fix only!
EXTEND SPACE 1. DCMT VARY SEGMENT EMPDEMO OFFLINE • Modify SEGMENT definition: • CREATE FILE EMPDEMO.EMPFILE2 • ASSIGN TO EMPFILE2 • DSN ‘EMPDEMO.EMPFILE2’; • ALTER AREA EMPDEMO.EMPAREA • EXTEND SPACE 500 PAGES • WITHIN FILE EMPFILE2 • FROM 1 FOR ALL BLOCKS; • GENERATE DMCL CVDMCL; • PUNCH DMCL CVDMCL; • Link-edit CVDMCL;
EXTEND SPACE • Allocate file’s dataset (EMPDEMO.EMPFILE2) • FORMAT FILE EMPDEMO.EMPFILE2; 6. DCMT VARY DMCL CVDMCL NEW COPY 7. DCMT VARY SEGMENT EMPDEMO ONLINE 8. SCHEDULE UNLOAD/RELOAD ASAP!
EXPAND PAGE • Increase the page size of an area EXPAND page for FILE segment-name.file-name INTO ddname NEWSIZE new-page-size; Watch out for: AREA maps to multiple files AREA shares same file with a different AREA
EXPAND PAGE 1. Modify AREA definition: ALTER AREA EMPDEMO.EMPAREA PAGE SIZE IS 8192 CHARACTERS ORIGINAL PAGE SIZE IS 4096 CHARACTERS; ORIGINAL PAGE SIZE IS 4096 CHARACTERS; • Alter area’s file(s) to specify new DSN or • other characteristics (optional) • ALTER FILE EMPDEMO.EMPFILE • DSNAME ‘EMPDEMO.EMPFILE2’;
EXPAND PAGE 3.GENERATE DMCL CVDMCL; PUNCH DMCL CVDMCL; Link-edit CVDMCL • Allocate file (EMPDEMO.EMPFILE2) dataset • to accommodate new page size 5. DCMT VARY SEGMENT EMPDEMO OFFLINE
EXPAND PAGE 6. Execute EXPAND PAGE utility using OLD DMCL EXPAND PAGE FOR FILE EMPDEMO.EMPFILE INTO EMPFILE2 NEW SIZE 8192; 7. DCMT VARY DMCL CVDMCL NEW COPY 8. DCMT VARY SEGMENT EMPDEMO ONLINE
UNLOAD/RELOAD • Already at maximum page size (32K) • Already at maximum records per page on any page • Increased Page Range would cause overlaps • Redistribute records and indexes properly
UNLOAD/RELOAD • Change area page range • Change area page size • Change page ranges for record types • Reassign records to different areas • Change record location modes • Store VIA records by means of a different set
UNLOAD/RELOAD • Change INDEX compression and IBC values • Change SYSTEM owned INDEX area and page ranges • Change maximum number of records per page
UNLOAD/RELOAD • Cannot remove a set • Cannot remove a record type • Insert new data fields in records • Change order of a sorted set • Connect records to new sets • Change or delete record Ids • Change size, location or data type of sorted or index sets • Change a set from unsorted to sorted
AREA Definition FILE EMPDEMO.EMPFILE ASSIGN TO EMPFILE DSN ‘EMPDEMO.EMPFILE’ AREA EMPDEMO.EMPAREA PRIMARY SPACE 1000 PAGES FROM PAGE 10001 MAXIMUM SPACE 2000 PAGES PAGE SIZE 4096 CHARACTERS WITHIN FILE EMPFILE FROM 1 FOR ALL BLOCKS;
UNLOAD/RELOADBasic Steps • All logically-deleted records must be removed from the area(s) being unloaded/reloaded CLEANUP SEGMENT EMPDEMO USING EMPSS01 AREA EMPAREA;
UNLOAD/RELOADBasic Steps 2. Modify the segment ALTER AREA EMPDEMO.EMPAREA PRIMARY SPACE 2000 PAGES FROM PAGE 10001 MAXIMUM SPACE 4000 PAGES PAGE SIZE 6000 CHARACTERS EXCLUDE FILE EMPFILE WITHIN FILE EMPFILE FROM 1 FOR ALL BLOCKS SUBAREA CALC-RANGE OFFSET 1 PAGE FOR 100 PERCENT;
DISPLAY DMCL CVDMCL • WITH ALL AS SYNTAX; Change DMCL name (CVDMCL becomes RELODMCL UNLOAD/RELOADBasic Steps 3. Create a new DMCL for use by the RELOAD b. GENERATE DMCL RELODMCL; PUNCH DMCL RELODMCL; Link-edit RELODMCL
UNLOAD/RELOADBasic Steps 4. Execute the UNLOAD utility UNLOAD SEGMENT EMPDEMO USING EMPSUBS AREA EMPAREA RELOAD INTO SEGMENT EMPDEMO USING EMPSUBS DMCL RELODMCL;
UNLOAD/RELOADBasic Steps 5. Rename old EMPDEMO.EMPFILE 6. Allocate and format the new EMPDEMO.EMPFILE
UNLOAD/RELOADBasic Steps 7. Execute the RELOAD utility RELOAD STEP step-name FROM NOTIFY notify-record-count as SORTEXIT REUSE workfiles
UNLOAD/RELOADBasic Steps 7. Execute the RELOAD utility (continued) RELOAD AS SORTEXIT; Step 1: SORT1 Step 2: IDMSDBL2 Step 3: SORT2 Step 4: IDMSDBLX Step 5: SORT3 Step 6: IDMSDBL3 Step 7: SORT4 Step 8: IDMSDBL4
UNLOAD/RELOADBasic Steps 8. GENERATE DMCL CVDMCL; PUNCH DMCL CVDMCL; Link-edit CVDCML • DCMT VARY DMCL CVDMCL NEW COPY • DCMT VARY SEGMENT EMPDEMO ONLINE
UNLOAD/RELOADWith Schema Changes • Create new schema from original schema • Create new global subschema from original global subschema with a unique name • Modify schema as needed to reflect any logical changes then VALIDATE. REGENERATE ALL SUBSCHEMAS.
UNLOAD/RELOADWith SCHEMA Changes • Restructure database if logical changes necessitate it. 5. Follow the same basic steps for UNLOAD/RELOAD indicating the new subschema name in the RELOAD clause.
1211 PREVENTION • PRINT SPACE with FULL option • IDMSDBAN
1211 Recovery Techniques CA-IDMS Database Administration, Chapters 25 and 30 • EXTEND SPACE • EXPAND PAGE • UNLOAD/RELOAD CA-IDMS Database Administration CA-IDMS Utilities CA-IDMS Utilities
Martin.Cox@cogito.co.uk 1211 Recovery Techniques