1 / 31

Advantage TM CA-IDMS ® User Exits and Database Procedures

Advantage TM CA-IDMS ® User Exits and Database Procedures. Data Management and Application Development DI440SN. Session Abstract .

weylin
Télécharger la présentation

Advantage TM CA-IDMS ® User Exits and Database Procedures

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. AdvantageTM CA-IDMS® User Exits and Database Procedures Data Management and Application Development DI440SN

  2. Session Abstract • This session discusses the various exits available within AdvantageTM CA-IDMS® and how they can be used to monitor, modify and enhance the functionality available within AdvantageTM CA-IDMS®. Real life examples will be given. Internal conventions are also discussed.

  3. Biography • Pete Charles COGITO • I have been working with AdvantageTMCA-IDMS® for more than 25 years. Six of these were with Cullinet. In this time I have given many classes and presentations at many Cullinet , Computer Associates and IUA conferences. I work for COGITO but spend the vast majority of my time at BT.

  4. Agenda • AdvantageTM CA-IDMS® ’systems programming’ • DB Exits • DC/UCF Exits • Numbered Exits • Database Procedures • Miscellaneous Exits • Internal conventions

  5. CA-IDMS® ’systems programming’ • Code is an extension of the AdvantageTM CA-IDMS® systems • Can have high profile on failure • Extend or modify system functions • Add system functions • Monitor system functions • Global application functionality • Written in Assembler

  6. DB Exits IDMSCLCX • CALC Exit • Linked with IDMSDBMS and IDMSUTIL • Write your own CALC routine!! • Called when ever the system is calculating a CALC target page • Failure means all CALC activities fail. So system would be unusable • Can be used for tailored segmentation of large database • Only global record exit

  7. DB Exits IDMSAJNX • Archive Journal exit • Linked with IDMSUAJN • Called after each journal block is offloaded • Can be used to analyses journal records • Statistics collection, Audit trails, Security Checks • Failure not too catastrophic

  8. DB Exits IDMSDBIO • Four different exits available for IDMSDBIO • IDMSDPLX , IDMSIOXT , IDMSIOX2 and IDMSJN2 • All must be linked with IDMSDBIO • All I/O related • Duplicate I/O e.g. provide a duplex journal • Substitute I/O e.g. COGITO’s DB-Image, ASG’s Fast Access

  9. DB Exits IDMSDBIO • I/O Error handling • IDMSIOX2 is most comprehensive • Lots of hooks for third party software • Impact of failure depends on scope • Might only affect a single file but could affect whole CV

  10. DC/UCF Exits TCKREXIT • Ticker Exit • Called at every ticker interval as defined in the SYSGEN • Linked with CV startup module • Can be used to control or monitor time related events • Impact of failure. If it abends you will get SMPC every ticker interval

  11. DC/UCF Exits WAITEXIT • Called at every time CV issues an operating system wait • Linked with CV startup module • Can be used to monitor ‘idle’ time

  12. DC/UCF Exits WTO Exits • WTOEXIT called when ever IDMS writes to the console • Most commonly used to submit Archive Journal and Log Offload jobs • Also to submit start up, shutdown or user jobs • WTOREXIT called when ever IDMS solicits an operate reply • Both linked with CV startup module

  13. Numbered Exits • Can be linked as DC program or with RHDCUXIT • Identified by number • Can use either IBM or DC calling conventions • May be user or system mode.Some system exits must be system mode • I would ALWAYS us DC Calling conventions and system mode • Abends cause system dumps

  14. Numbered Exits • 0 through 255 are system exits. Currently go up to 38 • System exits defined by CA • 256 and above are user exits • Users exits called by using #XIT macro. • All defined by #DEFXIT macro

  15. Numbered Exits RHDCUXIT CSECT #DEFXIT , EXIT 00 #DEFXIT MODE=SYSTEM,CALL=DC,EP=XSON,AMODE=ANY EXIT 01 #DEFXIT , EXIT 02 #DEFXIT , EXIT 03 #DEFXIT , EXIT 04 #DEFXIT MODE=SYSTEM,CALL=DC,EP=XTASK,AMODE=ANY EXIT 05 MODE=SYSTEM or USER, CALL=DC or IBM

  16. Common Numbered Exits • 00 System Startup • 14 BIND RUN UNIT and READY AREA • 23 PRE BIND RUN UNIT ( Called before Exit 14 ) • 20 Resource Limit • 30 Dead Lock victim selection

  17. Database Procedures • Schema Defined • Area or Record level • Linked stand alone • Called By IDMSDBMS so an extension of the database manager • Defined in SYSGEN • Write in Assembler

  18. Schema Record Syntax CALL procedure-name --- BEFore -------------------------------+ +- AFTer -----------¦ +- CONnect ----¦ +- on ERRor during -+ +- DISCONnect -¦ +- ERAse ------¦ +- FINd -------¦ +- GET --------¦ +- MODify -----¦ +- STOre ------+

  19. Schema Area Syntax CALL procedure-name --- BEFore ------------------------------------+ +- AFTer -----------¦ +- function-option -+ +- on ERRor during -+ Expansion of function-option >>--- REAdy ------------------------------------------------------------------>< +- for --- EXCLUSive --- UPDate --------+ +- RETrieval -+ +- PROtected --- UPDate ------ +- RETrieval -+ +- SHAred --- UPDate --------- +- RETrieval -+ +- UPDate -------------------- +- RETrieval -----------------+ - FINish ------------------------------------------¦ +- COMmit ------------------------------------------¦ +- ROLlback ----------------------------------------+

  20. Compression/Decompression • CA Provide IDMSCOMP and IDMSDCOM for compression and decompresssion • Call IDMSDCOM after GET • CALL IDMSCOMP before STORE and before MODIFY • CA recommend that both are called before FINISH. Causes them to free their storage

  21. DB Procedures and Security • Encrypt sensitive data • Cancel the DML Command • Can use the #SECHECK Macro

  22. DB Procedures and Restructure • Use to populate new fields using application logic • Use NUPROCS parameter for restructure • Procedure called before MODIFY i.e. after record has been restructured but before it is written back to database • Very fast. Much quicker than adding field then an application to populate.

  23. Miscellaneous Exits • OPTIXIT and OPTIQXIT are used in the CICS environment • Linked with IDMSINTC • Used to dynamically route transaction to different CVs • OPTIXIT is for DML and OPRQXIT is for SQL

  24. Miscellaneous Exits • IDMSSVCX SVC exit • DC exits are an extension of CA-IDMS • IDMSSVCX is an extension of the operating system • It runs in key 0 supervisor state so can over write ANY location in memory • Errors in this can bring down the operating system. Yes I have seen it happen • Used to add data into ERE must commonly for accounting/charging

  25. Internal Conventions • R9 always point to the TCE for the active task • R10 always points to the IDMSCSA • R13 always points to next available word in the TCE stack • R12 Normally base register • R14 Return address • R11 very often to used to point to work area

  26. Internal Conventions • #MOPT Macro used to set mode to system or user ( always use system ) • #START Macro. Most import for multitasking as it defines the MP mode required by the exit • Getting MP mode wrong can have many side effects • An example is a DB procedure that was not changed to rum mode any at R1 • Caused hundreds of thousands of waits for mode DB

  27. Internal Conventions • #RTN Macro just returns • #GETSTK used get a small amount of work space from TCE stack • By default address returned in R11 • If issuing any DC calls always use RGSV option on the macro being used • Can specify R2 to R8 • R9 and R10 are fixed and should never be changed

  28. Internal Conventions • R11,R12, R13 and R14 are always saved • R0,R1 and R15 are overwritten by the macro so are never saved

  29. Summary A Few Words to Review • Simple but powerful tools • CV administration • CV extensions • DBA tools • Application Components • Easier then they sound • Remember they are there and check if they can help you

  30. Questions & Answers

  31. Session Evaluation Form After completing your session evaluation form ... ... please place it in the basket at the back of the room.

More Related