2 SQLs lock the file
Posted: Mon Jun 03, 2024 12:51 pm
Hi,
In my Server Module, Select_Sql command is used to read a file.
When Select_Sql is executed, I believe that target file will be locked(*SHRRD shared lock) and the lock will be released after execution.
However, the file will remain locked by LWEB_JOB if the following conditions are both applied:
1.RPG program is called in Server Module, and that RPG program issues SQL statement
and also
2.Select_Sql is used to read the same file in the same Server Module(same server routine)
If only 1 or only 2, lock will not remain.
Ex.)
SQL is used in RPG but Select_sql is not used in Server module
SQL is not used in RPG and Select_sql is used in Server module
In both cases, lock will be released.
Have you ever experienced this?
If so, how do you work around this?
I appreciate your kind advice.
Best Regards,
Megumi Sawada
In my Server Module, Select_Sql command is used to read a file.
When Select_Sql is executed, I believe that target file will be locked(*SHRRD shared lock) and the lock will be released after execution.
However, the file will remain locked by LWEB_JOB if the following conditions are both applied:
1.RPG program is called in Server Module, and that RPG program issues SQL statement
and also
2.Select_Sql is used to read the same file in the same Server Module(same server routine)
If only 1 or only 2, lock will not remain.
Ex.)
SQL is used in RPG but Select_sql is not used in Server module
SQL is not used in RPG and Select_sql is used in Server module
In both cases, lock will be released.
Have you ever experienced this?
If so, how do you work around this?
I appreciate your kind advice.
Best Regards,
Megumi Sawada