Functions (A-E)

The following chapter provides an overview of functions in alphabetic order from A to E.

A

Abs

Returns the absolute value of the specified number.

Abs(

valueappend

)

This function consists of the following elements:

Element

Description

value

A value of the type integer or float.

Return

If value is positive, value is returned. If value is negative, the prefix is inverted. The data type matches the data type of value.

AddDays

Adds the entered number of days to a date.

AddDays(

time,

numDays

)

This function consists of the following elements:

Element

Description

time

The date that the days will be added to.

numDays

The number of days to be added. If this is a negative value, the days will be subtracted.

Return

The calculated date.

The time within time is taken over into the result without modification.

AddHours

Adds the entered number of hours to a time.

AddHours(

time,

numHours

)

This function consists of the following elements:

Element

Description

time

The time that the hours will be added to.

numHours

The number of hours to be added. If this is a negative value, the hours will be subtracted.

Return

The calculated time.

If the change affects the date in time, it will be changed as well.

AddMilliseconds

Adds the entered number of milliseconds to a time.

AddMilliseconds(

time,

numMilliseconds

)

This function consists of the following elements:

Element

Description

time

The time that the milliseconds will be added to.

numMilliseconds

The number of milliseconds to be added. If this is a negative value, the milliseconds will be subtracted.

Return

The calculated time.

If the change affects the date in time, it will be changed as well.

AddMinutes

Adds the entered number of minutes to a time.

AddMinutes(

time,

numMinutes

)

This function consists of the following elements:

Element

Description

time

The time that the minutes will be added to.

numMinutes

The number of minutes to be added. If this is a negative value, the minutes will be subtracted.

Return

The calculated time.

If the change affects the date in time, it will be changed as well.

AddMonths

Adds the entered number of months to a date.

AddMonths(

time,

numMonths

)

This function consists of the following elements:

Element

Description

time

The date that the months will be added to.

numMonths

The number of months to be added. If this is a negative value, the months will be subtracted.

Return

The calculated date.

The time within time is taken over into the result without modification.

AddSeconds

Adds the entered number of seconds to a time.

AddSeconds(

time,

numSeconds

)

This function consists of the following elements:

Element

Description

time

The time that the seconds will be added to.

numSeconds

The number of seconds to be added. If this is a negative value, the seconds will be subtracted.

Return

The calculated time.

If the change affects the date in time, it will be changed as well.

AddYears

Adds the entered number of years to a date.

AddYears(

time,

numYears

)

This function consists of the following elements:

Element

Description

time

The date that the years will be added to.

numSeconds

The number of years to be added. If this is a negative value, the years will be subtracted.

Return

The calculated date.

The time within time is taken over into the result without modification.

AlienateBankBIC

Functions to alienate data are deprecated and replaced with the new consistent data masking functions. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a Bank Identifier Code (BIC).

AlienateBankBIC(

original,

valide

)

This function consists of the following elements:

Element

Description

original

Original BIC as string.

valid

Specifies whether a valid BIC code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random BIC code is returned.

Return

A string that contains an anonymized BIC.

In this example, an existing BIC is replaced by a randomly selected new BIC.

string oldBIC = "DGZFDEFFBER";

string newBIC = AlienateBankBIC(oldBIC, false);

Trace(4, newBIC);

Return:

UNBNDE21XXX

AlienateBankBLZ

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes the sort code (BLZ, Bankleitzahl) of a bank in the German banking system.

AlienateBankBLZ(

original,

valide

)

This function consists of the following elements:

Element

Description

original

Original sort code (BLZ) as string.

valid

Specifies whether a valid BLZ code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random BLZ code is returned

Return

A string that contains an anonymized BLZ.

In this example, an existing BLZ is replaced by a randomly selected new BIC.

string oldBLZ = "26261492";

string newBLZ = AlienateBankBLZ(oldBLZ, false);

Trace(4, newBLZ);

Return:

60040061

AlienateBankIBAN

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes an International Bank Account Number (IBAN).

AlienateBankIBAN(

original,

valide

)

This function consists of the following elements:

Element

Description

original

Original IBAN as string.

valid

Specifies whether a valid IBAN code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random IBAN code is returned.

Return

A string that contains an anonymized IBAN.

In this example, an existing IBAN is replaced by a randomly selected new IBAN.

string oldIBAN = "DE41250601803323561720";

string newIBAN = AlienateBankIBAN(oldIBAN, false);

Trace(4, newIBAN);

Return:

DE82684922003323561720

AlienateBankName

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes the name of a bank.

AlienateBankName(

original,

valide

)

This function consists of the following elements:

Element

Description

original

Original bank name as string.

valid

Specifies whether a valid Bankname code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random Bankname code is returned.

Return

A string that contains an anonymized bank name.

In this example, an existing bank name is replaced by a randomly selected new bank name.

string oldName = "Raiffeisen-Volksbank Miltenberg";

string newName = AlienateBankName(oldName, false);

Trace(4, newName);

Return:

Sparkasse Langen-Seligenstadt

AlienateBankPAN

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes the Primary Account Number (PAN) for the credit cards of a bank.

AlienateBankPAN(

original,

valide

)

This function consists of the following elements:

Element

Description

original

Original PAN as string.

valid

Specifies whether a valid PAN code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random PAN code is returned.

Return

A string that contains an anonymized PAN.

In this example, an existing PAN is replaced by a randomly selected new PAN.

string oldPAN = "67098";

string newPAN = AlienateBankPAN(oldPAN, false);

Trace(4, newPAN);

Return:

55380

AlienateCity

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes the name of a city.

AlienateCity(

original,

valid,

[equalLength],

[location]

)

This function consists of the following elements:

Element

Description

original

Original name of the city as string.

valid

Specifies whether a valid City must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random City is returned.

equalLength

Specifies whether the generated city name must have the same length as the original name. TRUE enforces the same length, whereas FALSE returns a name of any length.

location

The two-digit ISO Code of the country from which the alienated City should be.

Return

A string that contains an anonymized city name.

In this example, an existing city name is replaced by a randomly selected new city name.

string oldCity = "Gaushorn";

string newCity = AlienateCity(oldCity,false);

Trace(4, newCity);

Return:

Mengerskirchen

AlienateDate

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a date. The original date is replaced by a randomly chosen date.

AlienateDate(

original,

minYear,

maxYear

)

This function consists of the following elements:

Element

Description

original

Original date as date.

minYear

Defines the smallest valid year (inclusive) for the date.

If this value is smaller than 1, then 1 is used. If this value is larger than 9999, then 9999 is used.

If this value is larger than maxYear, then minYear and maxYear are swapped around.

maxYear

Defines the largest valid year (inclusive) for the date. If this value is smaller than 1, then 1 is used. If this value is larger than 9999, then 9999 is used.

If this value is smaller than maxYear, then minYear and maxYear are swapped around.

Return

A randomly chosen date that uses the time of the original date.

In this example, an existing date is replaced by a randomly chosen new date that lies between a defined minimum and maximum value.

Time oldTime = MkDate(1984, 12, 11);

Time newTime = AlienateDate(oldTime, 2007, 2014);

Trace(4, newTime);

Return:

21.05.2012 00:00:00

AlienateEmail

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes an email address.

AlienateEmail(

original,

valid,

maxLength

)

This function consists of the following elements:

Element

Description

original

Original email address as string.

valid

Specifies whether a valid Email must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideNameData(). If set to FALSE, then a random Email is returned.

maxLength

The maximum length of the email address. If the value -1 is used, the email address can have any length.

Return

A string that contains an anonymized email address.

In this example, an existing email address is replaced by a randomly selected new email address.

string oldEmail = "kim@possible.com";

string newEmail = AlienateEmail(oldEmail,false);

Trace(4, newEmail);

Return:

bionic@six.fm

AlienateFemaleForename

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a female first name.

AlienateFemaleForename(

original,

[culture],

[equalLength]

)

This function consists of the following elements:

Element

Description

original

Original female first name as string.

culture

Specifies the culture for the female first name.

equalLength

Specifies whether the generated female first name must have the same length as the original first name.

TRUE enforces the same length, whereas FALSE returns a first name of any length. For original female first names with a length of two characters or less, a name of unrestricted length is returned.

Return

A string that contains an anonymized female first name.

When using the synthesizing and anonymizing function, the culture parameter can have the following values:

Value

Meaning

de

German culture values

"" (empty string)

Various international culture values that are not assigned to a different culture value.

random

Randomly selected culture.

In this example, an existing female first name is replaced by a randomly selected new female first name.

string oldFemaleForename = "Nadine";

string newFemaleForename = AlienateFemaleForename(oldFemaleForename, "de", True);

