Search found 4992 matches

by kcbland
Sun Jul 23, 2006 9:17 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: How to get data before and after "/" in unix
Replies: 6
Views: 1196

Code: Select all

echo "what/does/this/do?" > testfile 
ThirdWord=`cut -d"/" -f3 testfile`
echo "${ThirdWord} is cool"



8)
by kcbland
Sun Jul 23, 2006 7:36 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: How to get data before and after "/" in unix
Replies: 6
Views: 1196

Code: Select all

echo "what does this do?" > testfile
ThirdWord=`cut -d" " -f3 testfile`
echo "${ThirdWord} is cool"
by kcbland
Sun Jul 23, 2006 7:33 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: How to have multiple conditions in unix
Replies: 4
Views: 1009

In ksh use && and || for AND and OR when doing something like this:

Code: Select all

if [ "${x}" -eq "${y}"] && [ -r "/here/there/myfile" ] ; then
  echo "Do this"
fi
by kcbland
Sun Jul 23, 2006 3:58 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: data transfer issue - is NFS a good solution
Replies: 9
Views: 2534

There's nothing like a good benchmark in your specific environment. :wink:
by kcbland
Sat Jul 22, 2006 8:04 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Trailing spaces don't get trimmed.
Replies: 13
Views: 3585

I'll confirm the whitespace debate if someone else doesn't beat me to it, but I recall explicitly handling this in some cases. It's all getting blurry these days, lack of sleep will do that to you...
by kcbland
Fri Jul 21, 2006 6:26 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Trailing spaces don't get trimmed.
Replies: 13
Views: 3585

TRIM without the optional trimming character defaults to just spaces. You've got something else modifying that column. Try writing to a Sequential file pipe delimited write after trimming to assure yourself you're not going crazy. Then, follow it the rest of the way to the database.
by kcbland
Fri Jul 21, 2006 5:00 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Joining Hash File and Flat File
Replies: 7
Views: 2352

My brain was too tired today, I didn't articulate my thoughts clearly. You need a Function (not routine) that will fire off a UNIX or Windoze statement, kind of like a 1 line wrapper to DSExecute. Then, when you goto the Initialize cell on setting up a stage variable, use your right-click menu and c...
by kcbland
Fri Jul 21, 2006 2:34 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Multiple Instances of jobs and logs
Replies: 11
Views: 4245

The DSGetLogSummary API doesn't distinguish log entries for the instance, it gives you everything. I'm guessing that dsjob uses the same API so has the same problems.
by kcbland
Fri Jul 21, 2006 2:33 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Trailing spaces don't get trimmed.
Replies: 13
Views: 3585

One thought, could it be a TAB character? It can give the appearance of spaces.
by kcbland
Fri Jul 21, 2006 2:32 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Trailing spaces don't get trimmed.
Replies: 13
Views: 3585

TRIM(link.column) takes care of trailing and leading and repeating spaces if you want a simpler way. If there are spaces at the end of your text it depends on how you're seeing it. If you're writing to a fixed with file it will pad the fields. If your metadata for that column is CHAR it will pad the...
by kcbland
Fri Jul 21, 2006 2:30 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Joining Hash File and Flat File
Replies: 7
Views: 2352

If it's a 1 row hashed file, how many columns? If you used some derived value as the key, how do you expect your process to know the key value? If it knew the key value, it wouldn't need to do the lookup. If your process created the hashed file, it should write the max value out and use a column wit...
by kcbland
Fri Jul 21, 2006 2:25 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Searching the data
Replies: 6
Views: 1184

Welcome aboard. This is the craziest thing I've seen posted. Could you please state your situation another way? I cannot comprehend the steps the logic needs to follow. I do understand that you have a non-structured file with record start and end markers. What I don't understand is your terminology ...
by kcbland
Fri Jul 21, 2006 2:18 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: FTPing a file to LAN
Replies: 6
Views: 1060

Sounds like the FTP ports are locked, you're going to have to talk to your network/NT administrator
by kcbland
Fri Jul 21, 2006 12:51 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Multiple Instances of jobs and logs
Replies: 11
Views: 4245

You don't have that luxury. The job log for all instances are one and the same. You're going to have to verify the job instance name against the text within the log message to make sure the message pertains to your instance.

Or make copies of jobs rather than use instances. I know that sucks. :cry:
by kcbland
Fri Jul 21, 2006 12:02 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: FTPing a file to LAN
Replies: 6
Views: 1060

Depends on your security requirements, some places use SFTP instead. Just try it, get the IP and give it a try.