Page 1 of 1

system variable

Posted: Fri Aug 08, 2008 1:00 am
by svga
Hi,

Please explain abt system variables @TM,@FM,@VM.and where to use those variables?

Posted: Fri Aug 08, 2008 1:09 am
by ArndW
These are mnemonics for Text Mark (@TM), Field Mark (@FM) and Value Mark (@VM).

The latter 2 are used commonly in Pick-type databases. DataStage Server and the other Pick-type databases store records as long strings, often called dynamic arrays, and the field mark (char(254)) is used to separate the fields (or columns, or elements) in the string. The value mark is used to allow multiple values in a column. There is also a sub-value mark, @SM which allows multiple subvalues per value.
This type of functionality along with a support for dynamic array string functions makes Server string handling powerful and versatile.

The @TM is used mainly to allow allow line breaks in formatted output and does not normally play a role in string handling.

Posted: Fri Aug 08, 2008 1:19 am
by svga
i need more details on it.

Posted: Fri Aug 08, 2008 1:24 am
by ray.wurlod
Like what? Arnd's descriptions are reasonably complete. They are system variables that contain particular byte values which are important in the DataStage Respository, UniData and UniVerse database products, primarily as dynamic array delimiters.

Posted: Fri Aug 08, 2008 1:28 am
by svga
can u give me some scenario or example where i need to use these variables.

Posted: Fri Aug 08, 2008 1:32 am
by ray.wurlod
Not really. Because you never NEED to use them.

However a common use is when obtaining the result from an Execute Command activity in a job sequence. The command that is executed has one or more line terminators, which are "translated" into field marks by DataStage (to achieve the same result irrespective of the operating system). When all you need is the result, to need to trim the field marks from the $CommandOutput activity variable. You use @FM to indicate the character that you require to be trimmed.

Posted: Fri Aug 08, 2008 1:36 am
by svga
ill @FM be placed between every column values?

Posted: Fri Aug 08, 2008 1:38 am
by ray.wurlod
In general no.