timestamp

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

us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

In job Properties, while initializing Parameters do i need to define something in the "default"for this PARMDATE.

Thanks
Sam
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

I am having <LF>.so how to get rid of it.

Thanks
Sam
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply