Press "Enter" to skip to content

GO_BLOCK built-in Oracle D2k

GO_BLOCK built-in Oracle D2k

Description
GO_BLOCK navigates to an indicated block. If the target block is non-enterable, an error occurs.
Syntax
PROCEDURE GO_BLOCK
(block_name VARCHAR2);
Built-in Type restricted procedure
Enter Query Mode no
Parameters
block_name Specifies the name you gave the block when defining it. The data type of
the name is VARCHAR2.
GO_BLOCK examples
/*
** Built-in: GO_BLOCK
** Example: Navigate to a block by name. Make sure to check
** that the Go_Block succeeds by checking
FORM_SUCCESS.
*/
BEGIN
IF :Global.Flag_Indicator = ’NIGHT’ THEN
Go_Block(’Night_Schedule’);
/*
** One method of checking for block navigation success.
*/
IF NOT FORM_SUCCESS THEN
RAISE Form_trigger_Failure;
END IF;
ELSIF :Global.Flag_Indicator = ’DAY’ THEN
Go_Block(’Day_Schedule’);
/*
** Another way of checking that block navigation
** succeeds. If the block the cursor is in hasn’t
** changed after a block navigation, something went
** wrong. This method is more reliable than simply
** checking FORM_SUCCESS.
*/
IF :System.trigger_Block = :System.Cursor_Block THEN
RAISE Form_trigger_Failure;
END IF;
END IF;
Execute_Query;
Go_Block(’Main’);
END;