system variable

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
svga
Participant
Posts: 73
Joined: Thu Aug 07, 2008 6:31 am
Location: Syracuse

system variable

Post by svga »

Hi,

Please explain abt system variables @TM,@FM,@VM.and where to use those variables?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
svga
Participant
Posts: 73
Joined: Thu Aug 07, 2008 6:31 am
Location: Syracuse

Post by svga »

i need more details on it.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
svga
Participant
Posts: 73
Joined: Thu Aug 07, 2008 6:31 am
Location: Syracuse

Post by svga »

can u give me some scenario or example where i need to use these variables.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
svga
Participant
Posts: 73
Joined: Thu Aug 07, 2008 6:31 am
Location: Syracuse

Post by svga »

ill @FM be placed between every column values?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In general no.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply