MvSKIP#
Moves the record pointer of the database with NAME alias a specific number of records (ROWS) forward or backward relative to its current position. If NAME is omitted, the record pointer for the primary database is moved.
Syntax
<MvSKIP NAME = "string: { expression } | literal"
ROWS = "numberic: { expression } | literal"
VIEW = "string: { expression } | literal">
If the database is not indexed, the pointer moves according to physical record number. If the database is indexed, the pointer moves according to the index order.
Attributes#
Attribute | Description |
---|---|
NAME |
Optional Database alias. When a database is opened with <MvOPEN> , it is referenced in all other database commands by the alias. If omitted, the records pointer for the primary database is moved. The database must be open. |
ROWS |
Optional numeric value. Indicates how many records forward (positive value) or backward (negative value) to move the record pointer. If omitted the pointer moves one record forward. |
VIEW |
Optional odbc_view. Support for ODBC has been dropped so this attribute can be omitted. |
Examples#
<MvSKIP>
is typically used within loops to sequentially access file records.
In this example the employees database is exported in indexed order.
<MvOPEN NAME="employees" DATABASE="{ g.path $ 'workers.dbf' }" INDEXES="emp_name.mvx">
<MvWHILE EXPR = "{ NOT employees.d.eof }">
<MvEXPORT FILE = "{ l.flat_employees_file }" DELIMITER = "{ l.tab }" FIELDS = "{ l.fieldlist }">
<MvSKIP NAME = "employees" ROWS = "1">
</MvWHILE>
<MvCLOSE NAME = "employees">