PCOMM Macro error on SearchText



Discuss about all tools related to Mainframes but usable in a PC/Computer like Mainframe Simulators, Emulators, Abend Assist etc...

PCOMM Macro error on SearchText

Postby tsdjim » Tue Nov 25, 2014 3:12 pm

I have written a PCOMM macro to search text on a screen, however I am getting the following error on the searchtext line and I cannot figure out why. :

Error on line 19. Expected ')'

Line 19 contains If ( autECLSession.autECLPSObj.SearchText "ECOC", 1, row, col ) Then


Following is the complete macro:

Dim autECLPSObj as Object
Dim autECLConnList as Object
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

subSub1_

sub subSub1_()

Dim x
row=1
col=1
For x = 1 To 5
autECLSession.autECLPS.SendKeys "[sysreq]"
If ( autECLSession.autECLPSObj.SearchText "ECOC", 1, row, col ) Then
Exit For
End If

Next
End Sub
tsdjim
 
Posts: 18
Joined: Mon Nov 03, 2008 1:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: PCOMM Macro error on SearchText

Postby NicC » Tue Nov 25, 2014 4:36 pm

Don't have PCOMM and don't have 'access' to the manual...but...all your other methods seem to have arguments within parentheses e.g. object.method(parms) but you don't have for this particular statement. If you should then you are actually missing ( and ).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: PCOMM Macro error on SearchText

Postby tsdjim » Tue Nov 25, 2014 6:00 pm

I have tried the following combinations which all give one error or the other on the same line. The last syntax is as per the IBM manual:


If ( autECLSession.autECLPSObj.SearchText("ECOC", 1, row, col )) Then

If ( autECLSession.autECLPSObj.SearchText("ECOC")) Then

the following syntax was from the IBM manual even this gives an error:
http://www-01.ibm.com/support/knowledge ... cess08.htm

If ( autECLSession.autECLPSObj.SearchText "ECOC",1 ,1, 1) Then
tsdjim
 
Posts: 18
Joined: Mon Nov 03, 2008 1:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: PCOMM Macro error on SearchText

Postby NicC » Tue Nov 25, 2014 9:58 pm

That is not what is in the manual. The manual has
If ( autECLPSObj.SearchText "IBM", 1, row, col) Then

What you have may well be the same thing in effect but I do not know.
Note also that there are typos within the document but the one documented is not related to you (as far as I know).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: PCOMM Macro error on SearchText

Postby tsdjim » Wed Dec 03, 2014 9:27 pm

I finally got it to work with the following syntax, I guess the row column would also work.
The IBM manual has an example without the brackets after searchText, I guess this was an error in the manual.

Working syntax:
if (autECLPSObj.SearchText ("ECOC")) Then


Thanks NicC for pointing me to the correct syntax.
tsdjim
 
Posts: 18
Joined: Mon Nov 03, 2008 1:38 am
Has thanked: 0 time
Been thanked: 0 time


Return to Simulators & Emulators

 


  • Related topics
    Replies
    Views
    Last post