What does the error mean?

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
shyju
Participant
Posts: 58
Joined: Thu May 19, 2005 1:00 am

What does the error mean?

Post by shyju »

Hi All,

I get the following error when i load data from sequential file to an OBDC stage/Hash file using a Transformer.

DataStage Job 439 Phantom 630
Program "JOB.869753927.DT.1342239296.TRANS1": Line 3775, Variable previously undefined. Zero length string used.

But when i repeat the same process with sequential file as an input, then pass it to a transformer and send the output to another sequential file, I dont get this error.

What could be the cause of this error? Please reply...
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

Is TRANS1 the name of the transformer stage? If so, then ther error is referencing a line of code generated internally by DS. Makes it hard to debug, huh? :?

In the Stage Variables of the transformer, check whether you are forward referencing a variable. eg. Variable number 5 references variable number 8.

DS evaluates the Stage Variables in order. On the very first row, each variable will be set to its default. If there is no default value then it is undefined/null.

If this is the case, either re-sequence the variables (if the latter one should be evaluated first) or set a default value for the referenced variable which will be used when processing the first row.

Why does it error when the target is a table/hash but not a Sequential file? The only thing I can think of is that (if I am right above) you have propagated the forward referenced variable into a Primary Key column, which cannot be null in a hash file or a table.
shyju
Participant
Posts: 58
Joined: Thu May 19, 2005 1:00 am

Post by shyju »

Hi Rleishman,

TRANS1 is not the name of the Transformer. Anyways, The key that is generated has a stage variable which is not initialised.
But the problem is if thats the case, the key field should contain the null value in the output of the sequential file which is not.

For the scenario where the input file being the Sequentail file A, the output is passed to another sequential file B using the transformer. The output of the sequential file B is then passed to the ODBC Stage. The record gets loaded into the ODBC stage from the output of the sequential file B.
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

Hmmm. I might have to leave this one to the experts.

Have you tried the debugger? Right click on the output link of the Transformer and select Toggle Breakpoints, then compile and select Debug/Go from the action bar.
The job will pause when the first row is ready to be output fro the Transformer. Check the primary key. Select Debug/Next Row from the action bar to step through each row (hopefully not too many).

If you have hundreds of rows, try halving the file repeatedly until you get down to 20-50 rows where the error occurs.

:) It could be worse (it could be me :wink: )
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

shyju wrote:Hi Rleishman,

TRANS1 is not the name of the Transformer. Anyways, The key that is generated has a stage variable which is not initialised.
But the problem is if thats the case, the key field should contain the null value in the output of the sequential file which is not...
Shyju,

who incorrectly told you that the value of an uninitialzed variable is null? The value of an uninitialized variable in DataStage is a zero-length empty string plus a warning in the log file, just as you have been getting.

Since the error mentions a TRANS1 stage, that is where you are seein the error. Do you have a TRANS1 stage in your job?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The most common cause of this error is using a stage variable in row number 1 in a stage variable derivation expression, where the stage variable is not given an initial value. You should always give stage variables an initial value, even if it's just "" or 0 or @FALSE.

RT_BP439/JOB.869753927.DT.1342239296.TRANS1 is the source code generated by compiling the Transformer stage in question. This is a sub-directory in the project on the server. You can examine it and work out what's happening in and around line number 3775, which may give you a more exact idea of where the error is occurring.

The value of an unassigned variable in DataStage is not anything. There is a special DATUM for "unassigned variable". Depending on the context, DataStage will substitute zero or "" and generate an appropriate message.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shyju
Participant
Posts: 58
Joined: Thu May 19, 2005 1:00 am

Post by shyju »

Thx for ur replies!
Post Reply