Trace(4, newFemaleForename);

Return:

Birgit

AlienateForename

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a first name where the gender of replacement can be specified independently from that of the original name.

AlienateForename(

original,

valid | original,

[culture,

gender | tryKeepGender,

equalLength]

)

This function consists of the following elements:

Element

Description

original

Original first name as string.

valid

Specifies whether a valid name must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideNameData(). If set to FALSE, then a random name is returned.

culture

Specifies the culture for the first name.

gender

Specifies the gender of the generated first name.

tryKeepGender

Indicates whether the gender of the original name should be kept.

equalLength

Specifies whether the generated first name must have the same length as the original first name.

TRUE enforces the same length, whereas FALSE returns a first name of any length. For original first names with a length of two characters or less, a name of unrestricted length is returned.

Return

A string that contains an anonymized first name.

When using the synthesizing and anonymizing function, the culture parameter can have the following values:

Value

Meaning

de

German culture values

"" (empty string)

Various international culture values that are not assigned to a different culture value.

random

Randomly selected culture.

You can use the following values for gender:

Value

Meaning

female

Female datum

male

Male datum

neutral

Gender-neutral datum

random

Datum with a randomly chosen gender

In this example, an existing first name is replaced by a randomly selected new male first name.

string oldForename = "Verena";

string newForename = AlienateForename(oldForename, "de", "male", True);

Trace(4,newForename);

Return:

Daniel

AlienateHouseNumber

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a house number.

AlienateHouseNumber(

original,

valid,

[equalLength]

)

This function consists of the following elements:

Element

Description

original

Original house number as string.

valid

Specifies whether a valid Housenumber must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random Housenumber is returned.

equalLength

Specifies whether the generated house number must have the same length as the original number.

TRUE enforces the same length, whereas FALSE returns a number of any length.

Return

A string that contains an anonymized house number.

In this example, an existing house number is replaced by a randomly selected new house number.

string oldHouseNumber = "132";

string newHouseNumber = AlienateHouseNumber(oldHouseNumber, True);

Trace(4, newHouseNumber);

Return:

415

AlienateInsuranceName

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes the name of an insurance company.

AlienateInsuranceName(

original,

valid

)

This function consists of the following elements:

Element

Description

original

Original name of the insurance company as string.

valid

Specifies whether a valid name of an insurance company must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random name of an insurance company is returned.

Return

A string that contains an anonymized insurance company name.

In this example, an existing insurance company name is replaced by a randomly selected new insurance company name.

string oldInsuranceName = "HUK-Coburg";

string newInsuranceName = AlienateInsuranceName(oldInsuranceName,false);

Trace(4, newInsuranceName);

Return:

DEVK

AlienateInsuranceRegisterNumber

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a BAFIN register number.

AlienateInsuranceRegisterNumber(

original

valid

)

This function consists of the following elements:

Element

Description

original

Original BAFIN register number as string.

valid

Specifies whether a valid BAFIN register number must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random BAFIN register number is returned.

Return

A string that contains an anonymized BAFIN register number.

In this example, an existing BAFIN register number is replaced by a randomly selected BAFIN register number.

string oldRegisterNumber = "5800";

string newRegisterNumber = AlienateInsuranceRegisterNumber(oldRegisterNumber,false);

Trace(4, newRegisterNumber);

Return:

1432

AlienateLicensePlate

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a motor vehicle license plate.

AlienateLicensePlate(

original,

valid

)

This function consists of the following elements:

Element

Description

original

Original license plate as string.

valid

Specifies whether a valid license plate must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random license plate is returned.

Return

A string that contains an anonymized license plate.

In this example, an existing license plate is replaced by a randomly selected new license plate.

string oldLicensePlate = "HG SE 3942";

string newLicensePlate = AlienateLicensePlate(oldLicensePlate,false);

Trace(4, newLicensePlate);

Return:

OF-EM 1452

AlienateMaleForename

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a male first name.

AlienateMaleForename(

original,

[culture],

[equalLength]

)

This function consists of the following elements:

Element

Description

original

Original male first name as string.

culture

Specifies the culture for the male first name.

equalLength

Specifies whether the generated male first name must have the same length as the original first name.

TRUE enforces the same length, whereas FALSE returns a first name of any length. For original male first names with a length of two characters or less, a name of unrestricted length is returned.

Return

A string that contains an anonymized male first name.

When using the synthesizing and anonymizing function, the culture parameter can have the following values:

Value

Meaning

de

German culture values

"" (empty string)

Various international culture values that are not assigned to a different culture value.

random

Randomly selected culture.

In this example, an existing male first name is replaced by a randomly selected new male first name.

string oldMaleForename = "Sebastian";

string newMaleForename = AlienateMaleForename(oldMaleForename, "de", False);

Trace(4, newMaleForename);

Return:

Mark

AlienateMask

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes an existing string.

AlienateMask(

original,

[maxLength]

)

This function consists of the following elements:

Element

Description

original

Original string.

maxLength

In integer that specifies that maximum length of the string. If maxLength is not set, a string of the same length as the original will be returned.

Return

An anonymized string.

In this example, an existing string is replaced by a randomly formed new string.

string oldString = "Codezeile";

string newString = AlienateMask(oldString);

Trace(4, newString);

Return:

nerrrq351

AlienatePhoneNumber

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a telephone number.

AlienatePhoneNumber(

original,

valid,

minDigit,

maxDigit

)

This function consists of the following elements:

Element

Description

original

Original telephone number as string.

valid

Specifies whether a valid telephone number must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random telephone number is returned.

minDigit

Minimum number of digits the new telephone number should have.

maxDigit

Maximum number of digits the new telephone number should have.

Return

A string that contains an anonymized telephone number.

In this example, an existing telephone number is replaced by a randomly formed new telephone number.

string oldPhoneNumber = "01225/515454";

string newPhoneNumber = AlienatePhoneNumber(oldPhoneNumber, false, 0, 20);

Trace(4, newPhoneNumber);

Return:

02665/415547

AlienateState

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes the name of a federal state.

AlienateState(

original,

valid,

[location]

)

This function consists of the following elements:

Element

Description

original

Original state name as string.

valid

Specifies whether a name of a federal state must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a name of a federal state is returned.

location

The two-digit ISO Code of the country the new federal state should be from.

Return

A string that contains an anonymized federal state name.

In this example, an existing telephone number is replaced by a randomly formed new telephone number.

string oldState = "Hessen";

string newState = AlienateState(oldState,false);

Trace(4, newState);

Return:

Niedersachsen

AlienateStreet

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a street name.

AlienateStreet(

original,

valid,

[equalLength],

[location]

)

This function consists of the following elements:

Element

Description

original

Original street name as string.

valid

Specifies whether a street name must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a name of a street name is returned.

equalLength

Specifies whether the generated street name must have the same length as the original street name.

TRUE enforces the same length, whereas FALSE returns a name of any length.

location

The two-digit ISO Code of the country in which the alienated street should be.

Return

A string that contains an anonymized street name.

In this example, an existing street name is replaced by a randomly selected new street name.

string oldStreetName = "Abelstraße";

string newStreetName = AlienateStreet(oldStreetName, False);

Trace(4, newStreetName);

Return:

Abendstraße

AlienateSurname

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a surname.

AlienateSurname(

original,

valid | original

culture,

equalLength

)

This function consists of the following elements:

Element

Description

original

Original surname as string.

valid

Specifies whether a valid surname must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideNameData(). If set to FALSE, then a random surname is returned.

culture

Specifies the culture for the surname.

equalLength

Specifies whether the generated surname must have the same length as the original surname.

TRUE enforces the same length, whereas FALSE returns a name of any length.

Return

A string that contains an anonymized surname.

When using the synthesizing and anonymizing function, the culture parameter can have the following values:

Value

Meaning

de

German culture values

"" (empty string)

Various international culture values that are not assigned to a different culture value.

random

Randomly selected culture.

In this example, an existing surname is replaced by a randomly selected new surname.

string oldSurname = "Bauer";

string newSurname = AlienateSurname(oldSurname, "de", False);

Trace(4, newSurname);

Return:

Lehmann

AlienateZipCode

Tricentis recommends to use the new consistent data masking functions for masking data. However, the functions to alienate data are still available. For more information on consistent data masking, see chapter "Use consistent data masking".

Anonymizes a five-digit ZIP code.

AlienateZipCode(

original,

valid,

[location]

)

This function consists of the following elements:

Element

Description

original

Original ZIP code as string.

valid

Specifies whether a ZIP code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a name of a ZIP code is returned.

location

The two-digit ISO Code of the country from where the alienated value should be.

Return

A string that contains an anonymized ZIP code.

