Like the S command code, the W command code sets the subset
pointer conditionally. Unlike the S command code, the W command code
updates the subset pointer only if the subset pointer is not already
set to a segment.
For example, using the passbook example, suppose that Bob Emery
visits the bank and forgets to bring his passbook. You add the unposted
transactions to the database. You want to set the pointer to the first
unposted transaction, so that later, when you post the transactions,
you can immediately access the first one. The following call sets
the subset pointer to the transaction you are inserting if it is the
first unposted one.
ISRT Abbbbbbb(AKEYbbbb=bA1)Bbbbbbbb*W1
As shown by the following figure, this call sets subset pointer
1 to segment B5. If unposted transactions already exist, the subset
pointer is not changed. Figure 1. Conditionally
setting the subset pointer to your current position