From the old design notes: - Write custom "dummy entry point to DSNHLI", which would load true DSNALI, DSNHLI2 and DSNHDECP on a first call. - Call DSNALI to issue "connect to DB2" and then "open plan". - You'd need to obtain some parms, such as the subsystem name to connect [this is where you may need to access DSNHDECP] and the plan name to open. If these values are the same for all subtasks [it is possible to connect to DIFFERENT subsystems and/or open multiple plans, one such pair per a subtask] pass them through JCL, say on a DS Name of a temp dataset with DD=DB2PLAN, which you can query by RDJFCB. Otherwise, set up a table [e.g. a non-executable load module] where each subtask can find its parms using a key, passed on ATTACH. - DSNHLI2 is where you will funnel all SQL calls. - To direct SQL calls to this module, link it statically to the SQL requesters and use CHANGE <your_pgm-name>(DSNHLI)
This has been implemented 15 years ago, so today there could be better ways to achieve your goals. HTH, -Victor- ================================================ I am looking for any pointers to documentation describing how to structure a multitasking assembler program where multiple subtasks are concurrently accessing DB2. No two (2) subtasks will be accessing the same DB2 table concurrently. Any assistance will be most welcome. John P. Baker