In this example, an existing ZIP code is replaced by a randomly selected new ZIP code.

string oldZipCode = "01998";

string newZipCode = AlienateZipCode(oldZipCode,false);

Trace(4, newZipCode);

Return:

03058

AppendFile

Writes the specified text to the file with the specified name. The text is appended to the end of the file.

AppendFile(

filename,

text,

[encoding],

[isBOM]

)

This function consists of the following elements:

Element

Description

filename

A string that contains the name of the file in which the text is to be written.

text

A string that contains the text to be written.

encoding

A string that contains the code page to be used. If this parameter is not set, UTF-8 is used.

isBOM

Indicates whether a BOM should be written into the file. If this is TRUE, a BOM is written.

Return

None.

If the file specified in filename does not exist, it is created.

The original encoding is not changed if the file already exists. For existing files, it is therefore recommended not to change the encoding via AppendFile().

ArcCos

Returns the angle of the specified cosine. This function is the reverse of the function Cos().

ArcCos(

value

)

This function consists of the following elements:

Element

Description

value

A value of the type integer or float.

Return

The angle of the specified cosine in degrees (0 – 360].

ArcSin

Returns the angle of the specified sine. This function is the reverse of the function Sin().

ArcSin(

value

)

This function consists of the following elements:

Element

Description

value

A value of the type integer or float.

Return

The angle of the specified sine in degrees (0 – 360].

ArcTan

Returns the angle of the specified tangent. This function is the reverse of the function Tan().

ArcTan(

value

)

This function consists of the following elements:

Element

Description

value

A value of the type integer or float.

Return

The angle of the specified tangent in degrees [-90 – 90].

Average

Calculates the arithmetic mean of the entered values.

Average(

value

)

This function consists of the following elements:

Element

Description

value

A list of the type integer or float.

Return

The arithmetic mean of the type float of the values contained in value. If value is empty, a result of 0.0 is returned.

This function will exit with an error if one of the values in value is NULL.

B

BulkWriteDB2Database

Inserts a record into an internal database table. The table must have been created in advance, for example using CreateDB2Table.

