Stage Variable intial value

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
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Stage Variable intial value

Post by karthi_gana »

All,

I would like to know what is the initial value of a stage variable.

In DB side, NULL will be stored as the default value.
Karthik
sauros73
Premium Member
Premium Member
Posts: 5
Joined: Mon Dec 05, 2005 1:15 pm
Location: Montreal
Contact:

Null is Null

Post by sauros73 »

Hi I made a little test:
  • * Create a job = > Row Generator (RG) > Transformer (T) > Peek (P)
    * One field of RG called Attribut as VarChar(255)
    * In T a stage variable called StageVar as VarChar(255) without any derivation
    * In T a output field have this derivation "DSLink2.Attribut : "@" : StageVar"
In the P the result output like that Peek_3,2: "Attribut:cccc@"

That mean that the default value of a stage variable without any derivation is Null.

:wink:
Hugo POISSANT
Data Integration director
CGI
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In a server job I'd imagine that the variable would be in an unassigned state. But you can check the generated Transformer stage code to verify this.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

In a previous life I recall having a saying that "Default" and "Disaster" both begin with the letter "D"......meaning --- if you care about it, assign it a value manually......

A curious discussion, but in the end, give it something so that it never becomes an issue one way or the other.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply