Phantom warning

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ap_nat
Participant
Posts: 9
Joined: Thu Apr 24, 2003 3:51 pm

Phantom warning

Post by ap_nat »

I get an warning message as follows:
"Program "DSD.StageRun": Line 273, Square root of a negative number.
DataStage Phantom Finished"
In my job I am not computing any square roots. My job uses aggregators and hashfiles, the only two probable places I can think such an error can come from. I will also like to know if there is a place where I can see the code for this program. I have a sound programming background and a not so sound datastage bkg, so the question may be a bit silly.

thanks in advance
ap_nat
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Open up your job and have a look at the Transform stage. This is where the transform programming is performed within jobs. The sqrt function will either appear in the "Derivation" column of the output tables or within a user routine in this column.

Eg.
Derivation Column Name
sqrt(inputfile.ProductAmount) RootedProductAmount
or
GetSquareRoot(inputfile.ProductAmount) RootedProductAmount
Where GetSquareRoot is the name of a routine.

You can do a check for the presence of the sqrt function in all routines. Open up DataStage Manager, click on the routines folder, run an Export with the Routines option selected in the export option form. This will dump your routines into a text file. You can now search through this file for the text string "sqrt". If you find a guilty culprit open it up within the Manager and modify the code to exclude negative numbers.

You will find the DataStage basic language quite easy to use.

If there are no sqrt functions in your routines or transformer stages then it could have been caused by the aggregator stage. Do you have any functions in aggregation such as averages or means?

Vincent McBurney
Data Integration Services
www.intramatix.com
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSD.StageRun is what executes the code generated by an active stage, so it's reasonable to assume that the problem is somewhere in the Transformer stage, or in one of the Routines or Transforms invoked from it.
The Transformer-generated code can be inspected on the server (it's in RT_BPxx, where xx is the job number). It can not sensibly be modified here, though, because you don't know how to re-compile any changes. And I'm not going to tell you! [:)]
The only way an Aggregator stage could be using the sqrt function is if you were aggregating a standard deviation.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I couldn't think of an aggregation function that used square root! Thanks for that Ray.

Vincent McBurney
Data Integration Services
www.intramatix.com
ap_nat
Participant
Posts: 9
Joined: Thu Apr 24, 2003 3:51 pm

Post by ap_nat »

Hi!

thanks for the reply, but as I told before there is no place in the code where I am calculating a square root. I know it sounds a bit odd but that is how it is. We are also not using a routine that may compute any square root. In fact we are doing string operations rather than arithmetic ones in this job. Thanks again for the reply. In the aggregator it is max and first that we are using and not any average or std deviation.

ap_nat


[quote]Originally posted by vmcburney
[br]Open up your job and have a look at the Transform stage. This is where the transform programming is performed within jobs. The sqrt function will either appear in the "Derivation" column of the output tables or within a user routine in this column.

Eg.
Derivation Column Name
sqrt(inputfile.ProductAmount) RootedProductAmount
or
GetSquareRoot(inputfile.ProductAmount) RootedProductAmount
ap_nat
Participant
Posts: 9
Joined: Thu Apr 24, 2003 3:51 pm

Post by ap_nat »

Hi Ray!

Thanks for the info about the RT_BPxx part, as it appears the generated code is there. But what I wanted to do was to track down the line 273 which is supposed to be the place for warning, as it happens there are many files in that folder and they are more of basic code showing the mappings and transformation rules for individual containers. This means that I still do not know which file to look into for that line 273 which is throwing me the warning. Is the line 273 referred in the warning message the line number of the DSD.StageRun at which the error occurs. I am not computing any square roots and no std. deviation or any such thing using the aggreagator. In fact in the same job I get the same warning thrice everytime with a different phantom number. It seems I can remove one of these warnings if I remove a transformer to hashfile stage, but in that transformer there is no square root evaluation, more than that in the test run, no data is sent thru that link.



quote:Originally posted by Ray.Wurlod
[br]DSD.StageRun is what executes the code generated by an active stage, so it's reasonable to assume that the problem is somewhere in the Transformer stage, or in one of the Routines or Transforms invoked from it.
The Transformer-generated code can be inspected on the server (it's in RT_BPxx, where xx is the job number). It can not sensibly be

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's one file in RT_BPxx for each Transformer stage in the job, and possibly one for a job control routine. The name of the actual Transformer stage is a comment, so you could grep for it to identify the particular file you need to examine.
Display it in something that has line numbers (for example vi with set nu in effect). Beware that the line count in error messages can be out by a few, because of the presence of $INCLUDE statements, so be prepared to scan a few lines either side of line 273).
mihai
Participant
Posts: 30
Joined: Thu Mar 13, 2003 5:24 am
Location: Hertfordshire

Post by mihai »

quote:Originally posted by Ray.Wurlod
[br]There's one file in RT_BPxx for each Transformer stage in the job, and possibly one for a job control routine. The name of the actual Transformer stage is a comment, so you could grep for it to identify the particular file you need to examine.
Display it in something that has line numbers (for example vi with set nu in effect). Beware that the line count in error messages can be out by a few, because of the presence of $INCLUDE statements, so be prepared to scan a few lines either side of line 273).


