Error in Db2 GRANT (@DB2CRE job)
zArchitectBill opened this issue · 4 comments
Hello - when I run the customized @DB2CRE jobstream, all of the steps work except step CRGRACC. All of the Db2 commands in that step work except the last one:
GRANT EXECUTE ON PLAN GENAONE TO PUBLIC
SQL ERROR DURING EXECUTE IMMEDIATE
DSNT408I SQLCODE = -204, ERROR: GENAONE IS AN UNDEFINED NAME
I cannot find any reference to GENAONE anywhere else in the CNTL dataset. Is there something missing that should be creating that plan?
Update: I ran @DB2BIND and then the GRANT worked. I was operating from the install instructions here:
https://github.com/cicsdev/cics-genapp/blob/main/base/Building.md
and there's no mention of running it that way. I think there's something missing in the sequence of jobs/steps.
Thanks for the update.
I know what has happened here - the original (pre-GitHub) install scripts did not have the GRANT EXECUTE command included at all. As part of my testing I added that command, but did not appreciate the plan was created as part of the bind step. It looks like dropping the database to check everything works from a clean install does not delete the package, so there was already a GENAONE plan in my environment.
I'll look to see what can be done - probably moving the GRANT EXECUTE step to be the final part of the BIND job.
Ian
Agree. I think moving it to the DB2BIND job is the right approach. Thanks for looking at it!
GRANT EXECUTE ON PLAN is now executed after the bind step. See changes in #4 .