NULL & Sequential File

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

NULL & Sequential File

Post by karthi_gana »

All,

what is the relationship between NULL and a sequential file?

does sequential file allows NULL ? say for example, if i declared variables like below

eno int No (Allow Null)
age int Yes (Allow Null)
ename varchar(50) No (Allow Null)

I have designed a jpb like below

ODBC --> Transformer ---> Sequential file

assume age has some NULL values in the table.

emp table : 50 rows

age is not null - 45 rows
age is null - 5 rows

how many rows will be transferred to the sequential file? i didn't try this. Because this question just came to mind when i open this site from my home. i don't have datastage in my home pc. i can use datastage only from my office.
Karthik
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sequential files allow nulls, yes. The Server product makes handling them a little easier, basically you'll end up with a empty string / field unless (of course) you are writing out to a fixed-width file. In that case you'll need to supply something of the appropriate size for the field, typically spaces.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Technically, because there are no data types in a text file (only text), text files do NOT support NULL. Therefore your metadata need to describe how NULL is represented within the file/field.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Technically. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

C'est moi. 8)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

chulett wrote:Sequential files allow nulls, yes. The Server product makes handling them a little easier, basically you'll end up with a empty string / field unless (of course) you are writing out to a fixed-width file. In that case you'll need to supply something of the appropriate size for the field, typically spaces.
If i didn't supply something...what will happen?
Karthik
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Depends how your "default defaults" have been set up.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nani0907
Participant
Posts: 155
Joined: Wed Apr 18, 2007 10:30 am

Post by nani0907 »

It throws warnings in the job for sequential file to handle nulls...
thanks n regards
nani
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In a Server job? PX, perhaps, but not Server.
-craig

"You can never have too many knives" -- Logan Nine Fingers
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

"default defaults" ???

how to see or view it? where to see this value?
Karthik
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

[In parallel jobs only...] :oops:
There is a button on the Format properties called Defaults> (or something like that). This allows you to set the current format settings as default, replace the current with your most recently saved default, or to restore factory settings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

ray.wurlod wrote:[In parallel jobs only...] :oops:
There is a button on the Format properties called Defaults> (or something like that). This allows you to set the current format settings as default, replace the current with your most recently saved default, or to restore factory settings.
oh...ok.
Karthik
Post Reply