Problems trying to get WIP to call AS/400 program
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Problems trying to get WIP to call AS/400 program

 
Post new topic   Reply to topic    Windows Server Forum Index -> Host Integration Server
Author Message
James Pemberton
Guest





Posted: Fri Aug 12, 2005 8:52 pm    Post subject: Problems trying to get WIP to call AS/400 program Reply with quote

I think I have everything setup properly, but you never know. I am having a
hard time finding decent documentation for trying to setup the TI in HIS
2004.



Anyway back to my problem. After some trials and tribulations I was able to
get past the security issue I was having just to jusmp into another problem.
I am attaching the piece of code that will try to call a program on our
AS/400.



Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnConvert.Click

If tbDatetoConvert.Text <> String.Empty Then

Dim returndate As Decimal = 0

Dim convert As DateConversions = New DateConversions

Dim context() As Object

Dim cti As New Microsoft.HostIntegration.TI.ClientContext

cti.WriteContext("PASSWORD", tbpassword.Text, context)

cti.WriteContext("USERID", tbuser.Text, context)

Dim cat As String = "dog" + "Cat"

Try

convert.DateConvert(CDec(tbDatetoConvert.Text), tbConvertFrom.Text, _

tbConvertTo.Text, returndate, context)

lbResult.Text = CStr(returndate)

Catch ex As Microsoft.HostIntegration.TI.CustomTIException

Console.WriteLine(CStr(ex.Message + Environment.NewLine))

Console.WriteLine(CStr(ex.StackTrace + Environment.NewLine))

End Try

End If

End Sub





In the try catch I am receiving the following error:





(2183) The TCP Transport received a start server request failure from RE
AS400Conn, AS400 DPC returned: primary return code is 2, secondary return
code is 1.





Server stack trace:



Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)

at DateCalls.DateConversions.DateConvert(Decimal NUMERICDATE, String
FROMDATETYPE, String TODATETYPE, Decimal& RETURNDATE, Object[]& rgCtxt)

at DateCalls.DateConversions.DateConvert(Decimal NUMERICDATE, String
FROMDATETYPE, String TODATETYPE, Decimal& RETURNDATE, Object[]& rgCtxt)

at TestTIIntegrator.Form1.btnConvert_Click(Object sender, EventArgs e) in
C:\Visual Studio Projects\TestTIIntegrator\frmDateConvert.vb:line 135



Thanks in advance for anyone's help.
Back to top
Aaron Grady [MSFT]
Guest





Posted: Tue Aug 16, 2005 12:52 am    Post subject: Re: Problems trying to get WIP to call AS/400 program Reply with quote

I believe primary return code of 2, secondary return code of 1 is still a
security problem saying the UserID is not recognized. It appears you are
using the context object correctly. Are you sure you're passing a valid
UserID & Password? Most AS/400's require the UserID and Password to be in
upper case, can you give that a try and see if it resolves the problem?

HTH,
--
Aaron Grady
MCSE + Internet, MCDBA, MCSD, MCAD.NET
SNA Server/Host Integration Server
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"James Pemberton" <james.pemberton@devro-casings.com> wrote in message
news:uSzPBY2nFHA.3960@TK2MSFTNGP12.phx.gbl...
Quote:
I think I have everything setup properly, but you never know. I am having
a hard time finding decent documentation for trying to setup the TI in HIS
2004.



Anyway back to my problem. After some trials and tribulations I was able
to get past the security issue I was having just to jusmp into another
problem. I am attaching the piece of code that will try to call a program
on our AS/400.



Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnConvert.Click

If tbDatetoConvert.Text <> String.Empty Then

Dim returndate As Decimal = 0

Dim convert As DateConversions = New DateConversions

Dim context() As Object

Dim cti As New Microsoft.HostIntegration.TI.ClientContext

cti.WriteContext("PASSWORD", tbpassword.Text, context)

cti.WriteContext("USERID", tbuser.Text, context)

Dim cat As String = "dog" + "Cat"

Try

convert.DateConvert(CDec(tbDatetoConvert.Text), tbConvertFrom.Text, _

tbConvertTo.Text, returndate, context)

lbResult.Text = CStr(returndate)

Catch ex As Microsoft.HostIntegration.TI.CustomTIException

