Trouble with IBM 5250 VB macro
Posted: Wed Oct 09, 2013 4:24 pm
Hello, I'm facing a problem with Dim statement into a macro for IBM 5250 (Client Access). Here is my simple code:
When I run this macro on emulator I always get an error at line "Dim value as String": End of statement expected. If I define value variable as "Dim value" without "As String" script runs fine, but I need to define the type of each variable. Any ideas? Thanks.
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
Dim value As String
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
value = autECLSession.autECLPS.GetText(1, 5, 60)
MsgBox(value)
end sub
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
Dim value As String
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
value = autECLSession.autECLPS.GetText(1, 5, 60)
MsgBox(value)
end sub
When I run this macro on emulator I always get an error at line "Dim value as String": End of statement expected. If I define value variable as "Dim value" without "As String" script runs fine, but I need to define the type of each variable. Any ideas? Thanks.