Information icon IBM InfoSphere DataStage and InfoSphere QualityStage, Version 8.5
space Feedback

Col1 Function

Returns the character position preceding the substring specified in the most recently executed Field function.

Syntax

Col1 ( )

Remarks

The character position is returned as a number. The returned value is local to the routine executing the Field function. The value of Col1 in the routine is initialized as 0.

Col1 returns a value of 0 if:

Examples

The Field function in the following example returns substring "CCC". Col1 ( ) returns 8, the position of the delimiter (/) that precedes CCC.

* Extract third "/"-delimited field.
SubString = Field("AAA/BBB/CCC", "/" ,3)
Position = Col1()       ;* get position of delimiter

In the following example, the Field function returns a substring of two fields with the delimiter (.) that separates them: 4.5. Col1 ( ) returns 6, the position of the delimiter that precedes 4.

* Get fourth and fifth "."-delimited fields.
SubString = Field("1.2.3.4.5.6", ".", 4, 2)
Position = Col1()        ;* get position of delimiter

PDFThis topic is also in the IBM InfoSphere DataStage Server Job Developer's Guide.

Update timestamp Last updated: 2010-09-30