Hi,
Does any one used multi threading in pl1 along with embedded SQL. I am able to run plain pl1 program with POSIX on option in multi threading mode. however when I embed some sql statements
the program abend with protection exception. Does any one have idea how to run pl1 db2 program using multi threading?
Thanks
pl1 mutli threading
-
- Posts: 3
- Joined: Thu Jun 29, 2017 6:08 pm
- Skillset: pl1, cobol,jcl,db2
- Referer: GOOGLE
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: pl1 mutli threading
what do You expect to gain by using multithreading ?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: pl1 mutli threading
As you have not provided any detail we do not know that the cause of the error is anything to do with the addition of SQL to the program. It could e a long-existing error which has now come to light or it could be bad coding or bad design (using data from one thread in another thread before the first has completed) or a multitude of other things.
How about temporarily removing the multi-threading and see if you still get the error or not.
How about temporarily removing the multi-threading and see if you still get the error or not.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Posts: 3
- Joined: Thu Jun 29, 2017 6:08 pm
- Skillset: pl1, cobol,jcl,db2
- Referer: GOOGLE
Re: pl1 mutli threading
Yes, I tried to execute the program without multi threading and the program ran fine.
but when i call the subprogram TSTTH1 using attach , it fails with protection exception at db statements. I used POSIX ON while running the program.
ATTACH TSTTH1 () tHREAD(T1);
Exception details:
IBM0534S ONCODE=8094 Protection exception
From entry point TSTTH1 at statement 2 at compile unit offset -0002C3
2CD2FD22.
but when i call the subprogram TSTTH1 using attach , it fails with protection exception at db statements. I used POSIX ON while running the program.
ATTACH TSTTH1 () tHREAD(T1);
Exception details:
IBM0534S ONCODE=8094 Protection exception
From entry point TSTTH1 at statement 2 at compile unit offset -0002C3
2CD2FD22.
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: pl1 mutli threading
Have you tried the ATTACH with only a PL/I statement (like PUT) in the subprogram? If you try it and it works, then the issue is with the db (sic) statements in your subprogram. If you try it and it doesn't work, then you have problems with your ATTACH.
-
- Posts: 3
- Joined: Thu Jun 29, 2017 6:08 pm
- Skillset: pl1, cobol,jcl,db2
- Referer: GOOGLE
Re: pl1 mutli threading
I tried without DB statements and it works perfectly in multi threading. But it fails at first exec sql when i run through ATTACH.
I dont see any issue with db2 statements as the db2 statements run fine when I run the program without ATTACH as a normal subprogram call.
Not sure if anything i need to specify in BIND when I run the db2 program using threading or some other parameter or which configuration is missing.
I dont see any issue with db2 statements as the db2 statements run fine when I run the program without ATTACH as a normal subprogram call.
Not sure if anything i need to specify in BIND when I run the db2 program using threading or some other parameter or which configuration is missing.