Page 1 of 1

Dynamic SQL in CICS?

PostPosted: Fri Dec 09, 2016 3:14 am
by Balr14
I have a dynamic SQL that runs fine in batch, but gives me a -551 error on the prepare statement in CICS. Is this just a user ID authorization issue?

Re: Dynamic SQL in CICS?

PostPosted: Fri Dec 09, 2016 3:23 pm
by NicC
I don't know. What is the text of the error message? Does the manual give any hints as to how to resolve it?

Re: Dynamic SQL in CICS?

PostPosted: Fri Dec 09, 2016 8:47 pm
by Balr14
When I run this very same prepare statement in a batch program, it works fine. But, in a batch program I do the DB2 connect. When I run under CICS, CICS does it. That's where I get the -551. The text for the error message says user ID doesn't have authorization to execute this statement. But the user ID is blank. My problem is the support staffs for CICS, RACF and DB2 all say it isn't their problem. I want to know who to bitch at!

Re: Dynamic SQL in CICS?

PostPosted: Fri Dec 09, 2016 9:18 pm
by Robert Sample
There is a user id associated with your transaction. It might be the user id CICS runs under, or some other user id, but obviously the user id for the transaction is not the same as the batch user id. I recommend going back to the CICS support group and finding out what the default user id is for the region (DFLTUSER system initialization parameter). The problem could also be in the CICS data for RACF for the user id you execute the batch job under, in which case you would need to talk to the security support group.

Re: Dynamic SQL in CICS?

PostPosted: Sat Dec 10, 2016 11:16 am
by Balr14
Thank you for your responses, but after consideration, I decided that using dynamic SQL in a CICS program in this company was not supportable. The tech support staffs just aren't as knowledgeable as they used to be and seem to be getting dumber as time passes. I have been demonstrating this problem to all of them for over a week and they are clueless. I guess that's the result of continually losing mainframe staff.