z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the NOTE Macro to Provide Relative Position

z/OS DFSMS Using Data Sets
SC23-6855-00

You can use the NOTE macro to find the starting address (TTRz) of the most recent record read or written. NOTE returns a TTRz, which can be used by POINT to position to any record in a member. NOTE returns a value of X'7FFF' for the track balance or track capacity. There is no need to calculate the track capacity or balance.

If you issue the NOTE macro while pointing to within the PDSE directory, a TTRz is returned that represents the location of the first directory record.

The TTRz returned from a NOTE for the first directory record is the only valid TTRz that can be used for positioning by POINT while processing within the PDSE directory.

Here are some examples of results when using NOTE with PDSEs. A NOTE:
  • immediately following an OPEN returns a nonvalid address (X'00000000'). Also, if a member is being pointed to using a FIND macro or by the member name in the JCL, but no READ, WRITE, or POINT has been issued, NOTE returns a nonvalid address of (X'00000000').
  • immediately following a STOW ADD or STOW REPLACE returns the TTRz of the logical end-of-file mark for the member stowed. If the member is empty (no writes done), the value returned is the starting TTRz of the member stowed.
  • following any READ after an OPEN returns the starting TTRz of the PDSE directory if no member name is in the JCL, or the TTRz of the member if the member name is in the JCL.
  • following the first READ after a FIND or POINT (to the first record of a member) returns the TTRz of the member.
  • following the first WRITE of a member returns the TTRz of the member.
  • following a later READ or WRITE returns the TTRz of the first logical record in the block just read or written.
  • issued while positioned in the middle of a spanned record returns the TTRz of the beginning of that record.
  • issued immediately following a POINT operation (where the input to the POINT was in the form "TTR1") will return a note value of "TTR0".
  • issued immediately following a POINT operation (where the input to the POINT was in the form "TTR0") will return a nonvalid note value X'00000000').

Related reading: For information about the NOTE macro, see Using the NOTE Macro to Return the Relative Address of a Block and z/OS DFSMS Macro Instructions for Data Sets.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014