Hi All,
We are in process of migrating the server(7.1) job to Parallel Edition i.e 7.5.2 In server i have used LETTERS to extract only Alphabetics because the column may contain special characters and numbers.When i am converting the job to 7.5.2 Parallel i am getting a problem.
I searched the forum i got convert function can do that.but for extracting numbers from string it would be helpful
Please give the solution.
Equivalent to LETTERS in DataStage 7.5.2 Parallel Edition
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
You can write your own function...something along the lines below
Code: Select all
// Note - Not compiled or tested
# include <iostream.h>
char returnString[4001]; // Assuming max length
char *letters(char *inString)
{
char *tempPtr = inString;
int idx = 0;
while (*tempPtr)
{
if ((*tempPtr >= 'A' && *tempPtr <= 'Z') || (*tempPtr >= 'a' && *tempPtr <= 'z'))
returnString[idx++] = *tempPtr;
tempPtr++;
}
returnString[idx] = '\0';
return returnString;
}
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: