Search found 210 matches
- Mon Feb 23, 2009 9:10 pm
- Forum: General
- Topic: Can I declare and use a function within a function?
- Replies: 3
- Views: 1447
Can I declare and use a function within a function?
Sorry for what is likely a simple question. I searched on "function" before posting but got 4500+ hits, and the Basic doc is unclear. Couldn't find it on Google either. So...can I declare and use utility functions within a function? What I want to do is something like: * Declare function (...
- Sun Feb 22, 2009 9:49 pm
- Forum: General
- Topic: Does DataStage have an internal timestamp format?
- Replies: 3
- Views: 3541
Does DataStage have an internal timestamp format?
Hi, FWIW, I did read the doc and searched the forum before posting. If the answer is in here I missed it... Does DS have an internal timestamp (or what SAS calls a datetime) format? IOW, if (straight from the doc): X = Iconv("1997 5 27", "D YMD") X = 10740 and X = Iconv("02:...
- Fri Feb 20, 2009 4:35 pm
- Forum: General
- Topic: Determining if sequential file has correct number of columns
- Replies: 6
- Views: 2052
- Thu Feb 19, 2009 11:13 pm
- Forum: General
- Topic: Determining if sequential file has correct number of columns
- Replies: 6
- Views: 2052
Determining if sequential file has correct number of columns
Hi, Say I have a CSV file like so: Foo,Bar,"Unit 1, 234 Main St, Sydney",Blah With the correct sequential file link format parameters, this will become: Col1=Foo Col2=Bar Col3=Unit 1, 234 Main St, Sydney Col4=Blah I have a requirement to ensure the input file has the correct number of colu...
- Wed Feb 18, 2009 11:05 pm
- Forum: General
- Topic: Reading sequential file empty columns NULL vs. Empty String
- Replies: 8
- Views: 7964
- Wed Feb 18, 2009 5:32 pm
- Forum: General
- Topic: Reading sequential file empty columns NULL vs. Empty String
- Replies: 8
- Views: 7964
Reading sequential file empty columns NULL vs. Empty String
Hi, I'm reading a tilde delimited file like so: Col1~Col2~Col3 << header, A~~C So, Col2 is missing. I need to validate the data in Col2 with data in another table (SQL Server, I'll call this table Lookup, and the lookup column Col2_NK). So, I use a reference lookup in the transformer. Both columns h...
- Wed Feb 18, 2009 5:10 pm
- Forum: General
- Topic: Dynamically (re)setting job parameters at run time
- Replies: 9
- Views: 22017
Hi, I received a PM requesting more detail on how I got this to work (with the help of this list, of course). I thought it would be useful to disseminate this to the forum in case it gets a search hit in the future. I created the below as a test case: 1. I created the function UserStatus and saved i...
- Tue Feb 17, 2009 11:19 pm
- Forum: General
- Topic: Does DataStage BASIC programming support variable lists?
- Replies: 1
- Views: 778
Does DataStage BASIC programming support variable lists?
Hi, I have stage variables used for data validation like so: C1 = If IsNull(Foo) Then "Null Foo;" Else "" C2 = If IsNull(Bar) Then "Null Bar;" Else "" C3 = If IsNull(Blah) Then "Null Blah;" Else "" ... Cn = more data validation ... Then... ...
- Mon Feb 16, 2009 9:08 pm
- Forum: General
- Topic: Importing table metadata without the catalog name
- Replies: 6
- Views: 3049
- Mon Feb 16, 2009 10:25 am
- Forum: General
- Topic: Importing table metadata without the catalog name
- Replies: 6
- Views: 3049
Hi Craig, I tried dragging the repository data onto the link but, unfortunately, this exhibits the same characteristics as the Load... button. I've tried hacking up the imported metadata: * Open each imported table, change Datasource name from Catalog_DEV to Catalog. This creates a new category (fol...
- Sun Feb 15, 2009 9:20 pm
- Forum: General
- Topic: Importing table metadata without the catalog name
- Replies: 6
- Views: 3049
Importing table metadata without the catalog name
Say I import SQL Server table metadata using an ODBC definition. Later, I load column definitions for a link via the Load... button, then select the appropriate table metadata. The generated SQL is something like: SELECT APPNAME.dbo.Scott.SK, APPNAME.dbo.Scott.NK1, APPNAME.dbo.Scott.NK2 FROM Scott W...
- Thu Feb 12, 2009 7:08 pm
- Forum: General
- Topic: Dynamically (re)setting job parameters at run time
- Replies: 9
- Views: 22017
Re: Dynamically (re)setting job parameters at run time
Hi, 1. Can a routine query a database and return a single row/single column result set to a parameter? If so, does anyone have example code that does this? 2. Can a routine query a database and return a single row/multiple column result set to multiple parameters? If so, does anyone have example co...
- Wed Feb 11, 2009 7:29 pm
- Forum: General
- Topic: Dynamically (re)setting job parameters at run time
- Replies: 9
- Views: 22017
Dynamically (re)setting job parameters at run time
Hi, 1. Can a routine query a database and return a single row/single column result set to a parameter? If so, does anyone have example code that does this? 2. Can a routine query a database and return a single row/multiple column result set to multiple parameters? If so, does anyone have example cod...
- Tue Feb 10, 2009 10:45 pm
- Forum: General
- Topic: Dynamically (re)setting job parameters at run time
- Replies: 9
- Views: 22017
- Tue Feb 10, 2009 8:07 pm
- Forum: General
- Topic: Dynamically (re)setting job parameters at run time
- Replies: 9
- Views: 22017
Dynamically (re)setting job parameters at run time
Hi All, I'm new to Datastage, although familiar with other ETL tools. If I post a FAQ, feel free to just point me to a link or give me the correct search string to use in the forum. Scenario: Table1 (small, in SQL Server): Date IsCurrentPeriod 2009-02-11 N 2009-02-12 Y 2009-02-13 N Table2 (huge, in ...