2012年3月11日星期日
BCP in having I/O error
I have data coming from mainframes. In sysbase the bcp in works fine using the fromat file however, when i convert the format file for sql compatibility it get the error
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading BCP format file.
Below are the format of my files used in sybase and sql. Please do let me know what could be the cause
Sybase fmt file:
10.0
10
1SYBCHAR0 9""1a
2SYBCHAR06""2b
3SYBCHAR020""3c
4SYBCHAR015""4d
5SYBCHAR 01""5e
6SYBCHAR 0 3""6f
7SYBCHAR 01""7g
8SYBCHAR 08""8h
9 SYBCHAR 0 6 "" 9 i
10 SYBCHAR 0 1 "\n" 15 j
SQL Format file:
8.0
10
1SQLCHAR0 9""1a
2SQLCHAR06""2b
3SQLCHAR 020""3c
4SQLCHAR 015""4d
5SQLCHAR 01""5e
6SQLCHAR 0 3""6f
7SQLCHAR01""7g
8SQLCHAR 08""8h
9 SQLCHAR 0 6 "" 9 i
10 SQLCHAR 0 1 "\n" 15 j
Does someone know why am i getting this error.
Thanks.
Arzan,
The SQL Server format file specification includes an additional column
for the collation. Perhaps you are getting this error because you've
left that column out. Also be sure there is a carriage return at the
end of the final line of the file.
Steve Kass
Drew University
Arzan wrote:
>Hi,
>I have data coming from mainframes. In sysbase the bcp in works fine using the fromat file however, when i convert the format file for sql compatibility it get the error
>SQLState = S1000, NativeError = 0
>Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading BCP format file.
>Below are the format of my files used in sybase and sql. Please do let me know what could be the cause
>Sybase fmt file:
>10.0
>10
>1SYBCHAR0 9""1a
>2SYBCHAR06""2b
>3SYBCHAR020""3c
>4SYBCHAR015""4d
>5SYBCHAR 01""5e
>6SYBCHAR 0 3""6f
>7SYBCHAR 01""7g
>8SYBCHAR 08""8h
>9 SYBCHAR 0 6 "" 9 i
>10 SYBCHAR 0 1 "\n" 15 j
>SQL Format file:
>8.0
>10
>1SQLCHAR0 9""1a
>2SQLCHAR06""2b
>3SQLCHAR 020""3c
>4SQLCHAR 015""4d
>5SQLCHAR 01""5e
>6SQLCHAR 0 3""6f
>7SQLCHAR01""7g
>8SQLCHAR 08""8h
>9 SQLCHAR 0 6 "" 9 i
>10 SQLCHAR 0 1 "\n" 15 j
>Does someone know why am i getting this error.
>Thanks.
>
|||Hi Steve,
Now i get the error as below:
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Any clue on this.
Thanks.
"Steve Kass" wrote:
> Arzan,
> The SQL Server format file specification includes an additional column
> for the collation. Perhaps you are getting this error because you've
> left that column out. Also be sure there is a carriage return at the
> end of the final line of the file.
> Steve Kass
> Drew University
> Arzan wrote:
>
|||Arzan,
That sounds like a mismatch between the format file and the data -
have you verified that the lengths of the fields in the data file are
correct? Another possibility is that your data is Unicode, in which
case you'll want SQLNCHAR instead of SQLCHAR.
SK
Arzan wrote:
[vbcol=seagreen]
>Hi Steve,
>Now i get the error as below:
>SQLState = 22001, NativeError = 0
>Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
>SQLState = 22001, NativeError = 0
>Any clue on this.
>Thanks.
>"Steve Kass" wrote:
>
BCP in having I/O error
I have data coming from mainframes. In sysbase the bcp in works fine using t
he fromat file however, when i convert the format file for sql compatibility
it get the error
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading B
CP format file.
Below are the format of my files used in sybase and sql. Please do let me kn
ow what could be the cause
Sybase fmt file:
10.0
10
1 SYBCHAR 0 9 "" 1 a
2 SYBCHAR 0 6 "" 2 b
3 SYBCHAR 0 20 "" 3 c
4 SYBCHAR 0 15 "" 4 d
5 SYBCHAR 0 1 "" 5 e
6 SYBCHAR 0 3 "" 6 f
7 SYBCHAR 0 1 "" 7 g
8 SYBCHAR 0 8 "" 8 h
9 SYBCHAR 0 6 "" 9
i
10 SYBCHAR 0 1 "\n" 15
j
SQL Format file:
8.0
10
1 SQLCHAR 0 9 "" 1 a
2 SQLCHAR 0 6 "" 2 b
3 SQLCHAR 0 20 "" 3 c
4 SQLCHAR 0 15 "" 4 d
5 SQLCHAR 0 1 "" 5 e
6 SQLCHAR 0 3 "" 6 f
7 SQLCHAR 0 1 "" 7 g
8 SQLCHAR 0 8 "" 8 h
9 SQLCHAR 0 6 "" 9
i
10 SQLCHAR 0 1 "\n" 15
j
Does someone know why am i getting this error.
Thanks.Arzan,
The SQL Server format file specification includes an additional column
for the collation. Perhaps you are getting this error because you've
left that column out. Also be sure there is a carriage return at the
end of the final line of the file.
Steve Kass
Drew University
Arzan wrote:
>Hi,
>I have data coming from mainframes. In sysbase the bcp in works fine using
the fromat file however, when i convert the format file for sql compatibilit
y it get the error
>SQLState = S1000, NativeError = 0
>Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading
BCP format file.
>Below are the format of my files used in sybase and sql. Please do let me k
now what could be the cause
>Sybase fmt file:
>10.0
>10
>1 SYBCHAR 0 9 "" 1 a
>2 SYBCHAR 0 6 "" 2 b
>3 SYBCHAR 0 20 "" 3 c
>4 SYBCHAR 0 15 "" 4 d
>5 SYBCHAR 0 1 "" 5 e
>6 SYBCHAR 0 3 "" 6 f
>7 SYBCHAR 0 1 "" 7 g
>8 SYBCHAR 0 8 "" 8 h
>9 SYBCHAR 0 6 "" 9
i
>10 SYBCHAR 0 1 "\n" 15
j
>SQL Format file:
>8.0
>10
>1 SQLCHAR 0 9 "" 1 a
>2 SQLCHAR 0 6 "" 2 b
>3 SQLCHAR 0 20 "" 3 c
>4 SQLCHAR 0 15 "" 4 d
>5 SQLCHAR 0 1 "" 5 e
>6 SQLCHAR 0 3 "" 6 f
>7 SQLCHAR 0 1 "" 7 g
>8 SQLCHAR 0 8 "" 8 h
>9 SQLCHAR 0 6 "" 9
i
>10 SQLCHAR 0 1 "\n" 15
j
>Does someone know why am i getting this error.
>Thanks.
>|||Hi Steve,
Now i get the error as below:
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right trunca
tion
SQLState = 22001, NativeError = 0
Any clue on this.
Thanks.
"Steve Kass" wrote:
> Arzan,
> The SQL Server format file specification includes an additional column
> for the collation. Perhaps you are getting this error because you've
> left that column out. Also be sure there is a carriage return at the
> end of the final line of the file.
> Steve Kass
> Drew University
> Arzan wrote:
>
>|||Arzan,
That sounds like a mismatch between the format file and the data -
have you verified that the lengths of the fields in the data file are
correct? Another possibility is that your data is Unicode, in which
case you'll want SQLNCHAR instead of SQLCHAR.
SK
Arzan wrote:
[vbcol=seagreen]
>Hi Steve,
>Now i get the error as below:
>SQLState = 22001, NativeError = 0
>Error = [Microsoft][ODBC SQL Server Driver]String data, right trunc
ation
>SQLState = 22001, NativeError = 0
>Any clue on this.
>Thanks.
>"Steve Kass" wrote:
>
>
2012年2月16日星期四
BCM with accounting 2007
Batch Script
Hello everyone,
I have about 20 dtsx packages to run in a particular order.
Some create tables, other fill/convert data, and others just clean/remove temporary tables.
Everything works ok manually...
But, i need to run them automatically.
A batch script seems the quickest and more simple way to do...
So, I made a batch with something like this:
dtexec.exe file1.dtsx > output1.txt
dtexec.exe file2.dtsx > output2.txt
dtexec.exe file3.dtsx > output3.txt
(the ideia is to save the logs...)
My first question is...
I get a very usual "product level is insufficient" (0xC00470FE) error on some components...
It's wierd because manually works ok. But through the batch it returns lot's of these...
I searched for information and found this...
It's a nice topic, not enought to fix my problem.
My second question is...
A noob batch script question:
Can i make something like this:
dtexec.exe file1.dtsx > output1.txt
IF FIND /C /I "End Error" output1.txt != 0 GOTO EXITSCRIPT
The ideia is to search the log for errors, and if found any run other batch file...
Thank you so much for any help!!!
David
Have you thought about just creating a master package that runs your packages in the desired order? You have a lot more flexibility that way instead of batch files. Just my opinion.