environment variable in the DSJOB.EXE

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

environment variable in the DSJOB.EXE

Post by suresh_dsx »

I AM USING THE COMMEND DSJOB.EXE
i am using in my job --environment variables.
i am passing parameters from the commend prompt. please see below.
environment variaable:$PATH.
some times i need to change the parameter value.


C:\Program Files\Ascential\DataStage7.5>dsjob.exe
-server SERVERNAME
-user RAJU
-password RAJUPASSWORD
-run
-mode NORMAL
-param $PATH="\\10.111.111.23RAJ\Source TGT -230907_FILE.txt"
PROJECTNAME FIRSTJOB1
when i click enter
status code = 0


But iam checking in the director showing the fatal error


FIRSTJOB1..Transformer_20: |FIRSTJOB1.sourcwe.DSLink14: DSD.SEQOpen Failed to open .txt in directory \\10.111.111.23\RAJ\Source TGT -230907_FILE.txt"
STATUS = 2.|


can any one help me please
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

FYI....

I AM USING THE COMMEND DSJOB.EXE
i am using in my job --environment variables.
i am passing parameters from the commend prompt. please see below.
environment variaable:$PATH.
some times i need to change the parameter value.


C:\Program Files\Ascential\DataStage7.5>dsjob.exe
-server SERVERNAME
-user RAJU
-password RAJUPASSWORD
-run
-mode NORMAL
-param $PATH="\\10.111.111.23\RAJ\Source TGT -230907_FILE.txt"
PROJECTNAME FIRSTJOB1
when i click enter
status code = 0


But iam checking in the director showing the fatal error


FIRSTJOB1..Transformer_20: |FIRSTJOB1.sourcwe.DSLink14: DSD.SEQOpen Failed to open .txt in directory \\10.111.111.23\RAJ\Source TGT -230907_FILE.txt"
STATUS = 2.|


can any one help me please
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Besides the fact that you would not want to set your PATH statement to that particular value, you wouldn't do that as part of the dsjob command. $PATH is reserved, I'd suggest you use a different name if you need a 'file path' variable.

Wrapper your dsjob call in a script. Set the variable there before you call dsjob.

Is your full filename correct? Do you have permissions to that UNC path?
-craig

"You can never have too many knives" -- Logan Nine Fingers
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

i gave $TEST_PATH
Sorry i did not mension that one.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok... then answer my last two questions.
-craig

"You can never have too many knives" -- Logan Nine Fingers
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

1. i tried with out environment variable.
i gave a local parameter with in the job and also parameter value.
but when we run from the commend prompt i changed the parameter value. that is working fine.

i tried same systax in the using enviroment variables.
i have permsision to the directory and also file.

2. i dont want to add too many calling values.
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

Can any one help me please
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't use file names or pathnames that contain space characters, or add another layer of quotes.

Try using forward slashes rather than backslashes within the pathname.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

i tried all the possibilites
not working still getting the same error.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please list the names, types and default values of the job parameters in the job in question (FIRSTJOB1).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

Hi ray

Here is the list of values.

I created environment variable in the administrator:
Parameter name: TEST_PATH
Type: String
Value:"\\10.111.111.23\RAJ\Source TGT -230907_FILE.txt"

i used the environment varable in the job.
PARAMETER NAME: $TEST_PATH
PROMPT:ENTER THE PARAMETER
TYPE:STRING
VALUE:"\10.111.111.23\RAJ\Source TGT -230907_FILE.txt"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In the job change the default value to $PROJDEF

This instructs the job to read the value from the Administrator, unless overridden when the job is submitted.

Once you've done this, you only need a -param option in dsjob if you want it to run with a different value than the default.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply