On Sunday, November 22, 2020 at 5:51:33 p.m. UTC-5, rkd...@gmail.com wrote:works without errors. There is no SQLCOMP for the calling program, which has no SQL region.
On Sunday, November 22, 2020 at 2:21:49 PM UTC-8, Randall wrote:
On Sunday, November 22, 2020 at 5:13:42 p.m. UTC-5, rkd...@gmail.com wrote:
On Sunday, November 22, 2020 at 1:58:13 PM UTC-8, Keith Dick wrote:
On Sunday, November 22, 2020 at 10:40:59 AM UTC-8, Randall wrote:
Hi All,
I have a c89 program that is calling a DLL that uses SQL/MP. I'm using dlopen/dlsym to get to the methods. On the first call (happens to be BEGIN WORK), I'm getting SQL [-8025] (not SQL compiled) despite the fact that the SQLCOMP of the DLL
not apply for C as well.Anyone have experience with this situation?
Thanks,The SQL/MP Programming Manual for COBOL says explicitly that SQL/MP statements are not supported in user libraries, SRLs, or DLLs. I did not find a similar restriction in the manual for C, but I'd be very surprised if the same restriction did
Randall
they updated the programming manual for COBOL to document the restriction for SRLs and DLLs, but did not make the same update for the programming manual for C. I am pretty sure that this does NOT mean that SQL/MP statements can be used in a DLL -- I amI checked the manual for C again, and it does say that the object file specified to the SQLCOMP command must not be a user library or system library, so that is a somewhat similar restriction, just not mentioning SRLs or DLLs. I don't know why
SQL/MP does use static global memory for the structures used to pass the host variables for each statement to the SQL runtime, but I might be remembering that wrong.Well, all I can say is "drats". That would be a very nice feature to have. But I can see the loader having issues trying to chase down whether DLLs are registered in the proper catalog.I don't believe the issue has anything to do with catalogs. If the SQL/MP runtime needs any statically-allocated global memory, that would be a problem for putting SQL/MP code in a user library, and maybe in DLLs, too. I have a dim recollection that
manuals to refresh my memory on whether that could be done.The other possible challenge is that the runtime has to load the query plans from the SQL region of the object file in which the SQL statements reside. I think finding the name of the object file would be possible, though I'd have to read some
made up something that worked - localized static compile of the SQL module. Have you considered the possibility that the error message could be incorrect? At times I have wasted large amounts of effort because I was misdirected by an error message that was misleading, and sometimes utterly wrong.SQL/MX can be used in a DLL, so if you can switch to using SQL/MX in the DLL (SQL/MX can access SQL/MP tables, you know), that might solve your problem.I have a separate implementation for SQL/MX - that part is no issue. Yes, global memory is required, but when I get failures, the issue definitely is highlighting the DLL not being registered even through it is registered in the SQL Catalog. Ah well. I
On Tuesday, November 24, 2020 at 12:01:44 PM UTC-8, Randall wrote:works without errors. There is no SQLCOMP for the calling program, which has no SQL region.
On Sunday, November 22, 2020 at 5:51:33 p.m. UTC-5, rkd...@gmail.com wrote:
On Sunday, November 22, 2020 at 2:21:49 PM UTC-8, Randall wrote:
On Sunday, November 22, 2020 at 5:13:42 p.m. UTC-5, rkd...@gmail.com wrote:
On Sunday, November 22, 2020 at 1:58:13 PM UTC-8, Keith Dick wrote:
On Sunday, November 22, 2020 at 10:40:59 AM UTC-8, Randall wrote:
Hi All,
I have a c89 program that is calling a DLL that uses SQL/MP. I'm using dlopen/dlsym to get to the methods. On the first call (happens to be BEGIN WORK), I'm getting SQL [-8025] (not SQL compiled) despite the fact that the SQLCOMP of the DLL
not apply for C as well.Anyone have experience with this situation?
Thanks,The SQL/MP Programming Manual for COBOL says explicitly that SQL/MP statements are not supported in user libraries, SRLs, or DLLs. I did not find a similar restriction in the manual for C, but I'd be very surprised if the same restriction did
Randall
they updated the programming manual for COBOL to document the restriction for SRLs and DLLs, but did not make the same update for the programming manual for C. I am pretty sure that this does NOT mean that SQL/MP statements can be used in a DLL -- I amI checked the manual for C again, and it does say that the object file specified to the SQLCOMP command must not be a user library or system library, so that is a somewhat similar restriction, just not mentioning SRLs or DLLs. I don't know why
that SQL/MP does use static global memory for the structures used to pass the host variables for each statement to the SQL runtime, but I might be remembering that wrong.Well, all I can say is "drats". That would be a very nice feature to have. But I can see the loader having issues trying to chase down whether DLLs are registered in the proper catalog.I don't believe the issue has anything to do with catalogs. If the SQL/MP runtime needs any statically-allocated global memory, that would be a problem for putting SQL/MP code in a user library, and maybe in DLLs, too. I have a dim recollection
manuals to refresh my memory on whether that could be done.The other possible challenge is that the runtime has to load the query plans from the SQL region of the object file in which the SQL statements reside. I think finding the name of the object file would be possible, though I'd have to read some
I made up something that worked - localized static compile of the SQL module.SQL/MX can be used in a DLL, so if you can switch to using SQL/MX in the DLL (SQL/MX can access SQL/MP tables, you know), that might solve your problem.I have a separate implementation for SQL/MX - that part is no issue. Yes, global memory is required, but when I get failures, the issue definitely is highlighting the DLL not being registered even through it is registered in the SQL Catalog. Ah well.
Have you considered the possibility that the error message could be incorrect? At times I have wasted large amounts of effort because I was misdirected by an error message that was misleading, and sometimes utterly wrong.file. Perhaps you could trick it by including an unused SQL/MP statement in the main object file and SQL-compile the main object file. I don't know that would work. I think you'd still have trouble with the global memory that SQL/MP uses, but I might be
I am pretty sure the runtime check does not look in the catalog, but checks the flag in the object file that says the object file is SQL-compiled. Maybe the runtime check doesn't know how to find the DLL object file and only looks at the main object
Since you say you have SQL/MX working in a DLL, and since SQL/MX can access SQL/MP data, I kind of wonder why you would continue trying to get SQL/MP to work in a DLL. What benefit would that give you?
On Tuesday, November 24, 2020 at 12:25:03 PM UTC-8, Keith Dick wrote:DLL works without errors. There is no SQLCOMP for the calling program, which has no SQL region.
On Tuesday, November 24, 2020 at 12:01:44 PM UTC-8, Randall wrote:
On Sunday, November 22, 2020 at 5:51:33 p.m. UTC-5, rkd...@gmail.com wrote:
On Sunday, November 22, 2020 at 2:21:49 PM UTC-8, Randall wrote:
On Sunday, November 22, 2020 at 5:13:42 p.m. UTC-5, rkd...@gmail.com wrote:
On Sunday, November 22, 2020 at 1:58:13 PM UTC-8, Keith Dick wrote:
On Sunday, November 22, 2020 at 10:40:59 AM UTC-8, Randall wrote:
Hi All,
I have a c89 program that is calling a DLL that uses SQL/MP. I'm using dlopen/dlsym to get to the methods. On the first call (happens to be BEGIN WORK), I'm getting SQL [-8025] (not SQL compiled) despite the fact that the SQLCOMP of the
did not apply for C as well.Anyone have experience with this situation?
Thanks,The SQL/MP Programming Manual for COBOL says explicitly that SQL/MP statements are not supported in user libraries, SRLs, or DLLs. I did not find a similar restriction in the manual for C, but I'd be very surprised if the same restriction
Randall
why they updated the programming manual for COBOL to document the restriction for SRLs and DLLs, but did not make the same update for the programming manual for C. I am pretty sure that this does NOT mean that SQL/MP statements can be used in a DLL -- II checked the manual for C again, and it does say that the object file specified to the SQLCOMP command must not be a user library or system library, so that is a somewhat similar restriction, just not mentioning SRLs or DLLs. I don't know
that SQL/MP does use static global memory for the structures used to pass the host variables for each statement to the SQL runtime, but I might be remembering that wrong.Well, all I can say is "drats". That would be a very nice feature to have. But I can see the loader having issues trying to chase down whether DLLs are registered in the proper catalog.I don't believe the issue has anything to do with catalogs. If the SQL/MP runtime needs any statically-allocated global memory, that would be a problem for putting SQL/MP code in a user library, and maybe in DLLs, too. I have a dim recollection
manuals to refresh my memory on whether that could be done.The other possible challenge is that the runtime has to load the query plans from the SQL region of the object file in which the SQL statements reside. I think finding the name of the object file would be possible, though I'd have to read some
well. I made up something that worked - localized static compile of the SQL module.SQL/MX can be used in a DLL, so if you can switch to using SQL/MX in the DLL (SQL/MX can access SQL/MP tables, you know), that might solve your problem.I have a separate implementation for SQL/MX - that part is no issue. Yes, global memory is required, but when I get failures, the issue definitely is highlighting the DLL not being registered even through it is registered in the SQL Catalog. Ah
file. Perhaps you could trick it by including an unused SQL/MP statement in the main object file and SQL-compile the main object file. I don't know that would work. I think you'd still have trouble with the global memory that SQL/MP uses, but I might beHave you considered the possibility that the error message could be incorrect? At times I have wasted large amounts of effort because I was misdirected by an error message that was misleading, and sometimes utterly wrong.
I am pretty sure the runtime check does not look in the catalog, but checks the flag in the object file that says the object file is SQL-compiled. Maybe the runtime check doesn't know how to find the DLL object file and only looks at the main object
Since you say you have SQL/MX working in a DLL, and since SQL/MX can access SQL/MP data, I kind of wonder why you would continue trying to get SQL/MP to work in a DLL. What benefit would that give you?Or maybe the SQL-compiled flag in the object file gets copied into the PFS when the process gets started and the SQL/MP runtime check looks at the copy in the PFS. It probably wouldn't copy a SQL-compiled flag from a DLL into the PFS.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 48:05:51 |
Calls: | 6,648 |
Files: | 12,198 |
Messages: | 5,329,985 |