Using MARK and UNMARK

The MARK command enables you to mark some or all of the resource table records in a result set for future reference.

The UNMARK command removes existing marks from selected records. Once you have marked records in a result set, you can refer to the records that are either marked or not marked in subsequent commands. The following API commands support the MARKED and NOTMARKED options:
  • COPY
  • DELETE
  • FETCH
  • GROUP
  • LOCATE
  • PERFORM SET
  • REFRESH
  • SET
For example, Figure 1 shows a result set in which selected resource table records have been marked. The MARKED option is then used with the FETCH command to retrieve only those records that are marked.
Figure 1. Marking and retrieving records in a result set
This figure illustrates a result set with three records marked using the command MARK PARM('3,4,6.')RESULT(TOKENA).... The marked records are retrieved using the command FETCH BOTH MARKED RESULT(TOKENA) INTO(AREA2)...


eyup1a6.html | Timestamp icon Last updated: Sunday, 4 June 2017