System Variables
S2PX Translations
This page list the DataStage System Variables available for use in Server Jobs and their treatment by S2PX.
Variable Name | Description | S2PX Translation | Notes |
---|---|---|---|
@DATE | The internal date when the program started. See the Date function. |
| |
@DAY | The day of the month extracted from the value in @DATE. |
| |
@FALSE | The compiler replaces the value with 0. | No translation. | |
@FM | A field mark, Char(254). |
| |
@IM | An item mark, Char(255). |
| |
@INROWNUM | Input row counter. For use in constraints and derivations in Transformer stages. |
| |
@OUTROWNUM | Output row counter (per link). For use in derivations in Transformer stages. | No translation. | |
@LOGNAME | The user login name. | ||
@MONTH | The current extracted from the value in @DATE. |
| |
@NULL | The null value. |
| |
@NULL.STR | The internal representation of the null value, Char(128). |
| |
@PATH | The path name of the current InfoSphere DataStage project. | ||
@SCHEMA | The schema name of the current InfoSphere DataStage project. |
| |
@SM | A sub-value mark, Char(252). |
| |
@SYSTEM.RETURN.CODE | Status codes returned by system processes or commands. | ||
@TIME | The internal time when the program started. See the Time function. |
| |
@TM | A text mark, Char(251). |
| |
@TRUE | The compiler replaces the value with 1. | No translation. | |
@USERNO | The user number. | ||
@VM | A value mark, Char(253). |
| |
@WHO | The name of the current InfoSphere DataStage project directory. |
| |
@YEAR | The current year extracted from @DATE. |
|
System Marks
Universe has a set of ‘System Mark’ characters which are used to support multi-valued strings. These characters are represented as fixed ASCII values, have special handling when converting to and from NLS Code pages and Unicode, and can be accessed directly using system variables. The table below shows the ASCII and Unicode Hex Values for each System Mark:
System Variable | Description | ASCII Character | Unicode Character |
---|---|---|---|
@IM | Item Mark | 0xFF | 0xF8FF |
@FM | Field Mark | 0xFE | 0xF8FE |
@VM | Value Mark | 0xFD | 0xF8FD |
@SM | Sub-value Mark | 0xFC | 0xF8FC |
@TM | Text Mark | 0xFB | 0xF8FB |
@NULL.STR | Null String | 0x80 | 0xF8F7 |
One of the first things to note is that the ASCII Character values are outside the standard 0x00-0x7F
range and don't usually map to a valid character when using single byte NLS mappings. This is by design as all these values have special functionality within Universe and Server Job Transformers. The exception to this is @NULL.STR
which typically maps to the Euro Symbol €
, however the euro symbol (0x80
) was introduced long after these values were introduced to Universe.
Due to the way multi-byte character encodings such as UTF-8 write characters outside the 0x00-0x7F
range, none of the ASCII character values can be used directly. Instead they are translated to Unicode code points in one of the higher plane ranges.
As a direct consequence of the ASCII and Unicode character values used by Universe, there is no way to support these characters in Parallel without potentially causing NLS encoding issues. Evidence indicates that the vast majority of DataStage users only use these mark fields as superficial delimiters, therefore S2PX uses a different encoding for these variables that are within the simple 0x00-0x7F
ASCII range, avoiding potential NLS issues:
System Variable | ASCII Character (Hex) | ASCII Character (Dec) | ASCII Character Name |
---|---|---|---|
@IM | 0x1F | 31 | Unit Separator |
@FM | 0x1E | 30 | Record Separator |
@VM | 0x1D | 29 | Group Separator |
@SM | 0x1C | 28 | File Separator |
@TM | 0x1A | 26 | Substitute |
@NULL.STR | 0x19 | 25 | End of Medium |
The mappings for the Extract
and Substrings
Transformer functions account for the S2PX-specific encodings of these marks.
See also
© 2015-2024 Data Migrators Pty Ltd.