AS/400 macro: GOTO not working

70 pts.
Tags:
AS/400
AS/400 macros
IBM iSeries
Hi, I'm trying to write a simple macro. Some stuff works, other things don't. For instance, a simple GOTO function, or exit. I copied from the help file because I thought I was doing something stupid wrong but nothing works. I have the following version: iSeries for windows version 5.8 Thank you

Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Do you have a question? You probably need to post the macro code if we should look for things that should be changed. -- Tom
    125,585 pointsBadges:
    report
  • BennyDS

    Well Mu question is if anyone has an Idea why it isnt working. But I think I didnt make myself clear enough. I'm pretty sure there is nothing wrong with the macro itself. More like these features are not active or cannot be used in my version or something like that.

    But anyway, here is the macro:

    [PCOMM SCRIPT HEADER]
    LANGUAGE=VBSCRIPT
    DESCRIPTION=
    [PCOMM SCRIPT SOURCE]
    OPTION EXPLICIT
    autECLSession.SetConnectionByName(ThisSessionName)
    
    goto label
    
    label:
    The error returned: "Error in script on line 8. Expected statement."
    I get the same error by simple replacing the goto function with the staement "exit"
    Thank you for looking.
    70 pointsBadges:
    report
  • TomLiotta

    You should be aware that VBScript doesn't have a GOTO function except as an On Error statement.

    Tom

    125,585 pointsBadges:
    report
  • BennyDS

    Well I was thinking the same thing. But why do I find alot of macros on the net wich do contain a goto function without an error statement?


    And what about the exit statement? When I use that in a macro I get the error: Invalid 'Exit' statement.

    70 pointsBadges:
    report
  • TomLiotta

    Please provide a link to a (working) iSeries Access VBScript macro with a basic GOTO. I'd like to see one. If not iSeries Access, others will do for now.

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following