... or you could telnet to the DS engine and VLIST DSD_BP DSD_StageRun.B

The output will look a bit assembler-ish. The key thing is the number in the leftmost column which indicates the source code line where the assembler statements originate.

This will take care of all the funny line counting rules brought on by $include and $define statements.

Looking at that in DS 4.2.1r8 leads to no sqrt statements, so I could be barking at the wrong tree. Am I?


Kind regards,
Mihai

_________________________
desk direct:+441908448571
ap_nat
Participant
Posts: 9
Joined: Thu Apr 24, 2003 3:51 pm

Post by ap_nat »

Hi mihai!

I could see the output, but as expected it does not have sqrt or any equivalent of it. The lines of code are as follows

00273 00858 : 0F8 move 0 => _T0011
00273 0085E : 01E call LOADLIBRARY PLUGIN.DLL _T0011
00273 00868 : 0C2 jump 00890:

but then again are they the line numbers as in the error message or something else. I do not have any idea as to where the error may be coming from.

thanks for the help
ap_nat
[quote]Originally posted by mihai
... or you could telnet to the DS engine and VLIST DSD_BP DSD_StageRun.B
ap_nat
Participant
Posts: 9
Joined: Thu Apr 24, 2003 3:51 pm

Post by ap_nat »

Hi Ray!

I could locate the files for the transformers, but still can not find any for job control routine. I have already gone thru the transformer files, and nothing seems to be wrong with them. In fact only three of these files in that job have line counts over 273. I had already done a grep for the transformer names and so knew which file corresponded to which transformer. But still no luck. Is there some place where I can see the code of DSD.StageRun, I went thru the assemblerish code generated using the way Mihai suggested but that does not seem to be of any use. Can u suggest any other place where I can see the code for it.

thanks for the help
ap_nat

[quote]Originally posted by Ray.Wurlod
[br]There's one file in RT_BPxx for each Transformer stage in the job, and possibly one for a job control routine. The name of the actual Transformer stage is a comment, so you could grep for it to identify the particular file you need to examine.
ap_nat
Participant
Posts: 9
Joined: Thu Apr 24, 2003 3:51 pm

Post by ap_nat »

Hi !

It seems that these are issues with the XMLInput stage plugin that we are using, the XMLImput stage that we use does throw some warnings like that. The Ascential guys said that they may come up with a patch for it sometime soon. Thanks a lot for the help. Specially Ray and Mihai. The line 273 was the right place to look for as it is at this line that the call to the plugin happens
00273 0085E : 01E call LOADLIBRARY PLUGIN.DLL _T0011
and it is the plugin that gives this warning message.

thanks again
ap_nat
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Thanks for the feedback. I must admit I've been scratching my head about this one for a couple of days (which is longer than usual!).
Post Reply