Blank spaces

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
amitendra_amit
Participant
Posts: 27
Joined: Fri Jul 28, 2006 2:11 pm

Blank spaces

Post by amitendra_amit »

Hi,

I have fixed length files where data is something like

Code: Select all

00001000390 | 002 |
test        |     |
            | sut |
I want to capture records where values are blank as errors. I have tried trim function but its not working.

Any help in this matter is highly appreciated.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Use trim and length function in conjunction and check for zero length.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or compare against a string of all spaces.
-craig

"You can never have too many knives" -- Logan Nine Fingers
amitendra_amit
Participant
Posts: 27
Joined: Fri Jul 28, 2006 2:11 pm

Post by amitendra_amit »

Thanks a lot, it worked like a charm.
Sunshine
Post Reply