put parameter in before-job subroutine

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
abyss
Premium Member
Premium Member
Posts: 172
Joined: Thu May 22, 2014 12:43 am

put parameter in before-job subroutine

Post by abyss »

hi all
try to all a dos sqlplus command:
sqlplus -s #user_name#@#dbname#/#passwoard#@#name.sq#

i need to parameter all the values in ##

i found this thread:
viewtopic.php?p=377537

I created a sequential wrapper job to pass all the parameters in but it still doesn't work, does anyone know why?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No idea, because you have not told us what's in your wrapper.

The job is already executing when its before-job subroutine executes, so it's too late to try to set parameter values at that point. You can only set job parameter values before the job run request is actually made.

This will typically involve using a sequence job, or running your job from a dsjob command line or from a Job Control routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Tell us what "doesn't work" means. If the db credentials you are using are passed into the job as job parameters, there's no reason you can't bind them into a Before Job call to ExecDOS or anything else.
-craig

"You can never have too many knives" -- Logan Nine Fingers
abyss
Premium Member
Premium Member
Posts: 172
Joined: Thu May 22, 2014 12:43 am

Post by abyss »

thanks all

i tested again today, the problem is the password parameter is encrypted. when i pass it in from wrapper seq job, the command returns error message:
ERROR:
ORA-01017: invalid username/password; logon denied

i change the password type to string, the command worked
winwin01
Participant
Posts: 2
Joined: Tue Apr 18, 2017 10:32 pm

Post by winwin01 »

Good information
Post Reply