1 / 68

Mastering ADABAS V8 in One Hour: Spanned Records, LOB Support, and Beyond 191

Learn ADABAS V8 features such as spanned records, LOB support, MUPEX, and more within an hour. Explore ACBX, link, SVC, NUC, and multiple extents. Understand FDT and miscellaneous details. See how compressed records work with different block sizes. Gain insights into setting up record spanning files, compressing spans, and ADAREP. Dive into the internals of ADABAS V8, removal of spanning records, and update scenarios. Monitor program performance, utility options, and efficient database management.

alaughlin
Download Presentation

Mastering ADABAS V8 in One Hour: Spanned Records, LOB Support, and Beyond 191

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ADABAS V8 (IN ONE HOUR) Jim Poole

  2. ADABAS V8 • SPANNED RECORDS • LOB SUPPORT • MUPEX, BEYOND 191 • ACBX • LINK / SVC / NUC • 6. MULTIPLE EXTENTS • 7. FDT • 8. MISCELLANEOUS

  3. PRIOR V8: V8: COMPRESSED RECORD DS BLOCKSIZE: 3390: 5,064 8391: 10,796 8393: 27,644 COMPRESSED RECORD DS BLOCKSIZE: 3390: 5,064 X 5 = 25,320 8391: 10,796 X 5 = 53,980 8393: 27,644 X 5 = 138,220 V8 SPANNED RECORDS.WHY 1 PRIMARY RECORD + UP TO 4 SECONDARY RECORDS RECORD SIZE LIMITED BY COMPRESSED RECORD SIZE (RSP.CD 49) : NOTE: ACTUAL DATA LIMITED BY BLOCK HEADER, RECORD HEADER, SPAN HEADER

  4. V8 SPANNED RECORDS. LAYOUT ASSO DATA FCB: TOPISN,MAXISN,MINISN MINSEC,MAXSEC DS2:SPAN-HDR AC: DS1: SPAN-HDR AC2: DS3:SPAN-HDR 1. RECORDS SEGMENTED ON FIELD BOUNDARY (LA FIELDS BY CHAR) 2. INDEX CONTAINS ONLY PRIMARY ISN 3. TOPISN,MAXISN,MINISN FOR PRIMARY 4. MINSEC,MAXSEC FOR SECONDARY

  5. V8 SPANNED RECORDS. SET UP ADADBS RECORDSPANNING FILE=fnr,MODE=ON !! REQUIRES EXCLUSIVE FILE USE !! or ADACMP COMPRESS SPAN or ? AOS ? ADAREP: File section: SPANNED REC SUPP YES CPEXLIST: SYNS 77 ET 2006-08-19 13:14:15 300 22 AD168DBS ENABLE SPANNED RECORD SUPPORT 241 NOTE: AC2 NOT ALLOCATED UNTIL SPANNING OCCURS

  6. V8 SPANNED RECORDS. ADAREP SPANNED RECS EXIST TOP-ISN = 1,000 MAX-ISN EXPECTED = 20,669 RECORDS LOADED = 1,000 MIN-ISN = 1 TOP AC2 ISN = 1,000 MAX AC2 ISN EXP. = 1,378 LIST I DEV BLOCK I SPACE ALLOC.I FROM TO I TYPE I TYPE LNGTH I BLOCKS CYL I RABN RABN I -----I------------I--------------I--------------I AC I 8391 4136 I 15 0I 12696 12710I AC2 I 8391 4136 I 1 0I 13761 13761I NI I 8391 4136 I 1000 5I 12711 13710I UI I 8391 4136 I 50 0I 13711 13760I FDT I 8391 4136 I 4 0I 1515 1518I DSST I 8391 4136 I 1 0I 2595 2595I I I I I DS I 8391 10796 I 2000 26I 18037 20036I

  7. V8 SPANNED RECORDS. REMOVAL ADADBS RECORDSPANNING FILE=fnr,MODE=OFF TIMELIMIT= (DFLT=60) !! REQUIRES EXCLUSIVE FILE USE !! • SCAN ALL DS TO ENSURE NO SPANNED RECORDS EXIST • IF TIMELIMIT EXCEEDED, ADADBS ABORTS ? CE ? : CHECK AC2 VERSUS DS ?? NOTE: SAME CHECKPOINT AS MODE=ON

  8. BH RH fields RH fields fields RH fields RH fields FREE SPACE BH BLOCK HEADER 4b 2b – INCLUSIVE USED BLOCK LENGTH 2b – x’0004’ RH RECORD HEADER 6b 2b – INCLUSIVE RECORD LENGTH 4b – ISN fields FIELDS: LENGTHS MU/PE COUNTERS EMPTY FLD COUNTS VALUES V8 SPANNED RECORDS. INTERNALS NO SPANNED RECORDS DS RABN:

  9. ONE SPANNED RECORD DS RABN: BH RH fields RH fields fields RH fields fields FS RH SPANNED RECORD HEADER 20b: 2b – INCLUSIVE RECORD LENGTH 4b – UNKNOWN 4b – ISN OF THIS RECORD 2b – INDICATOR: x’0081’ Primary Record x’0041’ Secondary Record 4b – ISN OF NEXT SECONDARY (x’00’s IF LAST) 4b – ISN OF PRIMARY RECORD V8 SPANNED RECORDS. INTERNALS 1. PRI ISN IN AC 2. SEC ISN’s IN AC2 3. SEC ISN MAY EQUAL PRI ISN

  10. INDICATOR -IRL ---ISN---- DS RABN X 0000 2A050004 2A010000 00000000 00040081 0010 00000001 00000004 99999FF4 E7F4F0F7 : : : PRI. ISN NEXT ISN INDICATOR -IRL ---ISN---- DS RABN Y 0000 07AA0004 07A60000 00000000 00010041 0010 00000000 00000004 80FCC1C1 C1C1C1C1 : : : NEXT ISN PRI. ISN MODE=ON V8 SPANNED RECORDS. Eg. 1 INTERNALS QUICK -IRL -IBL ---ISN---- DS RABN X 0000 0E820004 0E7E0000 00049999 9FF4E7F4 0010 F0F7F9F8 F1404040 40000F00 414FD540 : : : UPDATE A FEW 100 MORE BYTES:

  11. REC5-PRI REC5-SEC FOR 1ST SPANNED RECORD: “ POP – N – SPAN “ V8 SPANNED RECORDS. UPDATE to 1st SPAN 1STUNUSED DS EXTENT: … … A1 OR N1/N2 12K BYTES REC-5, REC6 OR REC-6, REC5 OR REC5

  12. V8 SPANNED RECORDS. UPDATES REGARDLESS OF REUSEDS OR RECORD POSITION: WHEN 1ST SPAN CREATED, IT MOVES TO END OF FILE ( POP – N – SPAN ) EG. WHAT IF ALL RECORDS IN FILE UPDATED TO SPAN ONCE ???? PROVIDES FASTER UTILITIES, USER READS, ETC. AFTER 1ST SPAN NEXT SPAN MAY BE ANYWHERE (PRI + SEC1 + . . . SECn) IF LRECL UPDATED TO < ONE BLOCKLENGTH: SPANNED HEADER CHANGED BACK TO UNSPANNED HEADER

  13. BI/AI PRI BI/AI PRI UPD: PRIMARY PRIMARY PRIMARY SECONDARY-1 SECONDARY-1 SECONDARY-1 SECONDARY-2 SECONDARY-2 SECONDARY-2 BI/AI SEC2 UPD: BI/AI PRI UPD: BI/AI SEC1 V8 SPANNED RECORDS. UPDATES PLOG QUICK PLOG ALWAYS CONTAINS PRIMARY RECORD (BI / AI) PLOG ONLY CONTAINS SECONDARY RECS IF UPDATED PLOG

  14. CREATE FILE DS BEFORE USED UNUSED 1064 BLKS UDPATE EACH REC TO PRI + SEC “ POP-N-SPAN” DS AFTER EMPTY UNUSED USED 1064 BLKS 39,936 BLKS V8 SPANNED RECORDS. PROGRAM PERFORMANCE FILE 241 / 19,968 RECORDS / SPANNED PRI + SEC FDT: AA . . . . . ZZ FOR EXAMPLE

  15. L3,FB=AA. L3,FB=ZZ. L2,FB=AA. L2,FB=ZZ. CPU 3.65 SEC ASSO IO 104 DATA IO 19968 DB CPU 5.79 SEC ASSO IO 129 DATA IO 39934 DB CPU 5.18 SEC ASSO IO 87 DATA IO 40998 DB CPU 5.65 SEC ASSO IO 107 DATA IO 40998 DB V8 SPANNED RECORDS. PROGRAM PERFORMANCE FILE 241 / 19,968 RECORDS / SPANNED PRI + SEC FDT: AA . . . . . ZZ FOR EXAMPLE NUC UP, RUN PGM, NUC DOWN

  16. QUICK V8 SPANNED RECORDS. UTILITY OPTIONS ADACMP COMPRESS / DECOMPRESS SPAN - enable span HEADER - Header in input or Add Header (DECOMP) DATADEVICE - Split records based on device type MAXLOGRECLEN - Assemble input records into larger recs ADADBS SPANCOUNT FILE=nnn CAN BE UPD OR ACC USERS SPECIFYING AC2RABN, MAXISN2: ADALOD ADAORD ADASAV FMOVE NOTE: ADAORD KEEPS PRI+SEC PAIRS

  17. V8 SPANNED RECORDS. ISSUES / CONCERNS • INCREASE BLOCKSIZE OR GO SPANNED? • - DB LEVEL vs FILE LEVEL • - CONVERSION vs ADADBS SWITCH • - LIMIT = TRACKSIZE vs LIMIT = 5 x BLOCKSIZE • - PROVEN vs NEW • - GUARANTEED PERFORMANCE vs

  18. V8 SPANNED RECORDS. ISSUES / CONCERNS. UNDO 2. BACKWARD CONVERSION OF SPANNED FILE: a. UPDATE / ENSURE ALL RECORDS BACK TO PRIMARY. ( ADADBS SPANCOUNT FILE=nnn) b. ADADBS RECORDSPANNING FILE=fnr,MODE=OFF NOTE: READ OF ALL DATA STORAGE (VS AC2) NOTE: REQUIRES EXCLUSIVE FILE USE CONSIDER USE OF DUPLICATE FILES, ADARES REGENERATE

  19. V8 SPANNED RECORDS. ISSUES / CONCERNS 3. INCREASE ADARUNs: NISNHQ / NH LWP (FOR LARGER DVT) LP, DUALPLS and RESULTANT SIZE OF WORK AND PLOGs

  20. V8 SPANNED RECORDS. ISSUES / CONCERNS 4. RECORD READ PERFORMANCE MORE AFFECTED IF FIELDs AT END OF RECORD. L2 READS ALL RECORDS L3,L1 READ SPANNED RECORD ONLY IF FIELDS REQUESTED L3 MAY BE MUCH FASTER THAN L2 5. DIRTY READS. EG. READ DA-FILE BY ZZ-FIELD DISPLAY AA-FIELD KEEP DESCRIPTORS IN FIRST OF RECORD. 6. GREATER RISK OF RSP.CD. 53 (UNTIL SUPPORT OF ACBX)

  21. V8 SPANNED RECORDS. ISSUES / CONCERNS • PRI + SPAN OR PRI + SPAN n. • PERFORMANCE AND IO OF • ADAULD • ADAORD • ADAINV

  22. END OF SPANNEDON TO LOB

  23. LOB SUPPORT. FCB FNR 10 EMPLOYEES FILE FCB FNR 11 LOB FIELD DATA PICTURES .JPG .TIF WORD DOC PPT PDS MEMBERS ETC,ETC < 2G

  24. IL SEG 1 SEG 2 AC 19-SLOTS LOB. EG 200K SEG 19 DS DS DS DS IBL-IRL-ISN-HDR-DATA IBL-IRL-ISN-HDR-DATA IBL-IRL-ISN-HDR-DATA IBL-IRL-ISN-HDR-DATA EG. 19 SEGMENTS 19 RECS DS Blksize=10,796 LOB SUPPORT: STRUCTURE Flags, leng BASEFILE: DS.REC. FLD1, FLD2 . . . LOB FIELD . . LOBFILE:

  25. ADACMP FNDEF='01,L2,0,A,LB,NV,NB‘ BINARY LOB X'00000004' DDEBAND LOB’s CREATING. ADACMP ADACMP: ADACMP COMPRESS ADACMP FILE=10 : : : ADACMP FNDEF='01,AA,8,A,NU,DE‘ : : : ADACMP FNDEF='01,L1,0,A,LB,NU‘ : : : CHAR. LOB LOB DATA MUST BE ADDED LATER VIA PROGRAM

  26. LOB’s CREATING. ADALOD 1 ADALOD “ BASE FILE “ ADALOD LOAD FILE=010 ADALOD LOBFILE=11 : : : SIZE FILE (DS,NI,UI,AC) MINUS LOB SPACE

  27. AVLOBS = AVERAGE LOB SIZE PER RECORD ER = ESTIMATED NUMBER OF RECORDS BPL = DS BLOCKS PER LOB = AVLOBS / DS.BLOCKSIZE QUICK DSSIZE = BPL * ER MAXISN = BPL * ER NISIZE = BPL * ER * ?20? / ASSO.BLOCKSIZE LOB’s CREATING. ADALOD 2 ADALOD “ LOB FILE “ ADALOD LOAD FILE=11,LOB ADALOD BASEFILE=10 ADALOD DSSIZE= ADALOD MAXISN= ADALOD NISIZE=,UISIZE= ADALOD rest of parms: very small

  28. LOB’s CREATING. ADALOD 2 EG. QUICK AVLOBS= 600K E.R. = 100,000 D.BLOCKSIZE = 10,796 A.BLOCKSIZE = 4,136 FOR EXAMPLE BPL = DS BLOCKS PER LOB = AVLOBS / DS.BLOCKSIZE = 600,000 / 10,796 = 56 DSSIZE = BPL * ER = 56 * 100,000 = 5,600,000 MAXISN = 5,600,000 NISIZE = BPL * ER * ?20? / ASSO.BLOCKSIZE = 5,600,000 * 20 / 4,136 = 27,000

  29. LOB’s CREATING. EXISTING FILES • ADADBS NEWFIELD FNDEF=. . . • ADALOD LOBFILE • NOTE: MUST DO ADADBS FIRST !

  30. QUICK LOB’s CREATING. ADAREP PART 1 **************** * FILE OPTIONS * **************** . CONTAINS LOB FIELDS . . PRIVILEGED USE . . . LOB FILE FILE NAME ------------------ ------------------- : : : 10 LOBFILE-BASE . L . . 11 LOBFILE-LOB . . . L

  31. LOB’s CREATING. ADAREP QUICK PART 2 ************* * * * LOB FILES * * * ************* FILE WITH I ASSOCIATED I LOB FIELDS I LOB FILE I ------------------------- 10 I 11 I -----------I------------I

  32. QUICK LOB’s CREATING. ADAREP PART 3 FILE DETAIL. BASE FILE : : : LOB file No Contain LOB fields Yes : : : 1 I L1 I 0 I A I LB,NU PART 4 FILE DETAIL. LOB FILE : : : LOB file Yes Contain LOB fields No : : : FDT not printed - this file is a LOB file

  33. LOB’s CREATING. DDM VIA SYSDDM • L DB Name F Leng S D Remark • -- ----------------- - ---- - - --------------------- • : : : • 1 L1 L@L1-FIELD I 4 LEN. IND. OF L1-FIELD • 1 L1 L1-FIELD A N LOB • LE=1073741821 • OPTIONS=LB

  34. LOB’s TESTING RULES OF ENGAGEMENT: • 0. NATURAL 4.2.1 • USE SMALL LOB’S (? SLOB’s ?) UNDER 32K • FTP TO MAINFRAME, A SMALL JPG PIC • STORE IN ADABAS • READ FROM ADABAS • FTP FROM MAINFRAME BACK TO PC TO VERIFY SEE SERVLINE24 TECH DOC 542357 FOR NATURAL ZAPS

  35. STORE IN ADABAS: LOB’s TESTING 0010 DEFINE DATA LOCAL 0030 1 DFILE VIEW OF FILE-10 0040 2 AA-FIELD 0050 /* 2 L@L1-FIELD 0060 2 L1-FIELD (A) DYNAMIC 0080 01 A (A) DYNAMIC 0090 01 LENG (I4) 0100 * 0110 END-DEFINE 0120 DEFINE WORK FILE 1 TYPE 'UNFORMATTED' 0130 READ WORK FILE 1 A 0140 GIVING LENGTH LENG 0150 DISPLAY LENG 0160 AA-FIELD := 'BATFSH' 0170 L1-FIELD := A 0180 STORE IN DFILE 0190 END TRANSACTION 0200 END-WORK 0210 END QUICK

  36. READ FROM ADABAS: LOB’s TESTING 0010 DEFINE DATA LOCAL 0020 * 0030 1 DFILE VIEW OF FILE-10 0040 2 AA-FIELD 0050 2 L@L1-FIELD 0060 2 L1-FIELD 0070 * 0080 01 A (A) DYNAMIC 0090 01 LENG (I4) 0100 END-DEFINE 0110 * 0120 DEFINE WORK FILE 2 TYPE 'UNFORMATTED' 0130 FIND (1) DFILE WITH AA-FIELD = 'BATFSH' 0140 A := L1-FIELD 0150 * 0160 * 0170 WRITE WORK 2 VARIABLE A 0180 END-FIND 0190 END QUICK

  37. QUICK LOB’s TESTING A NICE NATURAL PGM DEFINE DATA LOCAL 1 DFILE VIEW OF FILE-10 2 AA-FIELD 2 L@L1-FIELD 2 L1-FIELD (A040) END-DEFINE READ DFILE DISPLAY *ISN AA-FIELD L@L1-FIELD L1-FIELD END

  38. LOB’s ADARUN PARMS INCREASE: LBP/LFIOP LU > MAX LOB/SIZE (RSP.CD. 152) NAB > LU (RSP.CD. 254) NH/NISNHQ > BPL * ? (RSP.CD. 46) LP/WORKSIZE > ? (RSP.CD. 9-15) DUALPLS > ? LDEUQP > (RSP.CD. 197)

  39. LOB’s FINAL THOUGHTS 1. DSREUSE / ISNREUSE OFF ? 2. REORDER, KEEP LOB SEGMENTS TOGETHER 3. RSP.CD. 132 (GET UPDATE MANUAL FROM SERVLINE) 4. PC NATURAL 6.2.2. , ENTIRE NETWORK, etc. 5. HOW TO REMOVE LOB? DELETE LOBFILE / ADACMP DECOMPRESS/CMP/LOD BASEFILE Or ZAP SOMETHING (FDT,FCB)?

  40. BEYOND 191 MUPEX 1. SET AT THE FCB LEVEL, NOT FDT 2. MAX OF 65,534 OCCURANCES (SEE DS RECORD LIMITS) 3. SET FOR BOTH MU AND PE TECH REVIEW: MU DE DO NOT HAVE OCCURANCE NUMBER IN INV. LIST PE DE HAVE THE OCCURANCE NUMBER IN INV. LIST

  41. EXISTING FILE (NO PE DE’s): ADADBS MUPEX FILE=nnn MUPECOUNT=2 EXISTING FILE (PE DE’s): 1. RELEASE PE DE’S 2. ADADBS MUPEX 3. ADAINV PE DE’S X’0B’ OR X’000B’ DDEBAND MUPEX. DEFINING LOADING NEW FILE: ADACMP COMPRESS MUPEX MUPECOUNT=1|2 Eg. OCC.CNT=11

  42. QUICK MUPEX. ADAREP PART 1 **************** * FILE OPTIONS * **************** . 2-BYTE MU/PE INDEX . . REPLICATED . . . PRIV USE FILE NAME ------------------ ------------------- : : : 16 EMPLOYEES . T . . PART 2 * FILE 241 (TESTFILE ) * : : : TWO BYTE MU/PE YES

  43. BF UPDATE TO 191 OCC: C0 – 2B FLAG 02 – LENGTH 00C0 - COUNT C0 02 00C0 UPDATE TO 192 OCC: C0 02 00C1 C0 02 00C8 C0 02 0001 UPDATE TO 193 OCC: UPDATE TO 200 OCC: UPDATE TO 1 OCC: MUPEX. DS INTERNALS OCC CNTR DS RECORD: . . . 01 L-VALUE . . . NOTE: COUNT NEVER RETURNS TO PRE-2B CONDITION !

  44. 01,PZ,PE. 02,PA,03,A,DE. 02,PB,01,1. SUPDE=S1=AA(1,3),PB(1,1),ZZ(1,3) FDT PA: 04 F1F1F1 09 05 S1: 08 C1C1C1F1E9E9E9 09 05 KEY: EXCLUSIVE LENGTH COMPRESSED VALUE PE OCCURANCE CNT ISN QTY ISN’s PA: 05 F1F1F1 0009 05 S1: 09 C1C1C1F1E9E9E9 0009 05 MUPEX. INVERTED LIST PE DE ONLY Eg. NI ELEMENT: RELEASE S1 / MUPEX / ADAINV S1

  45. MUPEX. 1. IN DATA STORAGE, EXTRA BYTE NOT ADDED UNTIL OCC > 191 2. FOR PE-DE, EXTRA BYTE ADDED VIA ADAINV. (MU DE DO NOT HAVE OCCURANCES IN INVERTED LIST) 3. WORST CASE: DE LENGTH (+ OCC) MUST BE LESS THAN 253 4. ONCE EXTRA BYTE ADDED IN DATA STORAGE IT IS NEVER REMOVED

  46. MUPEX CONVERTING BACK. • UPDATE ALL RECORDS TO LESS THAN 192 OCCURANCES. • ADACMP DECOMPRESS • ? MASSAGE FILE TO REMOVE EXTRA BYTE ? • ADACMP COMPRESS • ADALOD IF CHANGE ENHANCEMENTS EXISTED: ? UPDATE BACK TO 1 BYTE ? ? ADADBS MUPEX FILE=nnn,MUPECOUNT=1 ?

  47. MUPEX PE DE ISSUES 2700 FILES 1000 CONTAIN MU/PE 170 CONTAIN PE-DE FOR EXAMPLE DISCUSSION / SOLUTIONS: • TIME TO ADAINV PE-DE, IS IT A PROBLEM?

  48. DIRECT CALL CHANGES ADABAS THE OLDE ADARUN RSP.CD LU= 152 NAB= 254,253 80 BYTES of data FBL,RBL,SBL,VBL,IBL (2b = 32K limit) ACB: UP TO 1 EACH: FB,RB,SB,VB,IB BUFFERS:

  49. THE NEW ACBX CALL ‘ADABAS’ USING ACBX, . . . , ABD1,ABD2,ABD3,ABD4, . . . !! SEE COMMAND REFERENCE MANUAL !! 192 BYTES Eg. FB => 48 BYTES Eg. RB => 48 BYTES ACBX: Eg. SB => 48 BYTES Eg. IB => 48 BYTES Eg. VB => 48 BYTES ABD’ s: Eg. MB => 48 BYTES Eg. FB2 => 48 BYTES Eg. RB2 => 48 BYTES “ANY SEQUENCE, MULTIPLES” NOTE: V8 ADALINK REQUIRED, ELSE RSP.CODE 253-11

  50. QUICK ACBX FEATURES: • 4 BYTE DBID AND 4 BYTE FNR • 4 BYTE ISN AND 8 BYTE ISN OPTIONS • 8 COMMAND OPTIONS (FROM 2) • 6 ADDITIONS (FROM 5) • ENHANCE ERROR FIELDS • 8 BYTE COMPRESSED/DECOMPRESSEC REC LENGTH • MORE ACCURATE CMDTIME

More Related