Weird Character When copying file...

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

rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Weird Character When copying file...

Post by rodre »

Hello Everyone, :)
Sometimes (not always) when a file (flat file) is copied, either manually or via a .Bat file with the copy command, it produces this character "" at the end of the file which causes a datastage job to abort.
Can the row or the character be deleted before running the Server Job?
Thank you for your response in advance!!... :)
Rodre
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

where are you copying it from and where to. I use to see that character when i would ftp a file from mainframe to windows in ascii format. But if it was ndm'd (ftp'd) directly to a unix server, that 'box' wouldnt show up.
Does this box appear at the end of the last character or after the last row on a new line ?
Try by specifying "column has terminators", in the column specs in the seq. file stage. See if that helps.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

Non Printable characters like this can be handled using OCONV with MCP and MCN options...
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

True.
As i mentioned, if it appears at the end of record then MCP conversion code can be used. If it appears in a new line, datastage will treat it as a new record with all the columns missing and hence scream.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Post by rodre »

The file is ftp'd to us, however the copying is done within the datastage windows server, from one folder to another. Also, the original ftp'd file does not have the box character until the file is copied.

The box shows up after the last row on a new line.

I tried "column has terminators", it did not help.

Don't this need to be deleted before opening the file or would abort?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

So what you are trying to say is, when you are picking up the original ftp'd file, there is no box present, but when you copy it a different folder it magically shows up???
How are you copying the file? Is via datastage job or through some other mechanism?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Ok. Did some testing.
Go to the Seq. File -> outputs tab -> columns.
Scroll right to the "Incomplete Column" property and select replace. What replace does is it replaces it with NULL.
This was atleast your job wont abort. You can then handle this particular row from not being passed on in the transformer by constraining it.
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 »

rodre wrote:The box shows up after the last row on a new line.
That's because it is an 'EOF' marker, a.k.a a Control-Z if I remembers me DOS days. Should be a way to transfer the file without that little booger. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You are correct Craig. It is control Z. I dont know about dos but in unix it is control z (^Z).
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Post by rodre »

Changing the "Incomplete Column" to Replace, it gives a compile error:

"The incomplete value of Column Name must have values in ascending order"

What does this mean?...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You have to start at 'the end' and work your way back to the beginning with that particular option.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You have to specify that at the last column. I just tested it. The job runs fine.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Post by rodre »

GREAT....Thanks for your help!!!! the file loads now.....

What is the best way to delete that empty row? In the transformer or is a filter command...
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

specify the constraint

Code: Select all

inlink.FIRST_COLUMN <> ""
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSguru2B wrote:You are correct Craig. It is control Z. I dont know about dos but in unix it is control z (^Z).
My understanding is that Ctrl-Z is the DOS end-of-file character, and that the UNIX end-of-file character is Ctrl-D.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply