Datastage functions and routines--------------------------------
$DefineDefines identifiers that control program compilation or supplies replacement text for an identifier.
$IfDefTests an identifier to see if it is defined or not defined.
$IfNDefTests an identifier to see if it is defined or not defined.
$IncludeInserts source code contained in a separate file and compiles it along with the main program.
$UndefineRemoves an identifier that was set using the $Define statement. If no identifier is set, $Undefine has no effect.
AbsReturns the absolute (unsigned) value of a number.
ACosreturns the arc-cosine of number in degrees. ACos is the inverse of Cos.
AlphaChecks if a string is alphabetic. If NLS is enabled, the result of this function is dependent on the current locale setting of the Ctype convention.
AsciiConverts the values of characters in a string from EBCDIC to ASCII.
ASinreturns the arc-sine of number in degrees. ASin is the inverse of Sin.
ATanreturns the arc-tangent of number in degrees. ATan is the inverse of Tan.
BitAndcompares two integers bit by bit. For each bit, it returns bit 1 if both bits are 1; otherwise it returns bit 0.
BitNotinverts the bits in an integer, that is, changes bit 1 to bit 0, and vice versa. If bit.number is specified, that bit is inverted; otherwise all bits are inverted.
BitOrcompares two integers bit by bit. For each bit, it returns bit 1, if either or both bits is 1; otherwise it returns bit 0.
BitResetresets the specified bit to 0. If it is already 0, it is not changed.
BitSetsets the specified bit to 1. If it is already 1, it is not changed.
BitTesttests if the specified bit is set. It returns 1 if the bit is set; 0 if it is not.
BitXOrcompares two integers bit by bit. For each bit, it returns bit 1 if only one of the two bits is 1; otherwise it returns bit 0.
ByteLets you build a string byte by byte.
ByteLenReturns the length of a string in bytes
ByteTypeDetermines the internal function of a particular byte.
ByteValDetermines the value of a particular byte in a string.
CallCalls a subroutine.
CaseAlters the sequence of execution in the program according to the value of an expression.
CatsConcatenates two strings.
ChangeReplaces one or more instances of a substring.
CharGenerates an ASCII character from its numeric code value.
ChecksumReturns a checksum value for a string.
CloseSeqCloses a file after sequential processing.
Col1Returns the character position preceding the substring specified in the most recently executed Field function.
Col2Returns the character position following the substring specified in the most recently executed Field function.
CommonDefines a common storage area for variables.
CompareCompares two strings. If NLS is enabled, the result of this function depends on the current locale setting of the Collate convention.
ConvertReplaces every instance of specified characters in a string with substitute characters.
Cosreturns the cosine of an angle. number is the number of degrees in the angle. Cos is the inverse of ACos.
CosHreturns the hyperbolic cosine of an angle. number is the number of degrees in the angle.
CountCounts the number of times a substring occurs in a string.
CRCReturns a 32-bit cyclic redundancy check value for a string.
CRC32Returns a 32-bit cyclic redundancy check value for a string.
DateReturns a date in its internal system format.
DCountCounts delimited fields in a string.
DeffunDefines a user-written function.
DimensionDefines the dimensions of one or more arrays.
DivDivides one number by another.
DownCaseConverts uppercase letters in a string to lowercase. If NLS is enabled, the result of this function depends on the current locale setting of the Ctype convention.
DQuoteEncloses a string in double quotation marks.
DSAttachJobAttaches to a job in order to run it in job control sequence. A handle is returned which is used for addressing the job. There can only be one handle open for a particular job at any one time.
DSCheckRoutineChecks if a BASIC routine is cataloged, either in the VOC as a callable item, or in the global catalog space.
DSDetachJobThis routine is used to give back a JobHandle acqu
DSExecuteExecutes a DOS or DataStage Engine command from a before/after subroutine.
DSGetJobInfoProvides a method of obtaining information about a job, which can be used generally as well as for job control. It can refer to the current job or a controlled job, depending on the value of JobHandle.
DSGetLinkInfoProvides a method of obtaining information about a link on an active stage, which can be used generally as well as for job control. This routine may reference either a controlled job or the current job, depending on the value of JobHandle.
DSGetLogEntryThis function is used to read the full event details given in EventId.
DSGetLogSummaryReturns a list of short log event details. The details returned are determined by the setting of some filters. (Care should be taken with the setting of the filters, otherwise a large amount of information can be returned.)
DSGetNewestLogIdThis function is used to get the ID of the most recent log event in a particular category, or in any category.
DSGetParamInfoThis function provides a method of obtaining information about a parameter, which can be used generally as well as for job control. This routine may reference either a controlled job or the current job, depending on the value of JobHandle.
DSGetProjectInfoProvides a method of obtaining information about the current project.
DSGetStageInfoProvides a method of obtaining information about a stage, which can be used generally as well as for job control. It can refer to the current job, or a controlled job, depending on the value of JobHandle.
DSGetStageLinksReturns a field mark delimited list containing the names of all of the input/output links of the specified stage.
DSLogEventThis function is used to log an event message to a job other than the current one. (Use DSLogInfo, DSLogFatal, or DSLogWarn to log an event to the current job.)
DSLogFatalLogs a fatal error message in a job's log file and aborts the job.
DSLogInfoLogs an information message in a job's log file.
DSLogToControllerThis routine may be used to put an info message in the log file of the job controlling this job, if any. If there isn't one, the call is just ignored.
DSLogWarnLogs a warning message in a job's log file.
DSMakeJobReportGenerates a string describing the complete status of a valid attached job.
DSMakeMsgInsert arguments into a message template. Optionally, it will look up a template ID in the standard DataStage messages file, and use any returned message template instead of that given to the routine.
DSPrepareJobUsed to ensure that a compiled job is in the correct state to be run or validated.
DSRunJobUsed to start a job running. Note that this call is asynchronous; the request is passed to the run-time engine, but you are not informed of its progress.
DSSetGenerateOpMetaDataUse this to specify whether the job generates operational meta data or not. This overrides the default setting for the project. In order to generate operational meta data the Process MetaBroker must be installed on your DataStage machine.
DSSetJobLimitBy default a controlled job inherits any row or warning limits from the controlling job. These can, however, be overridden using the DSSetJobLimit function.
DSSetParamUsed to specify job parameter values prior to running a job. Any parameter not set will be defaulted.
DSSetUserStatusThis routine applies only to the current job, and does not take a JobHandle parameter. It can be used by any job in either a JobControl or After routine to set a termination code for interrogation by another job. In fact, the code may be set at any poin
DSStopJobThis routine should only be used after a DSRunJob has been issued. It immediately sends a Stop request to the run-time engine.
DSTransformErrorLogs a warning message to a job log file. Called from transforms only.
DSTranslateCodeConverts a job control status or error code into an explanatory text message.
DSWaitForFileSuspend a job until a named file either exists or does not exist.
DSWaitForJobThis function is only valid if the current job has issued a DSRunJob on the given JobHandle. It returns if that job has started since the last DSRunJobwas issued on it and si
DtxConverts a decimal integer to hexadecimal.
EbcdicConverts the values of characters in a string from ASCII to EBCDIC format.
ElseDefine several blocks of statements and the conditions that determine which block is executed. You can use a single line syntax or multiple lines in a block.
EndIndicates the end of a program, a subroutine, or a block of statements.
EquateEquates a value to a symbol or a literal string during compilation.
EreplaceReplaces one or more instances of a substring.
ExchangeReplaces a character in a string.
ExitDefine a program loop.
ExpReturns the value of "e" raised to the specified power.
FieldReturns delimited substrings in a string.
FieldStoreModifies character strings by inserting, deleting, or replacing fields separated by specified delimiters.
FixUse the FIX function to convert a numeric value to a floatin-point number with a specified precision. FIX lets you control the accuracy of computation by eliminating excess or unreliable data from numeric results.
FmtFormats data for output.
FmtDPIn NLS mode, formats data in display positions rather than by character length.
FoldFolds strings to create substrings.
FoldDPIn NLS mode, folds strings to create substrings using character display positions.
ForCreate a For…Next program loop.
GetLocaleIn NLS mode, retrieves the current locale setting for a specified category.
GoSubTransfers program control to an internal subroutine.
GoToTransfers program control to the specified statement.
IconvConverts a string to an internal storage format.
IfExecute one or more statements conditionally. You can use a single line syntax or multiple lines in a block.
IndexReturns the starting position of a substring.
InMatRetrieves the dimensions of an array, or determines if a Dim statement failed due to insufficient memory.
IntReturns the integer portion of a numeric expression.
IsNullTests if a variable contains a null value.
LeftExtracts a substring from the start of a string.
LenReturns the number of characters in a string.
LenDPIn NLS mode, returns the length of a string in display positions.
LnCalculates the natural logarithm of the value of an expression, using base "e".
LocateUse a LOCATE statement to search dynamic.array for expression and to return a value
LoopDefine a program loop.
MatAssigns values to the elements of an array.
MatchCompares a string with a format pattern. If NLS is enabled, the result of a match operation depends on the current locale setting of the Ctype and Numeric conventions.
MatchFieldSearches a string and returns the part of it that matches a pattern element.
ModReturns the remainder after a division operation.
NapPauses a program for the specified number of milliseconds.
NegReturns the inverse of a number.
NextCreate a For…Next program loop.
NotInverts the logical result of an expression.
NullPerforms no action and generates no object code.
NumDetermines whether a string is numeric. If NLS is enabled, the result of this function depends on the current locale setting of the Numeric convention.
OconvConverts an expression to an output format.
OnTransfer program control to an internal subroutine.
OpenSeqOpens a file for sequential processing.
PwrRaises the value of a number to the specified power.
QuoteEncloses a string in double quotation marks.
RandomizeGenerates a repeatable sequence of random numbers in a specified range.
ReadSeqReads a line of data from a file opened for sequential processing.
RealUse the REAL function to convert number into a floating-point number without loss of accuracy. If number evaluates to the null value, null is returned.
RepeatDefine a program loop.
ReturnEnds a subroutine and returns control to the calling program or statement.
RightExtracts a substring from the end of a string.
RndGenerates a random number.
SeqConverts an ASCII character to its numeric code value.
SetLocaleIn NLS mode, sets a locale for a specified category.
Sinreturns the sine of an angle. number is the number of degrees in the angle. Sin is the inverse of ASin.
SinHreturns the hyperbolic sine of an angle. number is the number of degrees in the angle.
SleepPauses a program for the specified number of seconds.
SoundexGenerates codes that can be used to compare character strings based on how they sound.
SpaceReturns a string containing the specified number of blank spaces.
SqrtReturns the square root of a number.
SQuoteEncloses a string in single quotation marks.
StatusReturns a code that provides information about how a preceding function was executed.
StrComposes a string by repeating the input string the specified number of times.
SubstringReturns a substring of a string.
SubstringsReturns a substring of a string.
Tanreturns the hyperbolic tangent of an angle. number is the number of degrees in the angle.
TanHreturns the hyperbolic tangent of an angle. number is the number of degrees in the angle.
ThenExecute one or more statements conditionally. You can use a single line syntax or multiple lines in a block.
TimeReturns the internal system time.
TimeDateReturns the system time and date. If NLS is enabled, the result of this function depends on the current locale setting of the Time convention.
TrimTrims unwanted characters from a string.
TrimBTrims trailing spaces from a string.
TrimFTrims leading spaces and tabs from a string.
UniCharIn NLS mode, generates a single character in Unicode format.
UniSeqIn NLS mode, converts a Unicode character to its equivalent decimal value.
UntilDefine a program loop.
UpCaseChanges lowercase letters in a string to uppercase. If NLS is enabled, the result of this function depends on the current locale setting of the Ctype convention.
WEOFSeqWrites an end-of-file mark in an open sequential file.
WhileDefine a program loop.
WriteSeqWrites a new line to a file that is open for sequential processing and advances a pointer to the next position in the file.
WriteSeqFWrites a new line to a file that is open for sequential processing, advances a pointer to the next position in the file, and saves the file to disk.
XtdConverts a hexadecimal string to decimal.
--------------------------------------------------------------------------------