Search found 42 matches

by jgibby
Tue Dec 14, 2010 12:05 pm
Forum: IBM<sup>®</sup> DataStage TX
Topic: Need help to implement recursion in WTX
Replies: 2
Views: 19512

I haven't been on here for a while, and I know this thread isn't that new. However, I think this can be accomplish without recursion or functional maps, no offense intended at all to JorgeCox. It looks as if his solution will work, I just wanted to offer a different one. Given that Input1 is a strin...
by jgibby
Thu Jun 05, 2008 9:43 am
Forum: IBM<sup>®</sup> DataStage TX
Topic: A Registry Read Function in DataStageTX 8.0 ?
Replies: 14
Views: 12740

Or even simpler =SUBSTITUTE( GET("BAT","-cli -cmd '@HOSTNAME'") ,"<NL>" ,"" ) You're right (as always). I was concerned that it might produce the same weirdness that ipconfig does with the double <CR><CR><LF>. But I looked at it's output in binary and it does...
by jgibby
Thu Jun 05, 2008 8:27 am
Forum: IBM<sup>®</sup> DataStage TX
Topic: A Registry Read Function in DataStageTX 8.0 ?
Replies: 14
Views: 12740

Excellent tip ameyvaidya!

This works like a charm.

Code: Select all

=SUBSTITUTE(
	SUBSTITUTE(
		GET("BAT","-cli -cmd '@HOSTNAME'")
		,"<CR>"
		,""
	)
	,"<LF>"
	,""
)
by jgibby
Wed Jun 04, 2008 11:03 am
Forum: IBM<sup>®</sup> DataStage TX
Topic: A Registry Read Function in DataStageTX 8.0 ?
Replies: 14
Views: 12740

If you have the computername in an environment variable, you can use this: WORD(GET("BAT","-cli -cmd '@ECHO ""!COMPUTERNAME!"" '"),"""",2) But if not you can use IPCONFIG by doing this: =WORD( WORD( WORD( GET("BAT","-cli -cmd...
by jgibby
Thu Mar 06, 2008 3:13 pm
Forum: IBM<sup>®</sup> DataStage TX
Topic: GMT Time
Replies: 1
Views: 5692

Try this, it works for me. Note: I am in the Central Time Zone. =FROMDATETIME( ADDHOURS( CURRENTDATETIME() ,IF( TIMETOTEXT( CURRENTDATETIME("{ZZZ}") )="CST" // For Central Standard Time ,6 ,5 // Central Daylight Time ) ) ,"{CCYY/MM/DD HH24:HH:SS}" ) Actually, this is ha...
by jgibby
Tue Sep 11, 2007 12:06 pm
Forum: IBM<sup>®</sup> DataStage TX
Topic: Resource Registry Use or MisUse Question......
Replies: 10
Views: 9259

It does seem pointless when all the values are virtually the same for each server. However, if they moved to having those all hard coded and one of the servers had a problem such that they temporarily had to host a directory or two somewhere else or on a different OS (ala Windows), then the need to ...
by jgibby
Wed Apr 25, 2007 3:19 pm
Forum: IBM<sup>®</sup> DataStage TX
Topic: Getting a XML file as output
Replies: 7
Views: 5685

Hi, The solution that you have suggested can be used if the type tree imported is used at input side. Importing a DTD/XSD into the Type Tree Designer does not force that type tree to be an *Input* type tree only. A Type Tree is capable of being used both as input and as output. Jan is correct. Impo...
by jgibby
Mon Mar 12, 2007 10:56 am
Forum: IBM<sup>®</sup> DataStage TX
Topic: How to call Shell script from a dstx map?
Replies: 5
Views: 20200

Ditto. If you are asking about the SHL argument, then you need to review the documentation.

John
by jgibby
Tue Mar 06, 2007 10:28 am
Forum: IBM<sup>®</sup> DataStage TX
Topic: How to call Shell script from a dstx map?
Replies: 5
Views: 20200

Re: How to call Shell script from a dstx map?

Balkrishna wrote:I have created one shell script on UNIX server (Purge.sh) and i want to run this shell script using Datastage TX (7.5.1) map.

How can i do the same? Thanks for your help in advance. :oops:

Code: Select all

=GET(
	"SHL"
	,"-cli -cmd 'Purge.sh'"
)
John Gibby
by jgibby
Thu Sep 14, 2006 12:11 pm
Forum: IBM<sup>®</sup> DataStage TX
Topic: Execute a CMD command with -CLI option
Replies: 2
Views: 3788

To me the documentation on the Batch/Shell adapter was totally confusing. Finally I hit on the following that works (so far) for all our needs:

Code: Select all

=GET("SHL","-cli -cmd 'mkdir " + DirName + "'")
Hope it helps,
John
by jgibby
Wed Aug 02, 2006 11:14 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: How to define the " quote character in the routine
Replies: 5
Views: 3578

Suggestion to Moderators: Since we are seeing so many topics in here that don't relate to Datastage TX, how about considering renaming this forum to Websphere Transformation Extender? This is what IBM is starting to call TX.
by jgibby
Mon May 22, 2006 7:31 am
Forum: IBM<sup>®</sup> DataStage TX
Topic: specific function to add months in a date
Replies: 26
Views: 18267

Yeah, they can be a pain. Especially too if you have to use the same formula in multiple places in the map and/or in multiple maps. Ugh. Sounds like a feature/enhancement request in the making.

John
by jgibby
Mon May 22, 2006 7:08 am
Forum: IBM<sup>®</sup> DataStage TX
Topic: specific function to add months in a date
Replies: 26
Views: 18267

Okay, I think I fixed the BUG that Jan found! LOL Here is the corrected formula. =EITHER( FROMDATETIME( TODATETIME( // Month FILLLEFT( NUMBERTOTEXT( MOD( TEXTTONUMBER( FROMDATETIME(DateValue,"{MM}") ) +(IF( TEXTTONUMBER(TextField Fields:MonthsToAdd)<0 ,-1 ,1 ) * if( mod(TEXTTONUMBER(TextFi...
by jgibby
Mon May 22, 2006 6:13 am
Forum: IBM<sup>®</sup> DataStage TX
Topic: specific function to add months in a date
Replies: 26
Views: 18267

You're right. I hadn't caught that bug. I'll have to fix that to save face... again! LOL
by jgibby
Fri May 19, 2006 2:21 pm
Forum: IBM<sup>®</sup> DataStage TX
Topic: specific function to add months in a date
Replies: 26
Views: 18267

Well, I finally finished a formula that will (according to my rigorous :roll: testing standards) perform the function off adding or subtracting months to/from a date. (To subtract you would put a negative number in the MonthsToAdd object.) In addition to handling leap year, it will handle situations...