API Return Codes
Moderators: chulett, rschirm, roy
API Return Codes
I have create a C program using the DSAPI to run our DataStage Jobs. When a user tries to execute a job and does not have permissions to run datastage, I am getting a general failure in my C program because there is no corresponding error code being set. I cannot find the proper return code for a "no permissions" error. IS there one, or is there a way to see if the user has permissions before even opening the job?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The DSAPI is documented in the Server Job Developer's Guide. Within this there is a list of error codes (constants all beginning with DSJE_). Most of the functions themselves are int, and return a negative integer in case of error. These values can also be seen in the online help for the DataStage BASIC counterparts of the C functions in the DSAPI.
In your particular case, what code is being returned from which function that leads you to state that no error code is being set?
In your particular case, what code is being returned from which function that leads you to state that no error code is being set?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi,
you could also concider giving a default connection to the DS jobs that run a controll job that anyone can run;
this job will actually get as paramters the user and job to be run;
the controll job will access a privilages table that determines "who can run which jobs" and act acordingly.
this might be more complicated to manage but more secure, also you can send emails or any other informative info to the person/s that manage the system about this activity.
you can give your users in the same manner a way to get the job status of the job they want to check in order to see if it failed or not (in cases that they have no privilages to run it supply the relevant message).
IHTH (I hope This Helps)
you could also concider giving a default connection to the DS jobs that run a controll job that anyone can run;
this job will actually get as paramters the user and job to be run;
the controll job will access a privilages table that determines "who can run which jobs" and act acordingly.
this might be more complicated to manage but more secure, also you can send emails or any other informative info to the person/s that manage the system about this activity.
you can give your users in the same manner a way to get the job status of the job they want to check in order to see if it failed or not (in cases that they have no privilages to run it supply the relevant message).
IHTH (I hope This Helps)
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org