Hi all !
I try to use the field function but I don't realy understand, So this is that I want to do (from a sequential file to an other sequential file) :
EPF1.10.58op.20060514
KK.4444.5.98
I want just to return the first and fourth substring, dot . is the delimiter
result :
EPF120060514
KK98
I think I have to use the field function, may be, but I'm not familiar with could you help me
Thanks
select substring with field function
Moderators: chulett, rschirm, roy
You are correct.
The field function will achieve your task.
Use this
where In.Link will be your input
And how the field function works, look in your DataStage help. It has a clear description of the function.
Regards,
The field function will achieve your task.
Use this
Code: Select all
FIELD(In.Link,".",1):FIELD(In.Link,".",4)
And how the field function works, look in your DataStage help. It has a clear description of the function.
Regards,
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
If your job is defined as follows:
Why don't you just define the first sequential file stage with a '.' as a delimeter, pick the 1st and 4th columns in the transformer, then feed it to the second sequential file.
Ofcourse, you can only do this if the source sequential file will always have 4 columns.
Code: Select all
seq file --> transformer --> seq file2
Ofcourse, you can only do this if the source sequential file will always have 4 columns.