I’m having a very strange problem in one of my jobs. We are reading data from a COBOL Copybook, and using a global variable (varchar 100)to choose the file to open.
This is a very simple Copybook to Query Transform to Staging table dataflow. It runs fine as long as we don’t put anything into the WHERE clause in the Query Transform. As soon as we do, we can no longer open up the file because the data in the global variable gets truncated.
The value should be \Fs2a\group\it\vol\group\mktsys\j2k\text.txt but it kept getting truncated down to \Fs
The job server was kind enough to let us know that we couldn’t open the file because the data in the global varialbe ‘may’ have been truncated.
I played around with it some more, and tried a few different fields in the WHERE clause, and it turns out that the global variable is truncated down to the length of the varchar in the WHERE clause.
Even better is when I put a decimal value in the WHERE clause. I get pages of junk spit out in the error message. It’s pretty awesome.
Anyway, if anyone has any suggestions on a work around so I don’t have to hard code this value in, I would appreciate it. It does work perfectly fine as long as we aren’t trying to use a variable.
I did try using local variables to parameters, but that didn’t work either.
jonsauce (BOB member since 2010-04-07)