Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ goto(1) — ACMSxp 3.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

block(1)

exception_handler(1)

statement(1)

statement_block(1)

task_definition(1)

transaction_block(1)

acmsxp_introduction(1)

goto(1)  —  Commands

Digital

NAME

GOTO − statement in a task that transfers control to another statement
 

SYNOPSIS

 [<label-name>:] { GOTO | GO TO } <label-name>
                 [ WITH { COMMIT | ROLLBACK } TRANSACTION ] ;

PARAMETER

       •label-name
 
An internal unqualified identifier associated with a statement, to which the system transfers control.
 

DESCRIPTION

 
The target of a GO TO can be:

oA statement label in the active statement list (the list containing the GO TO)

oA block label or conditional statement label outside the active statement list

oAny statement label in the task definition’s top-level statement list (that is, any statement not located inside a block, conditional statement, or exception handler). 

With a GO TO statement, you can exit a block from anywhere inside the block’s statement list (that is, the target of the GO TO is outside the block). You can enter a block only at its beginning (that is, the target of the GO TO must be the block label). 
 
This same principle applies to a statement list that is inside a conditional statement. You can GO TO a target outside the active statement list, but the target of the GO TO cannot be a statement inside another statement list.
 
When a statement list is nested inside another statement list (for example, an IF THEN statement list within a block statement list), you can GO TO the label of the outer statement list from the inner statement list but not to the inner list from the outer list.
 
With GO TO, you can exit an exception handler but cannot enter it.
 
If the GO TO exits a transaction block, you can specify WITH TRANSACTION and can indicate either ROLLBACK or COMMIT for the transaction. ROLLBACK explicitly rolls back the current transaction; any transactional resources modified by tasks participating in the transaction are rolled back.
 
COMMIT explicitly commits the current transaction; any transactional resources modified by tasks participating in the transaction are committed as part of the same transaction. (COMMIT is the default.)
 
The GO TO statement:

oPerforms either ROLLBACK TRANSACTION or COMMIT TRANSACTION, if specified. If either ROLLBACK TRANSACTION or COMMIT TRANSACTION can be specified but is not, the GO TO statement performs the default transaction control (COMMIT). 

oCompletes with explicit GO TO flow control.  If an exception occurs, the GO TO completes with that exception class described in the Exceptions section. 

EXCEPTIONS

 
The GO TO statement can generate the TXN-FAILURE-ERROR exception class.
 
The TXN-FAILURE-ERROR exception class indicates one of the following error conditions:

oOne of the resource managers participating in the transaction was unable to commit the transaction. 

oOne of the resource managers participating in the transaction failed to acknowledge a message when attempting to commit the transaction. 

RELATED INFORMATION

Syntax: block(1), exception_handler(1), statement(1), statement_block(1), task_definition(1), transaction_block(1)

acmsxp_introduction(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026