Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.
Moderators: chulett , rschirm , roy
narasimha
Charter Member
Posts: 1236 Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY
Post
by narasimha » Tue Nov 02, 2010 5:53 pm
We have a secure location on our DataStage Server where I use the below approach to work with a file.
Code: Select all
sudo -u <user_thats_owns_the_location> touch <file_name>
I can do it directly on the OS, but I would want to write to this location using a simple job.
Source_File -> Transformer -> Target_File
Any pointers?
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Wed Nov 03, 2010 12:29 am
Can you use an External Target stage to write the file via a sudo command?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
narasimha
Charter Member
Posts: 1236 Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY
Post
by narasimha » Wed Nov 03, 2010 10:13 am
I would want to implement this in existing server and parallel jobs.
Probably I should have been more clear/specific with my design, it is using sequential files (Majority of them are Server Jobs)
Source_Sequential_Stage -> Transformer -> Target_Sequential_File
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Wed Nov 03, 2010 10:23 am
Then run your job as the user ID to which you change using sudo. For example
Code: Select all
sudo -u userID "$DSHOME/bin/dsjob -run -jobstatus $projectname $jobname"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
narasimha
Charter Member
Posts: 1236 Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY
Post
by narasimha » Wed Nov 03, 2010 6:34 pm
I was thinking if there could be anything introduced in the "Filter Command" of the sequential file stage or something on that lines.
Looks like there is no option, but to invoke the job as a different user.
Thanks again
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.