Page 3 of 3

Posted: Thu May 11, 2006 12:58 pm
by us1aslam1us
In job Properties, while initializing Parameters do i need to define something in the "default"for this PARMDATE.

Thanks
Sam

Posted: Thu May 11, 2006 1:00 pm
by DSguru2B
Thats completely upto you. Because when you pass a value during dsjob -run, that param value overwrites the default. So its upto you weather to keep it blank or not.
For now, for testing purposes, keep it blank, so that we know whether the param value is being picked up by the job or not.

Posted: Thu May 11, 2006 1:04 pm
by us1aslam1us
When i am leaving it as empty it is giving me this warning:

Code: Select all

IDC_CARDS_VALID_INIT_EXTR.Initial_Extract: Sybase Server warning 249 (severity 16): Syntax error during explicit conversion of VARCHAR value '  ::' to a DATETIME field. 
But when i am passing the date it is taking the default value.

Thanks
Sam

Posted: Thu May 11, 2006 1:07 pm
by DSguru2B
ok first we have to fix the sql.
view data from the stage, put in the value 20060401001236 and tell me if it works or it throws an error.

Posted: Thu May 11, 2006 1:16 pm
by us1aslam1us
DSguru2B wrote:ok first we have to fix the sql.
view data from the stage, put in the value 20060401001236 and tell me if it works or it throws an error.
It works fine.

Thanks
Sam

Posted: Thu May 11, 2006 1:18 pm
by DSguru2B
so that means our sql works fine. Now we know its the script thats creating the problem. Can you please post the param file and the complete dsjob command.
Also go at the unix cmd line,
vi the param file
press shift and then $
the cursor should jump on the last letter of the last line. If that doesnt happen then that means you have a <LF> in your param file which is not good.

Posted: Thu May 11, 2006 1:22 pm
by us1aslam1us
I am having <LF>.so how to get rid of it.

Thanks
Sam

Posted: Thu May 11, 2006 1:30 pm
by DSguru2B
Aha. Knew it. That param file was the culprit.
So now, you need to re-edit the param file so that there is no <LF>. Put in the parameters in the param file without hitting enter. There should be just one line.

Posted: Thu May 11, 2006 1:37 pm
by DSguru2B
Ok Let me save you from the torture of vi.
Run this command on the unix and you will be fine

Code: Select all

sed 'N;s/\n/ /' paramfile.txt > newparamfile.txt
Pass the newparamfile.txt to the script that calls the dsjob command

Posted: Thu May 11, 2006 1:40 pm
by us1aslam1us
Now i fixed it.There are no <LF> in the file.But still when i am running it is the same problem.

Thanks
Sam

Posted: Thu May 11, 2006 1:41 pm
by DSguru2B
go to the job log in the director.
click on the very first msg of the run and make sure that all the params that you are passing via the param file, is getting to the job.

Posted: Thu May 11, 2006 1:44 pm
by us1aslam1us
I am getting all the parameters which are defined but getting all default values.I believe it is not picking up the parameter values from the script.The script is in other post



viewtopic.php?t=100380

Thanks
Sam

Posted: Thu May 11, 2006 1:53 pm
by DSguru2B
ok. Try this
Recompile the job
go to the unix command line
try to run ur job via the command line
Make sure your in the dir where your parameter file is.
Say your parameter file is called param.txt
Run this command and let me know if it works. Also make sure from the director that its picking up the parameters that you are providing from the param file

Code: Select all

/ibmdscode/Ascential/DataStage/DSEngine/bin/dsjob -run `cat param.txt` Projectname Jobname