Console.WriteLine(CStr(ex.Message + Environment.NewLine))

Console.WriteLine(CStr(ex.StackTrace + Environment.NewLine))

End Try

End If

End Sub





In the try catch I am receiving the following error:





(2183) The TCP Transport received a start server request failure from RE
AS400Conn, AS400 DPC returned: primary return code is 2, secondary return
code is 1.





Server stack trace:



Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)

at DateCalls.DateConversions.DateConvert(Decimal NUMERICDATE, String
FROMDATETYPE, String TODATETYPE, Decimal& RETURNDATE, Object[]& rgCtxt)

at DateCalls.DateConversions.DateConvert(Decimal NUMERICDATE, String
FROMDATETYPE, String TODATETYPE, Decimal& RETURNDATE, Object[]& rgCtxt)

at TestTIIntegrator.Form1.btnConvert_Click(Object sender, EventArgs e) in
C:\Visual Studio Projects\TestTIIntegrator\frmDateConvert.vb:line 135



Thanks in advance for anyone's help.

Back to top
James Pemberton
Guest





Posted: Tue Aug 16, 2005 4:53 pm    Post subject: Re: Problems trying to get WIP to call AS/400 program Reply with quote

That was a new one on me. As soon as I changed the userid and password to
UpperCase, the test software for CederBank worked fine. I still had to make
sure all of my programs and libraries were in uppercase as well for my
program to actually work.

Is there anyplace at the Microsoft ro MSDN web sites that we could actually
lookup error codes that have a more meaningful explanation?

Thanks for the information.

"Aaron Grady [MSFT]" <aagrady@online.microsoft.com> wrote in message
news:OJ%23EIoeoFHA.572@TK2MSFTNGP15.phx.gbl...
Quote:
I believe primary return code of 2, secondary return code of 1 is still a
security problem saying the UserID is not recognized. It appears you are
using the context object correctly. Are you sure you're passing a valid
UserID & Password? Most AS/400's require the UserID and Password to be in
upper case, can you give that a try and see if it resolves the problem?

HTH,
--
Aaron Grady
MCSE + Internet, MCDBA, MCSD, MCAD.NET
SNA Server/Host Integration Server
Microsoft

This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of any included samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"James Pemberton" <james.pemberton@devro-casings.com> wrote in message
news:uSzPBY2nFHA.3960@TK2MSFTNGP12.phx.gbl...
I think I have everything setup properly, but you never know. I am having
a hard time finding decent documentation for trying to setup the TI in HIS
2004.



Anyway back to my problem. After some trials and tribulations I was able
to get past the security issue I was having just to jusmp into another
problem. I am attaching the piece of code that will try to call a program
on our AS/400.



Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnConvert.Click

If tbDatetoConvert.Text <> String.Empty Then

Dim returndate As Decimal = 0

Dim convert As DateConversions = New DateConversions

Dim context() As Object

Dim cti As New Microsoft.HostIntegration.TI.ClientContext

cti.WriteContext("PASSWORD", tbpassword.Text, context)

cti.WriteContext("USERID", tbuser.Text, context)

Dim cat As String = "dog" + "Cat"

Try

convert.DateConvert(CDec(tbDatetoConvert.Text), tbConvertFrom.Text, _

tbConvertTo.Text, returndate, context)

lbResult.Text = CStr(returndate)

Catch ex As Microsoft.HostIntegration.TI.CustomTIException

Console.WriteLine(CStr(ex.Message + Environment.NewLine))

Console.WriteLine(CStr(ex.StackTrace + Environment.NewLine))

End Try

End If

End Sub





In the try catch I am receiving the following error:





(2183) The TCP Transport received a start server request failure from RE
AS400Conn, AS400 DPC returned: primary return code is 2, secondary return
code is 1.





Server stack trace:



Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)

at DateCalls.DateConversions.DateConvert(Decimal NUMERICDATE, String
FROMDATETYPE, String TODATETYPE, Decimal& RETURNDATE, Object[]& rgCtxt)

at DateCalls.DateConversions.DateConvert(Decimal NUMERICDATE, String
FROMDATETYPE, String TODATETYPE, Decimal& RETURNDATE, Object[]& rgCtxt)