BulkWriteDB2Database(

connectionString,

tableName,

[keepIdentity],

[timeout]

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to create the table.

tableName

A string that contains the name of the database table.

keepIdentity

A Boolean value that specifies whether existing identity columns should be overwritten or not. If it is set to TRUE, the values in the identity columns are used.

timeout

An integer that specifies the execution timeout value in seconds. If this is not set, then the operation is limited to a maximum of 30 seconds.

Return

None.

Example:

string connectionString = "Server=1.2.3.4;User ID=user;Password=pwd";

OpenDB2Connection(connectionString);

Map newRow = CreateDB2Table(connectionString, "table", ["Vorname", "Nachname"]);

newRow["Vorname"] = "Alexander";

newRow["Nachname"] = "Maier";

InsertDatabaseRow(connectionString, "table", newRow);

BulkWriteDB2Database(connectionString, "table");

The functions for DB2 databases are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

BulkWriteHanaDatabase

Inserts a record into an internal database table. The table must have been created in advance, for example using CreateHanaTable.

BulkWriteHanaDatabase(

connectionString,

tableName,

[keepIdentity],

[internalTransaction],

[timeout]

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to create the table.

tableName

A string that contains the name of the database table.

keepIdentity

A Boolean value that specifies whether existing identity columns should be overwritten or not. If it is set to TRUE, the values in the identity columns are used.

internalTransaction

A Boolean value that specifies whether a transaction should be opened for the bulk operation.

timeout

An integer that specifies the execution timeout value in seconds. If this is not set, then the operation is limited to a maximum of 30 seconds.

Return

None.

Example:

1. string connectionString = "Server=1.2.3.4;User ID=user;Password=pwd";

2. OpenHanaConnection(connectionString);

3. Map newRow = CreateDB2Table(connectionString, "table", ["Vorname", "Nachname"]);

4. newRow["Vorname"] = "Alexander";

5. newRow["Nachname"] = "Maier";

6. InsertDatabaseRow(connectionString, "table", newRow);

7. BulkWriteHanaDatabase(connectionString, "table");

BulkWriteOracleDatabase

Inserts a record into an internal database table. The table must have been created in advance, for example using CreateOracleTable.

BulkWriteOracleDatabase(

connectionString,

tableName,

[keepIdentity],

[internalTransaction],

[timeout]

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to create the table.

tableName

A string that contains the name of the database table.

keepIdentity

A Boolean value that specifies whether existing identity columns should be overwritten or not. If it is set to TRUE, the values in the identity columns are used.

internalTransaction

A Boolean value that specifies whether a transaction should be opened for the bulk operation.

timeout

An integer that specifies the execution timeout value in seconds. If this is not set, then the operation is limited to a maximum of 30 seconds.

Return

None.

Example:

string connectionString = "Server=1.2.3.4;User ID=user;Password=pwd";

OpenOracleConnection(connectionString);

Map newRow = CreateDB2Table(connectionString, "table", ["Vorname", "Nachname"]);

newRow["Vorname"] = "Alexander";

newRow["Nachname"] = "Maier";

InsertDatabaseRow(connectionString, "table", newRow);

BulkWriteOracleDatabase(connectionString, "table");

The functions for Oracle databases are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

BulkWritePostgreSqlDatabase

Inserts cached data into the PostgreSQL database table.

BulkWritePostgreSqlDatabase(

connectionString,

tableName

)

This function consists of the following elements:

Element

Description

connectionString

The connection string.

tableName

A string that contains the name of the database table.

Return

None.

BulkWriteSqlServerDatabase

Inserts a record into an internal database table. The table must have been created in advance, for example using CreateSqlServerTable.

BulkWriteSqlServerDatabase(

connectionString,

tableName,

[keepIdentity],

[internalTransaction],

[timeout]

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to create the table.

tableName

A string that contains the name of the database table.

keepIdentity

A Boolean value that specifies whether existing identity columns should be overwritten or not. If it is set to TRUE, the values in the identity columns are used.

internalTransaction

A Boolean value that specifies whether a transaction should be opened for the bulk operation.

timeout

An integer that specifies the execution timeout value in seconds. If this is not set, then the operation is limited to a maximum of 30 seconds.

Return

None.

Example:

string connectionString = "Server=1.2.3.4;User ID=user;Password=pwd";

OpenSqlServerConnection(connectionString);

Map newRow = CreateDB2Table(connectionString, "table", ["Vorname", "Nachname"]);

newRow["Vorname"] = "Alexander";

newRow["Nachname"] = "Maier";

InsertDatabaseRow(connectionString, "table", newRow);

BulkWriteSqlServerDatabase(connectionString, "table");

C

Ceil

Returns a value that is rounded up to the next whole number.

Ceil(

value

)

This function consists of the following elements:

Element

Description

value

A value of the type float.

Return

If value has no decimal places, value is returned. Otherwise, the next highest whole number is delivered.

The result has the type integer.

Chr

Returns the character that matches the specified ordinal number. This function is the reverse of the function Ord().

Chr(

value

)

This function consists of the following elements:

Element

Description

value

The ordinal number of the character. This is an index on the code page of the system.

Return

A string that contains the character which matches the ordinal number specified in value. If value is NULL, then \0 is returned.

CloseDatabaseReader

Closes a reader that was previously opened with OpenOdbcReader, OpenSqlServerReader, OpenOracleReader, OpenDB2Reader, or OpenHanaReader.

CloseDatabaseReader(

connectionString,

statement,

[timeout]

)

This function consists of the following elements:

Element

Description

connectionString

A string in which the connection string for the database connection is specified.

statement

A string that contains the SQL statement to be executed.

Return

None.

CloseDB2Connection

Closes the DB2 database connection that was opened using the specified connection string.

A DB2 database connection that was opened with OpenDB2Connection() should be closed by calling CloseDB2Connection().

CloseDB2Connection(

connectionString

)

This function consists of the following elements:

Element

Description

connectionString

The connection string that was used to open the connection.

Return

None.

The functions for DB2 databases are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

CloseFileStream

Closes a previously opened file.

CloseFileStream(

filename

)

This function consists of the following elements:

Element

Description

filename

A string that contains the name of the file to be closed.

Return

None.

CloseHanaConnection

Closes the Hana database connection that was opened using the specified connection string.

A Hana database connection that was opened with OpenHanaConnection() should be closed by calling CloseHanaConnection().

CloseHanaConnection( connectionString )

This function consists of the following elements:

Element

Description

connectionString

The connection string that was used to open the connection.

Return

None.

The functions for Hana databases are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

CloseOdbcConnection

Closes the ODBC database connection that was opened using the specified connection string.

An ODBC database connection that was opened using OpenOdbcConnection() should be closed by calling CloseOdbcConnection().

CloseOdbcConnection(

connectionString

)

This function consists of the following elements:

Element

Description

connectionString

The connection string that was used to open the connection.

Return

None.

CloseOracleConnection

Closes the Oracle database connection that was opened using the specified connection string.

An Oracle database connection that was opened with OpenOracleConnection() should be closed by calling CloseOracleConnection().

CloseOracleConnection(

connectionString

)

This function consists of the following elements:

Element

Description

connectionString

The connection string that was used to open the connection.

Return

None.

The functions for Oracle databases are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

ClosePostgreSqlConnection

Closes an open PostgreSQL connection.

ClosePostgreSqlConnection(

connectionString

)

This function consists of the following elements:

Element

Description

connectionString

The connection string that you used to open the connection.

Return

None.

CloseSAPConnection

Closes a connection to an SAP server that was opened with OpenSAPConnection().

CloseSAPConnection(

connectionString

)

The function consists of the following elements:

connectionString

A string that contains all the necessary information to establish a connection. This must be the same string that was previously used for OpenSAPConnection().

Return

None

The following example shows the use of the functions OpenSAPConnection() and CloseSAPConnection():

String theConnectionString = "ASHOST=XXXXXXXX LANG=XX CLIENT=XXX SYSNR=XX USER=XXXXX PASSWD=XXXXXXXX";

OpenSAPConnection(theConnectionString);

// Call SAP BAPI functions here...

CloseSAPConneciton(theConnectionString);

The SAP functions are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

CloseSQLiteConnection

Closes the SQLite database connection that was opened using the specified connection string.

An SQLite database connection that was opened with OpenSQLiteConnection() should be closed by calling CloseSQLiteConnection().

CloseSQLiteConnection(

connectionString

)

This function consists of the following elements:

Element

Description

connectionString

The connection string that was used to open the connection.

Return

None.

CloseSqlServerConnection

Closes the SQL Server database connection that was opened using the specified connection string.

An SQL Server database connection that was opened using OpenSqlServerConnection() should be closed by calling CloseSqlServerConnection().

CloseSqlServerConnection(

connectionString

)

This function consists of the following elements:

Element

Description

connectionString

The connection string that was used to open the connection.

Return

None.

CloseTable

Closes an internal database table.

CloseTable(

connectionString,

tableName

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to create the table.

tableName

A string that contains the name of the database table.

Return

None.

ConfigureConsistencyDatabase

Configures a consistency database.

ConfigureConsistencyDatabase( layerId, configId, config)

This function consists of the following elements:

Element

Description

layerId

A string that contains the ID of the database access layer to use.

The access layer that is available by default is CONSISTENCY_STD_SQLITE. It uses the default SQLite database that is installed with TDM Studio.

This must not be NULL or empty.

configId

A string that contains the user defined ID to reference the database in a target's configuration.

This must not be NULL or empty.

config

A string that contains the configuration that configures the database access layer.

This can be NULL or empty to use the default CONSISTENCY_STD_SQLITE layer with the default configuration.

The optional configuration elements of the default CONSISTENCY_STD_SQLITE layer are described in chapter "Configure the SQLite consistency database"..

Return

None.

Example:

This example shows how to configure the default layer with a database that is located in the addr sub-directory of the project's MISC directory:

ConfigureConsistencyDatabase( "CONSISTENCY_STD_SQLITE", "CONSIST_ADDR", #LOCATION = MISCDIR + "addr"#);

In a target configuration, you can access the database via its configId:

private string targetConfig = # $CONSISTENCY = "CONSIST_ADDR" STREET = ... ...#;

ConfigureDataPool

Configures a data pool that can be used by the POOL masking algorithm.

ConfigureDataPool( layerId, configId, config)

This function consists of the following elements:

Element

Description

layerId

A string that contains the ID of the database access layer to use.

The access layer that is available by default is POOL_STD_SQLITE. It uses the default SQLite database that is installed with TDM Studio.

This must not be NULL or empty.

configId

A string that contains the user defined ID to reference the data pool in a target's configuration.

This must not be NULL or empty.

config

A string that contains the configuration that configures the database access layer.

This must not be NULL or empty. The configuration must contain at least the SELECT statement.

The optional configuration elements of the default POOL_STD_SQLITE layer are described in chapter "Configure data pools".

Return

None.

ConfigureTarget

Configures a target to mask.

ConfigureTarget( id, config)

This function consists of the following elements:

Element

Description

id

A string that contains the user defined ID which identifies the target.

This must not be NULL or empty.

config

A string that contains the configuration of the target.

The elements of the configuration are described in chapter "Configure targets"..

This must not be NULL or empty.

Return

None.

Example:

In this example, you have configured the following target:

private string personConfig = # NAME1 = POOL, ID:"myPersonPool", COLUMN:"Forename" NAME2 = MASK, CAHR:"X", RULE:0 NAME3 = POOL, ID:"myPersonPool", COLUMN:"Surname" EMAIL = EMAIL, MAXLEN:30#; ConfigureTarget("TARGETPERSON", personConfig);

In Test Data Language (TDL), you can get new data that replaces the existing data for this target in the following ways:

  • Get values by using the original values from a data source.

string newForename1 = Alienate("TARGETPERSON", "NAME1", orgForeame1); string newForename2 = Alienate("TARGETPERSON", "NAME2", orgForeame2); string newSurname = Alienate("TARGETPERSON", "NAME3", orgSurname); string newMail = Alienate("TARGETPERSON", "EMAIL", orgMail);

  • Get new values by creating new data for a complete target. This is useful if you are able to identify a target in several databases or systems.

map values = Alienate("TARGETPERSON", myGlobalPersonIdentifier); string newForename1 = values["NAME1"]; string newForename2 = values["NAME2"]; string newSurname = values["NAME3"]; string newMail = values["EMAIL"];

ConnectWebSphereMQ

Creates and opens a connection to the given WebSphere MQ message queue.

ConnectWebSphereMQ( hostName, port, channelName, queueManagerName [userID, password]

)

This function consists of the following elements:

Element

Description

hostName

A string with the host name or IP address.

port

The port number, with the data type integer.

channelName

A string with the channel name.

queueManagerName

A string with the name of the queuemanager

userID

A string with the username for the message queue connection.

password

A string with the password for the given user.

Example:

1 ConnectWebSphereMQ( "192.168.5.5", 1413, "CHANNEL1", "queue.manager.1");

Alternatively, with indication of authentication information:

1 ConnectWebSphereMQ( "192.168.5.5", 1413, "CHANNEL1", "queue.manager.1", “Tester”, “pawd123” );

The Websphere MQ functions are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

Contains

Checks whether the associative array contains the specified key.

Contains(

source,

key

)

This function consists of the following elements:

Element

Description

source

The source to be searched.

key

The specific key to be searched in source.

Return

A value of type Boolean that indicates whether source contains key.

In the following example, the key k is searched inside the associative array m.

string k = "theKey";

boolean hasKey = Contains(m, k);

CopyFile

Copies a file.

CopyFile(

srcFileName,

dstFileName,

overwrite

)

This function consists of the following elements:

Element

Description

srcFileName

A string that contains the name of the file to be copied.

dstFileName

A string that contains the name of the copy to be created.

overwrite

Specifies whether existing files should be overwritten.

Return

None.

If the file specified in dstFileName already exists, it will be overwritten, provided that overwrite is true. If overwrite is FALSE and a target file already exists, then an error is generated.

If srcFileName is passed as NULL, the function is terminated and an error message is displayed.

Cos

Returns the cosine of the specified angle. This function is the reverse of the function ArcCos().

Cos(

value

)

This function consists of the following elements:

Element

Description

value

The angle in degrees. This can be of the type integer or float.

Return

The cosine of the angle specified in value.

CreateArray

Creates a field with the specified number of elements which are initialized with the specified value.

CreateArray(

[size,

init]

)

This function consists of the following elements:

Element

Description

size

The number of elements to be created. If this element is not specified, an empty field is generated.

init

Any initialization value.

Return

A field that contains size elements which were initialized with the value init.

The data type of the elements matches the data type of init.

CreateBankBIC

Generates a valid Bank Identifier Code (BIC).

CreateBankBIC(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random BIC is returned.

Return

A string that contains a random BIC from the real world.

In this example, a valid BIC is generated that has a correct reference to a record previously created with ProvideBankData().

Case 1, valid = TRUE:

ProvideBankData();

string bic = CreateBankBIC(True);

In this example, a valid, randomly generated BIC is generated.

Case 2, valid = FALSE:

string bic = CreateBankBIC(False);

CreateBankBLZ

Generates a valid German sort code (BLZ, Bankleitzahl).

CreateBankBLZ(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random BLZ is returned.

Return

A string that contains a random BLZ from the real world.

In this example, a valid BLZ is generated that has a correct reference to a record previously created with ProvideBankData().

Case 1, valid = TRUE:

ProvideBankData();

string blz = CreateBankBLZ(True);

In this example, a valid, randomly generated BLZ is generated.

Case 2, valid = FALSE:

string blz = CreateBankBLZ(False);

CreateBankIBAN

Generates a valid International Bank Account Number (IBAN) that contains a Bank Identifier Code (BIC).

CreateBankIBAN(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random IBAN is returned.

Return

A string that contains a random IBAN from the real world.

In this example, a valid IBAN is generated that has a correct reference to a record previously created with ProvideBankData().

Case 1, valid = TRUE:

ProvideBankData();

string iban = CreateBankIBAN(True);

In this example, a valid, randomly generated IBAN is generated.

Case 2, valid = FALSE:

string iban = CreateBankIBAN(False);

CreateBankName

Generates a valid bank name.

CreateBankName(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random bank name is returned.

Return

A string that contains a random valid bank name from the real world.

In this example, a valid bank name is generated that has a correct reference to a record previously created with ProvideBankData().

Case 1, valid = TRUE:

ProvideBankData();

string bankname = CreateBankName(True);

In this example, a valid, randomly generated bank name is generated.

Case 2, valid = FALSE:

string bankname = CreateBankName(False);

CreateBankPAN

Generates a valid Primary Account Number (PAN).

CreateBankPAN(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random PAN is returned.

Return

A string that contains a random PAN from the real world.

In this example, a valid PAN is generated that has a correct reference to a record previously created with ProvideBankData().

Case 1, valid = TRUE:

ProvideBankData();

string pan = CreateBankPAN(True);

In this example, a valid, randomly generated PAN is generated.

Case 2, valid = FALSE:

string pan = CreateBankPAN(False);

CreateBankShortName

Generates a valid short description of a bank.

CreateBankShortName(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideBankData(). If set to FALSE, then a random short description of a bank is returned.

Return

A string that contains a random short description of a bank from the real world.

In this example, a valid short description of a bank is generated that has a correct reference to a record previously created with ProvideBankData().

Case 1, valid = TRUE:

ProvideBankData();

string bankShortName = CreateBankShortName(True);

In this example, a valid, randomly generated short description of a bank is generated.

Case 2, valid = FALSE:

string bankShortName = CreateBankShortName(False);

CreateCarManufacturer

Generates a valid car manufacturer.

CreateCarManufacturer(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideCarData(). If set to FALSE, then a random car manufacturer name is returned.

Return

A string that contains a random car manufacturer name from the real world.

In this example, a valid car manufacturer name is generated that has a correct reference to a record previously created with ProvideCarData().

Case 1, valid = TRUE:

ProvideCarData();

string carManufacturer = CreateCarManufacturer(True);

In this example, a valid, randomly generated car manufacturer name is generated.

Case 2, valid = FALSE:

string carManufacturer = CreateCarManufacturer(False);

CreateCarModel

Generates a valid car model.

CreateCarModel(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideCarData(). If set to FALSE, then a random car model is returned.

Return

A string that contains a random car model from the real world.

In this example, a valid car model is generated that has a correct reference to a record previously created with ProvideCarData().

Case 1, valid = TRUE:

ProvideCarData();

string carModel = CreateCarModel(True);

In this example, a valid, randomly generated car model is generated.

Case 2, valid = FALSE:

string carModel = CreateCarModel(False);

CreateCreditCardNumber

Generates a credit card number.

CreateCreditCardNumber(

[publisher],

valid

)

This function consists of the following elements:

Element

Description

publisher

Specifies the publisher of the credit card.

If the field remains empty, or if you enter a publisher that does not exist in the data pool, it will be generated randomly. Otherwise it will be used as the publisher of the credit card.

The following publishers can be stated: American Express, Maestro, MasterCard, and Visa.

valid

Indicates whether the credit card number to generate should be valid or not. A valid credit card number consists of a publisher-dependent number of digits that ends with a valid checksum.

Return

A large number that matches a credit card number.

These examples generate valid credit card numbers:

  • from the publisher VISA:

ProvideCreditCardData();

string creditCardNumber = CreateCreditCardNumber("Visa",true);

  • from a randomly chosen publisher:

ProvideCreditCardData();

string creditCardNumber = CreateCreditCardNumber(true);

These examples generate invalid credit card numbers:

  • a credit card number with invalid checksum from the publisher VISA:

ProvideCreditCardData();

string creditCardNumber = CreateCreditCardNumber("Visa",false);

  • a credit card number with invalid checksum from a randomly chosen publisher:

string creditCardNumber = CreateCreditCardNumber(false);

CreateCulture

Creates culture-specific information for the specified culture.

CreateCulture(

name

)

This function consists of the following elements:

Element

Description

name

A string according to ISO 639 or ISO 639-2 that specifies the culture for which information is to be generated.

Return

An object of the type culture that contains the necessary formatting information.

Culture-specific information is referenced via a two-letter language code in lower case (according to ISO 639) and a two-letter region code in upper case. The format is:

<languagecode2>-<regioncode2>

where <languagecode2> is the language code and <regioncode2> is the region code.

Examples are ja-JP for Japanese (Japan) or en-US for English (US). Where no two-letter language code is available, a three-letter code derived from ISO 639-2 can be used.

A region-neutral culture is specified by using only the two-letter language code in lower case. Thus fr stands for the neutral culture French and de for the neutral culture German.

There are two culture names which fall outside this rule.

The cultures zh-Hans (simplified Chinese) and zh-Hant (traditional Chinese) are both region-neutral. These culture names are the current standard, and they should be used if there is no specific reason for using the old codes zh-CHS and zh-CHT.

A list of strings that can be used is available in the Microsoft documentation.

CreateCurrencyCountry

Generates a country name.

CreateCurrencyCountry(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideCurrencyData(). If set to FALSE, then a random country name is returned.

Return

A string that contains a random country name from the real world.

In this example, a valid country name is generated that has a correct reference to a record previously created with ProvideCurrencyData().

Case 1, valid = TRUE:

ProvideCurrencyData();

string currencyCountry = CreateCurrencyCountry(True);

In this example, a valid, randomly generated country name is generated.

Case 2, valid = FALSE:

string currencyCountry = CreateCurrencyCountry(False);

CreateCurrencyISO

Generates a valid currency ISO.

CreateCurrencyISO(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideCurrencyData(). If set to FALSE, then a random currency ISO is returned.

Return

A string that contains a random currency ISO from the real world.

In this example, a valid currency ISO is generated that has a correct reference to a record previously created with ProvideCurrencyData().

Case 1, valid = TRUE:

ProvideCurrencyData();

string currencyISO = CreateCurrencyISO(True);

In this example, a random, valid currency ISO is generated.

Case 2, valid = FALSE:

string currencyISO = CreateCurrencyISO(False);

CreateCurrencyName

Generates a valid currency name.

CreateCurrencyName(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideCurrencyData(). If set to FALSE, then a random currency name is returned.

Return

A string that contains a random currency name from the real world.

In this example, a valid currency name is generated that has a correct reference to a record previously created with ProvideCurrencyData().

Case 1, valid = TRUE:

ProvideCurrencyData();

string currencyName = CreateCurrencyName(True);

In this example, a valid, randomly generated currency name is generated.

Case 2, valid = FALSE:

string currencyName = CreateCurrencyName(False);

CreateDB2Table

Creates an internal database table.

CreateDB2Table(

connectionString,

tableName,

columns

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to create the table.

tableName

A string that contains the name of the database table.

columns

A one-dimensional field that contains the names of the columns to be created.

Return

An associative field with one entry for each column to be created.

CreateDB2Table returns an associative field. This serves to address to columns by name in order to define values. With InsertDatabaseRow, the field can then be inserted into the internal table for transmission to the database.

Example:

string connectionString = "Server=1.2.3.4;User ID=user;Password=pwd";

OpenDB2Connection(connectionString);

Map newRow = CreateDB2Table(connectionString, "table", ["Vorname", "Nachname"]);

newRow["Vorname"] = "Alexander";

newRow["Nachname"] = "Maier";

InsertDatabaseRow(connectionString, "table", newRow);

BulkWriteDB2Database(connectionString, "table");

The functions for DB2 databases are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

CreateDir

Creates a directory with the specified name.

CreateDir(

dirname

)

This function consists of the following elements:

Element

Description

dirname

A string that contains the name of the directory to be created.

Return

TRUE if the directory was successfully created or if it already existed. FALSE if the directory could not be created.

Any subdirectories contained in dirname are also created.

CreateHanaTable

Creates an internal database table.

CreateHanaTable(

connectionString,

tableName,

columns

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to open the connection.

tableName

A string that contains the name of the database table.

columns

A one-dimensional field that contains the names of the columns to be created.

Return

An associative field with one entry for each column to be created.

CreateHanaTable returns an associative field. This serves to address to columns by name in order to define values. With InsertDatabaseRow, the field can then be inserted into the internal table for transmission to the database.

Example:

string connectionString = "Server=1.2.3.4;User ID=user;Password=pwd";

OpenHanaConnection(connectionString);

Map newRow = CreateHanaTable(connectionString, "table", ["Vorname", "Nachname"]);

newRow["Vorname"] = "Alexander";

newRow["Nachname"] = "Maier";

InsertDatabaseRow(connectionString, "table", newRow);

BulkWriteHanaDatabase(connectionString, "table");

The functions for Hana databases are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

CreateInsuranceDescription

Generates a valid description of an insurance company.

CreateInsuranceDescription(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid description must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideInsuranceData(). If set to FALSE, then a random description is returned.

Return

A string that contains a random insurance company description from the real world.

In this example, a valid insurance company description is generated that has a correct reference to a record previously created with ProvideInsuranceData().

Case 1, valid = TRUE:

ProvideInsuranceData();

string description = CreateInsuranceDescription(True);

In this example, a valid, randomly generated insurance company description is generated.

Case 2, valid = FALSE:

string description = CreateInsuranceDescription(False);

CreateInsuranceName

Generates a valid insurance company name.

CreateInsuranceName(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid insurance company name must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideInsuranceData(). If set to FALSE, then a random insurance company name is returned.

Return

A string that contains a random insurance company name from the real world.

In this example, a valid insurance company name is generated that has a correct reference to a record previously created with ProvideInsuranceData().

Case 1, valid = TRUE:

ProvideInsuranceData();

string name = CreateInsuranceName(True);

In this example, a valid, randomly generated insurance company name is generated.

Case 2, valid = FALSE:

string name = CreateInsuranceName(False);

CreateInsuranceRegisterNumber

Generates a valid registration number for an insurance company.

CreateInsuranceRegisterNumber(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid registration number must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideInsuranceData(). If set to FALSE, then a random registration number is returned.

Return

A string that contains a random registration number for an insurance company from the real world.

In this example, a valid insurance company registration number is generated that has a correct reference to a record previously created with ProvideInsuranceData().

Case 1, valid = TRUE:

ProvideInsuranceData();

string registerNumber = CreateInsuranceRegisterNumber(True);

In this example, a random, valid registration number is generated.

Case 2, valid = FALSE:

string registerNumber = CreateInsuranceRegisterNumber(False);

CreateInsuranceZip

Generates a valid ZIP code for the headquarters of an insurance company.

CreateInsuranceZip(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid ZIP code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideInsuranceData(). If set to FALSE, then a random ZIP code is returned.

Return

A string that contains a random insurance company ZIP code from the real world.

In this example, a valid insurance company ZIP code is generated that has a correct reference to a record previously created with ProvideInsuranceData().

Case 1, valid = TRUE:

ProvideInsuranceData();

string zip = CreateInsuranceZip(True);

In this example, a random, valid ZIP code is generated.

Case 2, valid = FALSE:

string registerNr = CreateInsuranceZip(False);

CreateLicensePlate

Generates a valid German motor vehicle license plate.

CreateLicensePlate(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random license plate is returned.

Return

A string that contains a random German license plate from the real world.

In this example, a valid license plate for a real administrative unit (e.g. a region or a city) is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string carLicense = CreateLicensePlate(True);

In this example, a valid, randomly generated license plate is generated.

Case 2, valid = FALSE:

string carLicense = CreateLicensePlate(False);

CreateLocationAreaCode

Generates a valid telephone area code.

CreateLocationAreaCode(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid area code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random area code is returned.

Return

A string that contains a random area code from the real world.

In this example, a valid area code is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string areaCode = CreateLocationAreaCode(True);

In this example, a random, valid area code is generated.

Case 2, valid = FALSE:

string areaCode = CreateLocationAreaCode(False);

CreateLocationCity

Generates a valid city name.

CreateLocationCity(

valid,

[location]

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random city name is returned.

location

The two-digit ISO Code of the country the city should be in.

Return

A string that contains a random city name from the real world.

In this example, a valid city name is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string city = CreateLocationCity(True);

In this example, a valid, randomly generated city name is generated.

Case 2, valid = FALSE:

string city = CreateLocationCity(False);

CreateLocationCountry

Generates a valid country name.

CreateLocationCountry(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid country name must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random country name is returned.

Return

A string that contains a random country name from the real world.

In this example, a valid country name is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string country = CreateLocationCountry(True);

In this example, a valid, randomly generated country name is generated.

Case 2, valid = FALSE:

string country = CreateLocationCountry(False);

CreateLocationHouseNumber

Generates a house number between 1 and 150.

CreateLocationHouseNumber(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid house number must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random house number is returned.

Return

A string that contains a random house number between 1 and 150.

In this example, a valid house number is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string houseNumber = CreateLocationHouseNumber(True);

In this example, a random house number is generated.

Case 2, valid = FALSE:

string houseNumber = CreateLocationHouseNumber(False);

CreateLocationNumericCountryCode

Generates a valid numeric ISO 3116 country code.

CreateLocationNumericCountryCode(

valid,

[location]

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a code for a valid country must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random, valid country code is returned.

location

The two-digit ISO Code of the country from which to get the created value.

Return

A string that contains a randomly selected, valid ISO 3116 country code.

In this example, a valid country code is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string numericCountryCode = CreateLocationNumericCountryCode(True);

In this example, a valid numerical code for a randomly selected country is generated.

Case 2, valid = FALSE:

string numericCountryCode = CreateLocationNumericCountryCode(False);

CreateLocationState

Generates a valid federal state name.

CreateLocationState(

valid,

[location]

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid federal state name must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random federal state name is returned.

location

The two-digit ISO Code of the country the state should be in.

Return

A string that contains a random federal state name from the real world.

In this example, a valid federal state name is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string state = CreateLocationState(True);

In this example, a valid, randomly generated federal state name is generated.

Case 2, valid = FALSE:

string state = CreateLocationState(False);

CreateLocationStreet

Generates a valid street name.

CreateLocationStreet(

valid,

[location]

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid street name must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random street name is returned.

location

The two-digit ISO Code of the country the street should be in.

Return

A string that contains a random street name from the real world.

In this example, a valid street name is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string street = CreateLocationStreet(True);

In this example, a valid, randomly generated street name is generated.

Case 2, valid = FALSE:

string street = CreateLocationStreet(False);

CreateLocationThreeDigitCountryCode

Generates a valid three-digit ISO 3116 country code.

CreateLocationThreeDigitCountryCode(

valid,

[location]

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a code for a valid country must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random, valid country code is returned.

location

The two-digit ISO Code of the country from which to get the created value.

Return

A string that contains a randomly selected, valid three-digit ISO 3116 country code.

In this example, a valid three-digit country code is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string threeDigitCountryCode = CreateLocationThreeDigitCountryCode(True);

In this example, a valid three-digit country code for a randomly selected country is generated.

Case 2, valid = FALSE:

string threeDigitCountryCode = CreateLocationThreeDigitCountryCode(False);

CreateLocationTwoDigitCountryCode

Generates a valid two-digit ISO 3116 country code.

CreateLocationTwoDigitCountryCode(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a code for a valid country must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random, valid country code is returned.

Return

A string that contains a randomly selected, valid two-digit ISO 3116 country code.

In this example, a valid two-digit country code is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string threeDigitCountryCode = CreateLocationTwoDigitCountryCode(True);

In this example, a valid two-digit country code for a randomly selected country is generated.

Case 2, valid = FALSE:

string threeDigitCountryCode = CreateLocationTwoDigitCountryCode(False);

CreateLocationZIP

Generates a valid ZIP code.

CreateLocationZIP(

valid,

[location]

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid ZIP code must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideLocationData(). If set to FALSE, then a random ZIP code is returned.

location

The two-digit ISO Code of the country from which to get the created value.

Return

A string that contains a random ZIP code from the real world.

In this example, a valid ZIP code for a real administrative unit (e.g. a region or a city) is generated that has a correct reference to a record previously created with ProvideLocationData().

Case 1, valid = TRUE:

ProvideLocationData();

string zip = CreateLocationZIP(True);

In this example, a randomly selected, valid ZIP code for a real administrative unit (e.g. a region or a city) is generated.

Case 2, valid = FALSE:

string zip = CreateLocationZIP(False);

CreateMap

Creates a new associative array.

CreateMap(

[size]

[data]

)

This function consists of the following elements:

Element

Description

size

Initializes the associative array with a specified capacity.

data

Initializes the associative array with the contents of a two-dimensional field.

This two-dimensional field cannot be empty and each of its subfields must include two elements: the first element is the key, and the second element is the value to associate with the key.

Return

The created associative field.

In this example, a new, empty associative array is created:

Map m = CreateMap();

In this example, an associative array of a specified capacity is generated (this creates an empty array, but reserves the memory for later use):

Map m = CreateMap(5);

In this example, a new associative array with the contents of a two-dimensional array data is generated:

Array data = [["Germany", "Berlin"],["Austria", "Wien"],["Spain", "Madrid"]];

Map m = CreateMap(data);

CreateMessageQueue

Creates a message queue with the specified name.

CreateMessageQueue(

path

)

This function consists of the following elements:

Element

Description

path

A string that contains the name of the message queue to be created.

Return

TRUE if the message queue was successfully created or if it already existed. FALSE if the message queue could not be created.

The syntax for the path parameter depends on the type of queue that is created, as summarized in the table below. For the local computer, a full stop can be specified.

Queue type

Syntax

Public queue

Computer\Queue

Private queue

Computer\Private$\Queue

Journal queue

Computer\Queue\Journal$

Journal queue of the computer

Computer\Journal$

CreateNameAppellation

Generates a salutation.

CreateNameAppellation(

culture,

valid

)

This function consists of the following elements:

Element

Description

culture

Specifies the culture for the salutation. If the string random is passed, then a culture will be chosen randomly.

valid

Specifies whether the returned name shall be a valid name.

Return

A string that contains a salutation from the real world.

When using the synthesizing and anonymizing function, the culture parameter can have the following values:

Value

Meaning

de

German culture values

"" (empty string)

Various international culture values that are not assigned to a different culture value.

random

Randomly selected culture.

In these examples, valid salutations for first names are generated.

Case 1:

ProvideNameData();

string nameAppellation = CreateNameAppellation("de", TRUE);

Case 2:

ProvideNameData();

string nameAppellation = CreateNameAppellation("en", TRUE);

CreateNameEmail

Generates an email address.

CreateNameEmail(

valid,

maxLength

)

This function consists of the following elements:

Element

Description

valid

A logical value that specifies whether a first name should be integrated that was previously created with ProvideNameData.

maxLength

An integer that specifies the maximum length of the email address. If a value of -1 or less is passed, then the email address can be of any length. If a value between 0 and 3 is passed, then the email address will be generated with a length of 3 characters.

Return

A string that contains an email address in a valid format.

In this example, an email address in a valid format is generated.

ProvideNameData();

string email = CreateNameEmail(True, 30);

CreateNameForename

Generates a first name.

CreateNameForename(

valid | gender,

culture

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid first name must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideNameData(). If set to FALSE, then a random first name is returned.

gender

Specifies the gender of the generated first name. If the string random is passed, then the gender for the first name will be chosen randomly.

culture

Specifies the culture for the generated first name. If the string random is passed, then the culture for the first name will be chosen randomly. If an empty string is passed, an international name will be chosen.

Return

A string that contains a random first name from the real world.

When using the synthesizing and anonymizing function, the culture parameter can have the following values:

Value

Meaning

de

German culture values

"" (empty string)

Various international culture values that are not assigned to a different culture value.

random

Randomly selected culture.

You can use the following values for gender:

Value

Meaning

female

Female datum

male

Male datum

neutral

Gender-neutral datum

random

Datum with a randomly chosen gender

This example generates a first name of neutral gender with an international culture.

ProvideNameData();

string forename = CreateNameForename("neutral", "");

This example generates a random first name.

ProvideNameData();

string forename = CreateNameForename(true);

CreateNameSurname

Generates a surname

CreateNameSurname(

valid

)

This function consists of the following elements:

Element

Description

valid

A logical value that specifies whether a surname should be returned that was previously created with ProvideNameData().

If FALSE is passed, then a new random surname is generated.

Return

A string that contains a random surname from the real world.

This example generates a complete name set and returns the surname.

ProvideNameData();

string surname = CreateNameSurname(true);

This example generates a random surname.

string surname = CreateNameSurname(false);

CreateNameTitle

Generates a valid academical title.

CreateNameTitle(

[culture],

[area]

valid | [gender]

)

This function consists of the following elements:

Element

Description

culture

Specifies the culture for the title.

If an empty string is passed, an international title will be chosen. If the string random is passed, then a value will be chosen randomly.

area

Specifies the area for the title. If the string random is passed, then a value will be chosen randomly.

gender

Specifies the gender for the title. If the string random is passed, then a value will be chosen randomly.

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideNameData(). If set to FALSE, then a random title is returned.

Return

A string that contains a random title from the real world.

When using the synthesizing and anonymizing function, the culture parameter can have the following values:

Value

Meaning

de

German culture values

"" (empty string)

Various international culture values that are not assigned to a different culture value

random

Randomly selected culture

You can use the following values for gender:

Value

Meaning

female

Female datum

male

Male datum

neutral

Gender-neutral datum

random

Datum with a randomly chosen gender

The area parameter can have the following values:

Value

Meaning

academic

Academic titles

noble

Aristocratic titles

random

Randomly selected title

In these examples, valid titles are generated.

Case 1 – Aristocratic titles:

ProvideNameData();

string nameTitle = CreateNameTitle("de", "noble", True);

Case 2 – Academic titles:

ProvideNameData();

string nameTitle = CreateNameTitle("random", "academic", "neutral");

CreateOracleTable

Creates an internal database table.

CreateOracleTable(

connectionString,

tableName,

columns

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to create the table.

tableName

A string that contains the name of the database table.

columns

A one-dimensional field that contains the names of the columns to be created.

Return

An associative field with one entry for each column to be created.

CreateOracleTable returns an associative field. This serves to address to columns by name in order to define values. With InsertDatabaseRow, the field can then be inserted into the internal table for transmission to the database.

Example:

string connectionString = "Server=1.2.3.4;User ID=user;Password=pwd";

OpenOracleConnection(connectionString);

Map newRow = CreateDB2Table(connectionString, "table", ["Vorname", "Nachname"]);

newRow["Vorname"] = "Alexander";

newRow["Nachname"] = "Maier";

InsertDatabaseRow(connectionString, "table", newRow);

BulkWriteOracleDatabase(connectionString, "table");

The functions for Oracle databases are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

CreatePostgreSqlConnectionString

Creates a connection string for PostgreSQL.

CreatePostgreSqlConnectionString(

dataSource,

dataBase,

[integratedSecurity],

[userid],

[password],

[timeout],

[values]

)

This function consists of the following elements:

Element

Description

dataSource

The name of the database host and instance in the format host\instance.

dataBase

The name of the database.

integratedSecurity

Set this parameter to true to use Windows authentication.

This parameter is optional.

userid

The user name to login to the database, if you don't use integratedSecurity.

This parameter is optional.

password

The password to login to the database, if you don't use integratedSecurity.

This parameter is optional.

timeout

An integer that specifies the query timeout value in seconds.

If this is not set or NULL, the query duration is limited to 30 seconds.

values

A map object that contains additional parameters for the connection.

This parameter is optional.

Return

A connection string for connecting to a PostgreSQL database.

CreatePostgreSqlTable

Creates or recreates an internal table for caching rows that you want to insert into a PostgreSQL database table.

CreatePostgreSqlTable(

connectionString,

tableName,

columns

)

This function consists of the following elements:

Element

Description

connectionString

The connection string that you used to create the table.

tableName

A string that contains the name of the database table.

columns

A one-dimensional field that contains the names of the columns you want to create.

Return

An associative array that contains one entry per column which is accessible via its column name.

The value of each column is its configured default value.

CreateSqlServerTable

Creates an internal database table.

CreateSqlServerTable(

connectionString,

tableName,

columns

)

This function consists of the following elements:

Element

Description

connectionString

A connection string that was used to create the table.

tableName

A string that contains the name of the database table.

columns

A one-dimensional field that contains the names of the columns to be created.

Return

An associative field with one entry for each column to be created.

CreateSqlServerTable returns an associative field. This serves to address to columns by name in order to define values. With InsertDatabaseRow, the field can then be inserted into the internal table for transmission to the database.

Example:

string connectionString = "Server=1.2.3.4;User ID=user;Password=pwd";

OpenSqlServerConnection(connectionString);

Map newRow = CreateDB2Table(connectionString, "table", ["Vorname", "Nachname"]);

newRow["Vorname"] = "Alexander";

newRow["Nachname"] = "Maier";

InsertDatabaseRow(connectionString, "table", newRow);

BulkWriteSqlServerDatabase(connectionString, "table");

CreateStockCompanyName

Generates a valid stock market company name.

CreateStockCompanyName(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideStockData(). If set to FALSE, then a random company name is returned.

Return

A string that contains a random stock market company name from the real world.

In this example, a valid stock market company name is generated that has a correct reference to a record previously created with ProvideStockData().

Case 1, valid = TRUE:

ProvideStockData();

string stockCompanyName = CreateStockCompanyName(True);

In this example, a valid, randomly generated stock market company name is generated.

Case 2, valid = FALSE:

string stockCompanyName = CreateStockCompanyName(False);

CreateStockIndex

Generates a valid stock index.

CreateStockIndex(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideStockData(). If set to FALSE, then a random stock index is returned.

Return

A string that contains a random stock index from the real world.

In this example, a valid stock index is generated that has a correct reference to a record previously created with ProvideStockData().

Case 1, valid = TRUE:

ProvideStockData();

string stockIndex = CreateStockIndex(True);

In this example, a valid, randomly generated stock index is generated.

Case 2, valid = FALSE:

string stockIndex = CreateStockIndex(False);

CreateStockISIN

Generates a valid International Securities Identification Number (ISIN).

CreateStockISIN(

valid

)

This function consists of the following elements:

Element

Description

valid

Specifies whether a valid datum must be generated.

If set to TRUE, then a record from the data pool must previously have been generated with ProvideStockData(). If set to FALSE, then a random ISIN is returned.

Return

A string that contains a random ISIN from the real world.

In this example, a valid ISIN is generated that has a correct reference to a record previously created with ProvideStockData().

Case 1, valid = TRUE:

ProvideStockData();

string ISIN = CreateStockISIN(True);

In this example, a valid, random ISIN of a real company at the stock market is generated.

Case 2, valid = FALSE:

string ISIN = CreateStockISIN(False);

D

Day

Returns the day from the specified date.

Day(

time

)

This function consists of the following elements:

Element

Description

time

A value with the data type time.

Return

The day, with the data type integer (1 – 31).

DayOfYear

Returns the day of the year from the specified date.

DayOfYear(

time

)

This function consists of the following elements:

Element

Description

time

A value with the data type time.

Return

The day of the year, with the data type integer (1 – 366).

DBStr

Converts the specified value to a string.

DBStr(

value,

[format,

ci]

 )

This function consists of the following elements:

Element

Description

value

The value to be converted. It can have any data type.

format

An optional formatting specification. This is the same kind of specification that is used after the colon in the Format() function.

If the parameter is not set, a default format is used.

ci

Culture-specific information of the type culture.

If this parameter is not set, then the current country settings of the operating system are used. The same applies when ci is NULL.

Return

Returns the specified value from value as a string. If value is NULL, then NULL is returned.

Delay

Delays the current task loop for the entered number of milliseconds and updates the CURRENTTIME variable.

Delay(

numMilliseconds,

[forceRealTime]

)

This function consists of the following elements:

Element

Description

numMilliseconds

An integer value containing the number of milliseconds in the range [0 - 2,000,000,000] that the task loop will be delayed for.

0 is used if this is less than 0. 2,000,000,000 is used if this is greater than 2,000,000,000.

forceRealTime

A logical value that specifies whether a "real" pause should be inserted, even if real time processing is not activated in the project or task settings.

If this is not set, the current project or task settings are used.

Return

None.

If a task loop is set as concurrent, then only the loop from which this function is called will be delayed for the entered number of milliseconds while all other loops continue to run (provided that they are not also delayed via Delay()).

If no task loop is set or no task loop is set as concurrent, the current data creation process will be delayed for the respective number of milliseconds.

If Delay() is called in the initialization phase (in the project or task variables), then this call delays the entire generation process by the respective time.

If the task or project settings specify that the current time should be used, then an actual delay by the entered number of milliseconds is applied. Otherwise, the CURRENTTIME variable will be increased by numMilliSeconds without an actual delay taking place.

DeleteAllMessages

Deletes all messages from the specified queue.

DeleteAllMessages(

path

)

This function consists of the following elements:

Element

Description

path

A string that contains the name of the message queue to be cleared.

Return

None.

Names of message queues are described under CreateMessageQueue().

DeleteDir

Deletes the directory with the specified name, including any subdirectories.

DeleteDir(

dirname

)

This function consists of the following elements:

Element

Description

dirname

A string that contains the name of the directory to be deleted.

Return

None.

If dirname is passed as NULL, the execution of the function is terminated and an error message displays.

DeleteFile

Deletes the file with the specified name.

DeleteFile(

filename

)

This function consists of the following elements:

Element

Description

filename

A string that contains the name of the file to be deleted.

Return

None.

DeleteMessageQueue

Deletes the message queue with the specified name.

DeleteMessageQueue(

path

)

This function consists of the following elements:

Element

Description

path

A string that contains the name of the message queue to be deleted.

Return

None.

Names of message queues are described under CreateMessageQueue().

DirExists

Checks whether the specified directory exists.

DirExists(

dirName

)

This function consists of the following elements:

Element

Description

dirName

A string that contains the name of the directory.

Return

TRUE if the directory exists, otherwise FALSE.

If dirName is passed as NULL, the execution of the function is terminated and an error message displays.

Disambiguate

Disambiguates the specified value.

Disambiguate(

value,

maxLength

)

This function consists of the following elements:

Element

Description

value

A string that is to be disambiguated.

maxLength

An integer that gives the maximum length of the resulting value.

Return

A new unique string value that is built from value.

This creates a new string value from value that is unique within other values that are created by Disambiguate before.

DisconnectWebSphereMQ

Closes the connection to the WebSphere MQ.

DisconnectWebSphereMQ()

Example:

1 DisconnectWebSphereMQ();

The Websphere MQ functions are not included in projects by default. They are provided in the installation directory and can be added to a given project as an external function directory.

DRand

Returns a randomly generated date.

DRand(

minYear,

maxYear

)

This function consists of the following elements:

Element

Description

minYear

Defines the smallest valid year (inclusive) for the date.

If this value is less than 1, 1 is used. If this value is greater than 9999, 9999 is used.

If this value is greater than maxYear, minYear and maxYear are swapped.

maxYear

Defines the largest valid year (inclusive) for the date.

If this value is less than 1, 1 is used. If this value is greater than 9999, 9999 is used.

If this value is less than minYear, minYear and maxYear are swapped.

Return

A randomly generated date of the type time.

The system uses so-called pseudo-random numbers for generating the date. This means that the returned value is not actually random, but that it has been calculated.

Every subsequent call of DRand() will return a different date. Multiple calls will return a sequence of values with an equal distribution within the range [minYear – maxYear].

The random number generator is initialized with a start value by the function RandSeed(). An identical start value will always generate the same sequence of random dates.

For example, to generate a random date from the years 2001 and 2002, the call would look like this:

DRand(2001, 2002)

DRand

Generates a random date in the specified time frame.

DRand(

minDate,

maxDate

)

This function consists of the following elements:

Element

Description

minDate

A date that defines the earliest date to create.

If this value is greater than maxDate, minDate and maxDate are swapped.

maxDate

A date that defines the latest date to create.

If this value is smaller than minDate, minDate and maxDate are swapped.

Return

The generated date. The time component is set to 00:00:00.

Dynamic

Enables the dynamic evaluation of a value.

Normally a value that configures a masking algorithm is evaluated when the ConfigureTarget() function is called. Using Dynamic() forces the evaluation of the parameter every time Mask() is called.

This function is useful only in conjunction with a masking target.

Dynamic(

expression)

This function consists of the following elements:

Element

Description

expression

A string that contains the expression to evaluate. This can be any valid expression in TDL (Test Data Language).

Return

The expression to evaluate. This is not useable in TDL but is internally used when Mask() is called..

E

ErrorExit

Terminates the data generation, when called within a template.

ErrorExit(

msg,

[error]

)

This function consists of the following elements:

Element

Description

msg

A string that contains the message to be written into the log file.

error

An error number with the data type integer. If this is negative, 0 is used. If this is greater than 999, 999 is used.

Return

None.

If error is not specified, the number 8000 is used. If error is specified, the number contained in it is added to 8000 to avoid conflicts with existing numbers.

Exp

Returns evalue (Euler Number to the power of value).

Exp(

value

)

This function consists of the following elements:

Element

Description

value

An exponent of the type integer or float.

Return

evalue of the type float.