z/OS MVS Programming: Sysplex Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Note tags

z/OS MVS Programming: Sysplex Services Guide
SA23-1400-00

Every note in the note pad has a 16 byte tag value. The creator of the note pad determines who is responsible for setting the tag values, either XCF or the application. If XCF is responsible for setting the tag values, the tags will be ever increasing values set whenever a note is created or updated. If the application is responsible for setting the tag values, the tags are set whenever a note is created, updated, or deleted.

The creator of the note pad can optionally request that XCF track the maximum tag value (maxtag). The maximum tag value can be retrieved by issuing a query note pad request. Maximum tag values can be tracked in one of two ways, either current or lifetime. If tracking current tag values, maxtag is the maximum tag value of all the notes that exist in the note pad at the time of the query. If tracking lifetime tag values, maxtag is the maximum tag value of all notes that ever existed in the note pad. Thus the lifetime maxtag takes into account the tag values of all the notes that currently exist in the note pad at the time of the query, as well as the tag values of all the note instances that were deleted prior to the query.

If the creator of the note pad directs XCF to track the maximum tag value, the tag values set by the application must be nondecreasing for a given note so long as the note exists in the note pad. That is, the tag value set by the application when updating or deleting an existing note must be greater than or equal to the current tag value of the note. If XCF is not required to track the maximum tag value for the note pad, the application can set an arbitrary tag value when updating or deleting an existing note. Regardless of whether XCF is to track the maximum tag value, the application can set an arbitrary tag value when creating a new note.

If the application is responsible for setting tag values, a new tag value can be assigned to a note when the note is deleted. In such cases, XCF will first logically assign the new tag value to the note, and then delete the note. Since the note is deleted, the newly assigned tag value disappears with it. Thus, assigning a new tag value when deleting a note is only meaningful when XCF is tracking maximum tag values. In that case, the new tag value must be greater than or equal to the current tag value of the note. The fact that the delete request is rejected if the proposed tag value is less than the current tag value might be useful to you. For example, it might keep your program from accidentally deleting a newer instance of the note. Furthermore, for a note pad with lifetime tag tracking, the newly assigned tag value could be a new maximum tag value for the note pad. If so, that new tag value would be retained as the new maxtag value until such time as a higher tag value was set for some note.

If the application is responsible for setting tag values, the tag provides a way to associate 16 bytes of metadata with the note. For example, the tag could contain control information to describe the type of data contained in the note. One way to use this metadata would be for your program to issue a read notes request to get the metadata for each note in the note pad. The control information in the tags might then be used to determine which notes are of interest for further processing. For some applications, the tag value could contain all the data required for a (null) note.

If XCF is not tracking the maximum tag value, the tag values have no restrictions and arbitrary values can be set by the application. But if XCF is tracking the maximum tag value, the tag value to be set for an existing note must be greater than or equal to the current tag value of the note. So if you want to use the tag for descriptive control information and want to change that control information when updating an existing note, you need to devise a scheme to ensure that the new tag value adheres to the requirement that it be nondecreasing. For example, you could put a sequence number in the high order bytes of the tag value and increment this number each time the tag is updated. The control data in the low order bytes of the tag value could then be set to arbitrary values without fear that the updated control information in the tag violates the tag sequencing requirements.

If XCF is responsible for setting the tags, the tag value is a 16 byte sequence number that is global to the note pad. The sequence number is incremented every time a note is created or updated in the note pad. Thus the XCF tag values for any given note will be ever increasing, but not necessarily sequential. The XCF tag value might be used, for example, to help manage a check point for a sequence of updates. The XCF tag value could also be used to generate a sysplex wide sequence number. For example, your application could create a note pad consisting of a single note with no content. Any connection to the note pad could issue a request to replace the note. The tag values returned by these replace requests would form an ever increasing sequence.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014