MS/SQL OpenQuery to linked DB2 Server error

I have a SPROC that takes in parameters and uses OpenQuery to create a record in an AS400 DB2 table.   It works fine from my development server ( MS/SQL 2008 R2 ) but not from my production server ( MS/SQL 2008 R2 ).  The Linked Server to the AS400 is identical on both servers.  My production server returns this error:

A syntax error was detected at token ..  Token . is not a valid token.

The SPROC is attached.

I'm calling it as follows:

declare @result smallint
exec [dbo].[sprocAS400_Insert] 'VALUE1', 'VALUE-2', 'VALUE-0-3', 'VALUE4', 24, @result OUTPUT
select @result

above works fine but only from my test server.  The full error message ( also attached ) doesn't give me anything to go on - any suggestions?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
Why not using the DATETIME value directly, instead of you manual conversion?
Gary PattersonVP Technology / Senior Consultant Commented:
I don't think DB2 likes the "." delimiter in "prodlib.mstable".  By defaule, the AS/400 DB2 delimiter is a "/".  The type of delimeter (and other important factors in how the query is interpreted) is controlled by the NAMING FORMAT selected when the connection is created.

I suspect that in your dev environment, the linked server is configured for *SQL naming format ("." delimiter), and in your prod environment it is configured for *SYS (system) naming format ("/" delimiter).

Take a look at the linked server configurations on each and make sure they match.

- Gary

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
Swamp_Thing, do you still need help with this question?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.