What is the use of Field function

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
chennu.rajesh
Participant
Posts: 1
Joined: Thu Oct 06, 2005 6:23 am

What is the use of Field function

Post by chennu.rajesh »

Hello everybody, can any one please let me know
what is the use of FIELD function in data stage. Thanks in advance.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Field will parse a string.


Var='12345~flkflkf~789=234'
F1=field(Var,'~',1)
F2=field(Var,'~',2)
F3=field(Var,'~',3)
F2_3=field(Var,'~',2,2)
X2=field(Var,'=',2)

Would mean:

F1 = '12345'
F2 = 'flkflkf'
F3 = '789'
F2_3 = 'flkflkf~789'
X2 = '234'
Mamu Kim
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

For other future requirements, your DS BASIC manual is available under your Start button in the Ascential folder. It's 1000 pages of documentation.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
sjhouse
Premium Member
Premium Member
Posts: 43
Joined: Tue Nov 02, 2004 12:11 pm
Location: Minneapolis, MN

Post by sjhouse »

The on-line documentation is is very helpful for how to use the various functions and possible alternatives to do similar tasks.

It is one of the first pieces I show newbies when they are learning how to use the tool.

Stephen
Post Reply