Search found 53125 matches

by ray.wurlod
Fri Jun 21, 2013 4:57 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: How to reject junk or unknown values
Replies: 5
Views: 1822

There is no "junk". Every character is part of the data you are being paid to process. The specifications you get from the data owner will tell you how to handle specific characters, even if you have to negotiate those specifications with the data owner. And that specification governs prec...
by ray.wurlod
Thu Jun 20, 2013 11:06 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Best way to add a column conditionally to a sequential file
Replies: 7
Views: 2742

Yes, either in a before-job subroutine or when processing row #1.

In the former case the Sequential File stage would need to be set to Append to the file.
by ray.wurlod
Thu Jun 20, 2013 9:56 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Best way to add a column conditionally to a sequential file
Replies: 7
Views: 2742

For this to work you must set "First line is column headings" to False. Always send one column. It may be derived as InLink.Col1 or it may be derived as InLink.Col1 : "," : InLink.Col2 in a Transformer stage. Wrap these two possiblilties in an If..Then..Else construct to manage y...
by ray.wurlod
Thu Jun 20, 2013 4:12 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: IsValid function
Replies: 4
Views: 3380

kpsita wrote:Yes I did try IsValid("int8",mylink.mystring). But for valid values like 22222 and some of the decimal values like 1.0222, it is throwing 0.
These are both correct results.
22222 is too large for int8; it can be int16, int32 or int64.
1.0222 simply is not an integer of any kind.
by ray.wurlod
Thu Jun 20, 2013 4:07 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: While reading œ,–,’ character from odbc stage giving ?
Replies: 0
Views: 932

View Data is notoriously unreliable for non-ASCII characters.

Try to find alternatives.
by ray.wurlod
Thu Jun 20, 2013 4:05 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: how to convert into decimal format
Replies: 7
Views: 2588

Most of the type conversion functions in the Transformer stage are actually implemented as modify operators under the covers. Thus, for example, StringToDecimal() function in Transformer stage is actually implemented as the decimal_from_string() or decimal_from_ustring() function in Orchestrate depe...
by ray.wurlod
Thu Jun 20, 2013 4:00 pm
Forum: General
Topic: Infinity loop into Sequence
Replies: 4
Views: 1601

You should also build in a mechanism for notifying it to stop (or, at least, to stop at the next iteration). Typically a file coming into existence would serve as a "stop" flag. This can be checked easily with a Wait For File activity or an Execute Command activity.
by ray.wurlod
Thu Jun 20, 2013 3:54 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Rounding off using schema files
Replies: 7
Views: 2530

Actually you can take advantages of one of the more obscurely documented features of the Modify stage - entire specifications can be job parameters. So, even if the column name needing rounding is dynamic, you can manage this by creating the specification as a job parameter.
by ray.wurlod
Thu Jun 20, 2013 3:52 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: how to convert into decimal format
Replies: 7
Views: 2588

How about adding a couple of places to the precision? At least as an intermediate step, specify Decimal(20,4) rather than Decimal(18,4).
by ray.wurlod
Thu Jun 20, 2013 3:50 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Get the first and last day of previous month
Replies: 11
Views: 7272

My method does not involve several data type conversions. Yours does. These all take machine cycles.

Also yours will fail if the current month is January.
by ray.wurlod
Thu Jun 20, 2013 12:38 am
Forum: General
Topic: how to get a specified job name in routine ?
Replies: 7
Views: 2342

I can not see the whole info that you give me the code.can you post it here ? To see the whole of what the five Premium Posters post you need to obtain a premium membership. Details are available from the DSXchange home page. Premium membership is not expensive, from memory $99/year (less than $0.3...
by ray.wurlod
Thu Jun 20, 2013 12:26 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Get the first and last day of previous month
Replies: 11
Views: 7272

I think my research conclusions in the other thread suffice as documentation of the modus operandi, as you put it. This is How It Works, even though it's not what you want it to do.
by ray.wurlod
Thu Jun 20, 2013 12:16 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Get the first and last day of previous month
Replies: 11
Views: 7272

It WILL always give me what I expect, because I made sure that the date argument is the first of the month.
:)
by ray.wurlod
Wed Jun 19, 2013 10:31 pm
Forum: General
Topic: how to get a specified job name in routine ?
Replies: 7
Views: 2342

1. Format your code and enclose in Code tags, as follows. (I've done it for you this time.) $INCLUDE DSINCLUDE JOBCONTROL.H ProjDir_Parm=Field(InputArg,";",3) JobHandle = DSAttachJob("routine_TEST", DSJ.ERRFATAL) JOBNAME=DSGetJobInfo(JobHandle,DSJ.JOBNAME) FileName="TEST2.tx...
by ray.wurlod
Wed Jun 19, 2013 5:53 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Get the first and last day of previous month
Replies: 11
Views: 7272

What Craig means is that you can hard code day number as 1 to get the first of any month. However, you can use date functions exclusively. For example: to get the first day of the current month, subtract the current day number from the date: DateFromDaysSince(1 - MonthDayFromDate(CurrentDate()), Cur...