Page 1 of 1

protected - routine

Posted: Mon Nov 17, 2008 11:10 am
by mystuff
Is there a way we could set a routine (only one routine) from not being accessed by anyone other than dsadm.

Posted: Mon Nov 17, 2008 11:18 am
by chulett
"Accessed"? :?

Posted: Mon Nov 17, 2008 11:24 am
by Mike
I don't think so, but here are a couple of workarounds I could suggest:

1) Threat of severe bodily injury with a baseball bat. :wink:

or

2) Insert a check for the user and exit without doing anything if the user is not dsadm.

Mike

Posted: Mon Nov 17, 2008 2:11 pm
by mystuff
Sorry by accessed i meant "readable". Developers should be able to use the routine, but not read the code.

Posted: Mon Nov 17, 2008 2:18 pm
by Mike
What happens if you only import the executable for a routine? Not sure if that is even possible since I've never attempted it. Routine code does not turn into inline code like a transform, so I don't see why you'd need the source code to compile a job that calls it.

Mike

Posted: Tue Nov 18, 2008 12:44 am
by ray.wurlod
You can not protect the source code of the Routine, since it is a row in the Repository table DS_ROUTINES. You can make it read-only (to all) via the READONLY column. But this would not prevent anyone from inspecting the code.

If you really want to hide a routine, then you have to resort to a mechanism described in the DataStage BASIC manual but not often implemented. And you would not be able to edit the routine code using the Manager or Designer clients without reversing the mechanism.

This technique involves you creating and compiling the Routine as usual, but then moving the source code from DS_ROUTINES to somewhere more secure, probably a directory. For example, to put the routine source code for MyRoutine into the VOCLIB hashed file:

Code: Select all

COPY FROM DS_ROUTINES TO VOCLIB MyRoutine DELETING