Difference between revisions of "GOTO"

From Lianjapedia
Jump to: navigation, search
(Products)
 
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Position to a specific record in a table
 
Position to a specific record in a table
 
  
 
==Syntax==
 
==Syntax==
 
GO[TO] [RECORD] <expN> | BOTTOM | TOP [IN <alias>]
 
GO[TO] [RECORD] <expN> | BOTTOM | TOP [IN <alias>]
 
  
 
==See Also==
 
==See Also==
[[BOF()]], [[EOF()]], [[FIND]], [[FOUND()]], [[GOTO()]], [[KEYMATCH()]], [[LOOKUP()]], [[LASTREC()]], [[LOCATE]], [[RECCOUNT()]], [[RECNO()]], [[RLOOKUP()]], [[SEEK]], [[SEEK()]], [[SET CLIPPER]], [[SET DELETED]], [[SET PCFILTER]], [[SET RELATION]], [[SKIP]]
+
[[BOF()]], [[EOF()]], [[FOUND()]], [[GOTO()]], [[KEYMATCH()]], [[LOOKUP()]], [[LASTREC()]], [[LOCATE]], [[RECCOUNT()]], [[RECNO()]], [[RLOOKUP()]], [[SEEK]], [[SEEK()]], [[SET DELETED]], [[SET RELATION]], [[SKIP]]
 
+
  
 
==Description==
 
==Description==
Line 23: Line 20:
 
The IN <alias> clause is used to move the record pointer of an open table in another workarea.
 
The IN <alias> clause is used to move the record pointer of an open table in another workarea.
  
If the command SET PCFILTER is ON, then the use of GOTO <expN> bypasses any FILTER <condition> that may be in effect with the SET FILTER TO command.  The record pointer may be positioned to records that are marked for deletion, even if SET DELETED is ON.  If SET CLIPPER is set ON, and GOTO RECORD <expN> is greater than the number of records in the table, the Recital/4GL does not report an error.  Rather than reporting an error, the Recital/4GL sets EOF() to .T., and FOUND() to .F..  If SET RELATION TO is in effect for the active table, then defined relationships are maintained after the record pointer is positioned.
+
If the command SET PCFILTER is ON, then the use of GOTO <expN> bypasses any FILTER <condition> that may be in effect with the SET FILTER TO command.  The record pointer may be positioned to records that are marked for deletion, even if SET DELETED is ON.  If SET RELATION TO is in effect for the active table, then defined relationships are maintained after the record pointer is positioned.
 
+
  
 
==Example==
 
==Example==
Line 33: Line 29:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Table Basics]]
+
[[Category:NoSQL Commands]]
[[Category:Table Basics Commands]]
+
[[Category:Data Commands]]
+

Latest revision as of 12:35, 4 February 2013

Purpose

Position to a specific record in a table

Syntax

GO[TO] [RECORD] <expN> | BOTTOM | TOP [IN <alias>]

See Also

BOF(), EOF(), FOUND(), GOTO(), KEYMATCH(), LOOKUP(), LASTREC(), LOCATE, RECCOUNT(), RECNO(), RLOOKUP(), SEEK, SEEK(), SET DELETED, SET RELATION, SKIP

Description

The GOTO command is used to position the record pointer to the specified record in a table. The pointer is moved to the record whose number matches that specified in <expN>. By default, the GOTO command operates in the currently selected workarea. If the number specified in <expN> is not a valid record number, a 'Record is out of range' error message will be given.

BOTTOM

If the BOTTOM keyword is specified, then the record pointer is positioned to the last record in the table.

TOP

If the TOP keyword is specified, then the record pointer is positioned to the first record in the table.

IN <alias>

The IN <alias> clause is used to move the record pointer of an open table in another workarea.

If the command SET PCFILTER is ON, then the use of GOTO <expN> bypasses any FILTER <condition> that may be in effect with the SET FILTER TO command. The record pointer may be positioned to records that are marked for deletion, even if SET DELETED is ON. If SET RELATION TO is in effect for the active table, then defined relationships are maintained after the record pointer is positioned.

Example

goto top
browse
goto 10