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).