Page 1 of 1

FTP Plug-in

Posted: Sun Aug 15, 2004 1:49 am
by Rajendran
Hi,

Can anyone explain what is the use of NullString Properties in FTP Plug-in Stage :?: .

By,
Rajendran.

Posted: Sun Aug 15, 2004 2:09 am
by ray.wurlod
It defines a string with which NULL is represented in the data stream to be transferred via FTP. For example, the remote file might represent NULL as the string "<NULL>".

Posted: Sun Aug 15, 2004 3:20 am
by Rajendran
ray.wurlod wrote:It defines a string with which NULL is represented in the data stream to be transferred via FTP. For example, the remote file might represent NULL as the string "<NULL>".
Can u give me an example how to pass Null string

Posted: Sun Aug 15, 2004 4:51 am
by ray.wurlod
You can extract one from a database table, where the column contains a NULL.
The concept of null is irrelevant to text files. It is mainly text files that you pass using FTP. Therefore, you can decide any convention you like for passing null values.
In general there are two strategies.
  • Choose some string that will never appear in data, such as "<NULL>", and use that to represent null.

    If your data are fixed width, allow one space preceding each column, and use some character (for example "%") placed there to indicate that the data in the column following it should be ignored, and null used instead.
Within DataStage you can generate NULL for loadig into a database by using the system variable @NULL.

There is also a system variable @NULL.STR, which is a string representation of the internal storage of NULL in DataStage (and can participate in expressions, functions, and so on, without returning NULL).