Can you consider adding a bit of code in the application layer ... How complex the change is depends on the type of application ... Let us consider a korn script being called from cron ..
Now you have an entry in corn to start batchjob1 at 10 am ..
You can now create a new job batchjob1_wrap and put the following lines in it
Now schedule batchjob1_wrap to run at 10 am ..
where_from=`echo hostname`
batchname='batch1'
db2 connect to my db
db2 -x "select 1 from auth_appl where batch_appl_name=$batchname and batch_auth_id=USER and batch_host_name=$where_from" | read counter
if [ counter -eq 1 ]
then
batch1 parm1 parm2
else
echo "Not authorized"
end if
On the server, create a table auth_appl and define who is authorized, from which host and which appl ... Therefore you can define the authorizations in the database ...
If the connecting user has requisite permissions, you may as well get the hostname, application info using the snapshot table functions ...
And BTW, I'm sure you'll be aware that access to db objects like table, view etc can be 'configured' for the USER
HTH
Sathyaram