Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Sub ExchangeWithAS400()
Dim objConn As New ADODB.Connection
Dim objCmd As New ADODB.Command
objConn.Open "Provider=IBMDA400;Data Source=[i]My_AS400_IP[/i];", "[i]user[/i]", "[i]password[/i]"
Set objCmd.ActiveConnection = objConn
objCmd.CommandText = [i]"MYLIB.MYSTOREPROC"[/i]
objCmd.CommandType = [b]adCmdStoredProc[/b]
Set parm1 = objCmd.CreateParameter("Threshold")
parm1.Type = adVarChar
parm1.Direction = adParamInput
parm1.Size = 7
parm1.Value = "0045000"
objCmd.Parameters.Append parm1
Set parm2 = objCmd.CreateParameter("Hsjncf")
parm2.Type = adVarChar
parm2.Direction = adParamInput
parm2.Size = 3
parm2.Value = "057"
objCmd.Parameters.Append parm2
Set parm3 = objCmd.CreateParameter("Hsabda")
parm3.Type = adVarChar
parm3.Direction = adParamInput
parm3.Size = 10
parm3.Value = "2003-11-24"
objCmd.Parameters.Append parm3
Set parm4 = objCmd.CreateParameter("Bigtimeqty")
parm4.Type = adVarChar
parm4.Direction = adParamReturnValue
parm4.Size = 5
parm4.Value = "00000"
objCmd.Parameters.Append parm4
Set parm5 = objCmd.CreateParameter("Rtncode")
parm5.Type = adVarChar
parm5.Direction = adParamReturnValue
parm5.Size = 1
parm5.Value = "0"
objCmd.Parameters.Append parm5
On Error Resume Next
objCmd.Execute
Debug.Print "BigtimeQty = "; parm4
End Sub
Create Procedure [i]MYLIB.MYSTOREPROC[/i]
( In InTimeThresHold Numeric ( 7, 0 ),
In InHsJnCf Char ( 3 ),
In InHsAbDa Date ,
Out OutBigTimeQty Numeric ( 5, 0 ),
Out RtnCode Numeric ( 1, 0 ) )
Language SQL
Begin
-- Local variables
Declare WCount Decimal (5, 0) Default 0;
-- No Commitment Control
Set Transaction Isolation Level NC;
-- Count number of records
Select Count(*)
Into WCount
From [i]Mylib/Myfile[/i]
Where HsJnCf = InHsJnCf
And HsAbDa = InHsAbDa
And HsWrNg >= InTimeThresHold;
Set OutBigTimeQty = WCount;
Set RtnCode = 0;
End