at TestTIIntegrator.Form1.btnConvert_Click(Object sender, EventArgs e) in
C:\Visual Studio Projects\TestTIIntegrator\frmDateConvert.vb:line 135



Thanks in advance for anyone's help.



Back to top
Aaron Grady [MSFT]
Guest





Posted: Thu Aug 18, 2005 4:53 pm    Post subject: Re: Problems trying to get WIP to call AS/400 program Reply with quote

Unfortunately those error codes are buried in the IBM AS/400 Sign On Server
Interface specification which I don't think has any public documentation
anywhere. I don't think we have the license to publish this information, it
has to be obtained directly from IBM. I'll double check that, but I'm pretty
sure that's the case.

--
Aaron Grady
MCSE + Internet, MCDBA, MCSD, MCAD.NET
SNA Server/Host Integration Server
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"James Pemberton" <james.pemberton@devro-casings.com> wrote in message
news:eDCtbhmoFHA.3316@TK2MSFTNGP14.phx.gbl...
Quote:
That was a new one on me. As soon as I changed the userid and password to
UpperCase, the test software for CederBank worked fine. I still had to
make sure all of my programs and libraries were in uppercase as well for
my program to actually work.

Is there anyplace at the Microsoft ro MSDN web sites that we could
actually lookup error codes that have a more meaningful explanation?

Thanks for the information.

"Aaron Grady [MSFT]" <aagrady@online.microsoft.com> wrote in message
news:OJ%23EIoeoFHA.572@TK2MSFTNGP15.phx.gbl...
I believe primary return code of 2, secondary return code of 1 is still a
security problem saying the UserID is not recognized. It appears you are
using the context object correctly. Are you sure you're passing a valid
UserID & Password? Most AS/400's require the UserID and Password to be in
upper case, can you give that a try and see if it resolves the problem?

HTH,
--
Aaron Grady
MCSE + Internet, MCDBA, MCSD, MCAD.NET
SNA Server/Host Integration Server
Microsoft

This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of any included samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"James Pemberton" <james.pemberton@devro-casings.com> wrote in message
news:uSzPBY2nFHA.3960@TK2MSFTNGP12.phx.gbl...
I think I have everything setup properly, but you never know. I am
having a hard time finding decent documentation for trying to setup the
TI in HIS 2004.



Anyway back to my problem. After some trials and tribulations I was
able to get past the security issue I was having just to jusmp into
another problem. I am attaching the piece of code that will try to call
a program on our AS/400.



Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnConvert.Click

If tbDatetoConvert.Text <> String.Empty Then

Dim returndate As Decimal = 0

Dim convert As DateConversions = New DateConversions

Dim context() As Object

Dim cti As New Microsoft.HostIntegration.TI.ClientContext

cti.WriteContext("PASSWORD", tbpassword.Text, context)

cti.WriteContext("USERID", tbuser.Text, context)

Dim cat As String = "dog" + "Cat"

Try

convert.DateConvert(CDec(tbDatetoConvert.Text), tbConvertFrom.Text, _

tbConvertTo.Text, returndate, context)

lbResult.Text = CStr(returndate)

Catch ex As Microsoft.HostIntegration.TI.CustomTIException

Console.WriteLine(CStr(ex.Message + Environment.NewLine))

Console.WriteLine(CStr(ex.StackTrace + Environment.NewLine))

End Try

End If

End Sub





In the try catch I am receiving the following error:





(2183) The TCP Transport received a start server request failure from RE
AS400Conn, AS400 DPC returned: primary return code is 2, secondary
return code is 1.





Server stack trace:



Exception rethrown at [0]:

at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)

at DateCalls.DateConversions.DateConvert(Decimal NUMERICDATE, String
FROMDATETYPE, String TODATETYPE, Decimal& RETURNDATE, Object[]& rgCtxt)

at DateCalls.DateConversions.DateConvert(Decimal NUMERICDATE, String
FROMDATETYPE, String TODATETYPE, Decimal& RETURNDATE, Object[]& rgCtxt)

at TestTIIntegrator.Form1.btnConvert_Click(Object sender, EventArgs e)
in C:\Visual Studio Projects\TestTIIntegrator\frmDateConvert.vb:line 135



Thanks in advance for anyone's help.





Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Host Integration Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB