S command code

To set a subset pointer unconditionally, regardless of whether it is already set, your program issues a call with the S command code.

When your program issues a call that includes the S command code, IMS sets the pointer to your current position.

For example, to retrieve the first B segment occurrence in the subset defined by subset pointer 1 and to reset pointer 1 at the next B segment occurrence, you would issue the following commands:
GU     Abbbbbbb(AKEYbbb=bB1)
       Bbbbbbbb*R1
GN     Bbbbbbbb*S1
After you issue this call, instead of pointing to segment B5, subset pointer 1 points to segment B6, as shown in the following figure.
Figure 1. Unconditionally setting the subset pointer to your current position
begin figure description - This figure is described in the surrounding text. end figure description.