CoolSpools Spool Converter exit programs and migrating from Version 5 to Version 6
In order to use the bound version of the CoolSpools option list APIs introduced with Version 5, and any other functions exported from CoolSpools V5 service program CS_SRVPGM, exit programs called during processing (and defined on the EXITPGM parameter of CVTSPLPDF and other commands) must:
a) be bound to the version 5 service program object using CRTPGM ... BNDSRVPGM(CS_SRVPGM)
b) run in the caller's activation group (CRTPGM ... ACTGRP(*CALLER))
The bound version of the APIs are those defined in copybook COOLSPV6R1/CS_SRCFILE member AR_OPTFNCP without the EXTPGM keyword (e.g. OptCrtList, OptAddItem etc.). These are called via a static call to a procedure exported from a service program.
There are also callable equivalents to the bound APIs (those specified with the EXTPGM keyword, e.g. AR_CRTLSTR, AR_ADDITMR). These are called via a dynamic call to a program object.
As mentioned in the V6 Memo to Users, all exit programs and other user-written programs that bind to service program CS_SRVPGM must be recreated in order to work with Version 6, otherwise signature violations will occur. It is not possible to have a single version of such an exit program which uses the bound APIs and which is compatible with both V5 and V6. Different versions of the program object, bound to the appropriate V5 or V6 service program(s) are required.
Also, in Version 6 some functions have been moved from Spool Converter service program CS_SRVPGM to the new *BASE service program CP_SRVPGM so they can be shared between CoolSpools Spool Converter and CoolSpools Database. Previously, when creating exit programs to work with CoolSpools, it was necessary to bind in just service program CS_SRVPGM when creating your program with CRTPGM. Now, you should bind in both CS_SRVPGM and the new service program CP_SRVPGM.
N.B.!
Remember to specify ACTGRP(*CALLER) so exit programs run in the same activation group as CoolSpools!
The command needed to recreate exit programs for use with V6 is therefore now something like:
CRTPGM
PGM(your_lib/your_pgm)
MODULE(your_lib/your_module)
BNDSRVPGM(COOLSPV6R1/CP_SRVPGM COOLSPV6R1/CS_SRVPGM)
ACTGRP(*CALLER)
If the callable (dynamic binding) versions of the CoolSpools option list APIs are being used (i.e. you are making calls to programs, such as AR_ADDITMR, rather than to the equivalent procedures in a service program, such as OptAddItem, the exit programs do not need to be recreated.
If you have migrated to Version 6 and your exit programs do not appear to be working, check the joblog for signature violation errors. If you see messages about signature violations, you have probably not re-created your exit programs as described above. Please bear in mind, however, that once the exit programs have been recreated as described above, they can no longer be used with Version5, so, if you intend to run the two versions in parallel for a period of time, you should seriously consider having a V5 version and a V6 version of the exit program.
a) be bound to the version 5 service program object using CRTPGM ... BNDSRVPGM(CS_SRVPGM)
b) run in the caller's activation group (CRTPGM ... ACTGRP(*CALLER))
The bound version of the APIs are those defined in copybook COOLSPV6R1/CS_SRCFILE member AR_OPTFNCP without the EXTPGM keyword (e.g. OptCrtList, OptAddItem etc.). These are called via a static call to a procedure exported from a service program.
There are also callable equivalents to the bound APIs (those specified with the EXTPGM keyword, e.g. AR_CRTLSTR, AR_ADDITMR). These are called via a dynamic call to a program object.
As mentioned in the V6 Memo to Users, all exit programs and other user-written programs that bind to service program CS_SRVPGM must be recreated in order to work with Version 6, otherwise signature violations will occur. It is not possible to have a single version of such an exit program which uses the bound APIs and which is compatible with both V5 and V6. Different versions of the program object, bound to the appropriate V5 or V6 service program(s) are required.
Also, in Version 6 some functions have been moved from Spool Converter service program CS_SRVPGM to the new *BASE service program CP_SRVPGM so they can be shared between CoolSpools Spool Converter and CoolSpools Database. Previously, when creating exit programs to work with CoolSpools, it was necessary to bind in just service program CS_SRVPGM when creating your program with CRTPGM. Now, you should bind in both CS_SRVPGM and the new service program CP_SRVPGM.
N.B.!
Remember to specify ACTGRP(*CALLER) so exit programs run in the same activation group as CoolSpools!
The command needed to recreate exit programs for use with V6 is therefore now something like:
CRTPGM
PGM(your_lib/your_pgm)
MODULE(your_lib/your_module)
BNDSRVPGM(COOLSPV6R1/CP_SRVPGM COOLSPV6R1/CS_SRVPGM)
ACTGRP(*CALLER)
If the callable (dynamic binding) versions of the CoolSpools option list APIs are being used (i.e. you are making calls to programs, such as AR_ADDITMR, rather than to the equivalent procedures in a service program, such as OptAddItem, the exit programs do not need to be recreated.
If you have migrated to Version 6 and your exit programs do not appear to be working, check the joblog for signature violation errors. If you see messages about signature violations, you have probably not re-created your exit programs as described above. Please bear in mind, however, that once the exit programs have been recreated as described above, they can no longer be used with Version5, so, if you intend to run the two versions in parallel for a period of time, you should seriously consider having a V5 version and a V6 version of the exit program.