Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

1.5.1.9 Reference Modification



Reference modification defines a data item by specifying a leftmost character and optional length for the data item.


    ___ Format _____________________________________________________________ 
   |                                                                        |
   | >>__ _data-name-1_________________________________________ __________> |
   |     |_FUNCTION__function-name-1__ ______________________ _|            |
   |                                  |    <____________     |              |
   |                                  |_(____argument-1_|__)_|              |
   |                                                                        |
   | >__(__leftmost-character-position:__ ________ __)___________________>< |
   |                                     |_length_|                         |
   |                                                                        |
   |________________________________________________________________________|
data-name-1

X Must reference a data item whose usage is DISPLAY or DISPLAY-1.


X Data-name-1 can be qualified or subscripted. Data-name-1 cannot be a
X windowed date field.

leftmost-character-position
Must be an arithmetic expression. The evaluation of leftmost-character-position must result in a positive nonzero integer that is less than or equal to the number of characters in the data item referenced by data-name-1.


X The evaluation of leftmost-character-position must not result in a
X windowed date field.

length
Must be an arithmetic expression.

The sum of leftmost-character-position and length minus the value one must be less than or equal to the number of characters in data-name-1. If length is omitted, than the length used will be equal to the number of characters in data-name-1 plus one minus
X leftmost-character-position. When data-name-1 is a DISPLAY-1 data
X item, reference modification refers to the starting position and
X length of the data item being referenced in characters, not bytes. The evaluation of length must result in a positive nonzero integer.


X The evaluation of length must not result in a windowed date field.

Unless otherwise specified, reference modification is allowed anywhere an identifier referencing an alphanumeric data item is permitted.

Each character of data-name-1 is assigned an ordinal number incrementing by one from the leftmost position to the rightmost position. The leftmost position is assigned the ordinal number one. If the data description entry for data-name-1 contains a SIGN IS SEPARATE clause, the sign position is assigned an ordinal number within that data item.

If data-name-1 is described as numeric, numeric-edited, alphabetic, or alphanumeric-edited, it is operated upon for purposes of reference modification as if it were redefined as an alphanumeric data item of the same size as the data item referenced by data-name-1.


X If data-name-1 is an expanded date field, then the result of reference
X modification is a non-date.

Reference modification creates a unique data item which is a subset of data-name-1 or by function-name-1 and its arguments, if any. This unique data item is considered an elementary data item without the JUSTIFIED clause.

When a function is reference-modified, the unique data item has the class and category of alphanumeric. When data-name-1 is reference-modified, the unique data item has the same class and category as that defined for the data item referenced by data-name-1; however, if the category of data-name-1 is numeric, numeric-edited, or alphanumeric-edited, the unique data item has the class and category alphanumeric.


X If the category of data-name-1 is external floating-point, the unique data
X item has the class and category alphanumeric.

If length is not specified, the unique data item created extends from and includes the character identified by leftmost-character-position up to and including the rightmost character of the data item referenced by data-name-1.

Subtopics:



Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.