Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 FTP Task SSIS - Fixed Blocks?

Author  Topic 

purell
Starting Member

17 Posts

Posted - 2009-07-23 : 14:45:05
The person that i'm sending the txt file via ftp says:

He wants the ftp file to be 110 bytes fixed blocks (the record length).

He said I can set it up in the ftp job. But i don't see that option.

Ideas?

Ex of txt file:

20090723 APP GROUP
DMI7739|03549|GROUP0||
F44DIG|03503|GROUP0||
FLI936|03022|GROUP0||
GB001|03101|GROUP0||

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-07-23 : 15:09:36
How are you generating the file? Why not generate it as a fixed length file of 110 bytes?
Go to Top of Page

purell
Starting Member

17 Posts

Posted - 2009-07-23 : 17:24:26
On the flat file connection manager editor:

I have the format as: delimited

You suggesting changing this to: fixed width - then adjust the row width?

my sql query to get what i want:
select Convert(varchar,getdate(),112) + Char(9) + 'APP' + Char(9) + 'GROUP' as 'test', 0 as seq_no
union
select RTRIM(x1) + '|' + RTRIM(x2) + '|GROUP0|'
+ ''
+ '|' + Convert(varchar,Logon_dt,112) AS 'test', 0 as seq_no
from table1 with (nolock)
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-07-23 : 17:28:26
In the flat file connection manager, go to the "Advanced" tab and change the OutputColumnWidth to 110 bytes. I think it would have set 50 as default.
Go to Top of Page

purell
Starting Member

17 Posts

Posted - 2009-07-23 : 17:38:34
changed... under OutputColumnWidth: i set it to 110. I assume it's automatically bytes.
Go to Top of Page
   

- Advertisement -