This statement modifies the contents of the page currently in the internal work area (see READ).
The original page in the file (on the volume) is not affected here (see WRITE).
Format
MODIFY / M |
[byte1 / Kn1] [,X'hex-string' / ,nnX'hex-string' / ,'character-string' / ,nn'character-string' / ,C'character-string' / [,byte2 / ,Kn2] |
Operands
First operand
byte1
Specifies the location in the PAM page (1..2048) where the text specified in the second operand is to replace the original text. All bytes before byte 1 remain unchanged.
Kn1
Specifies the position in the PAM key (1-16) where the text specified in the second operand is to replace the original text. All bytes before Kn1 remain unchanged.
The default value is 1. The text specified in the second operand changes the original contents of the page, starting with the first byte.
Second operand
X'hex-string' / nnX'hex-string' / 'character-string' / nn'character-string' / C'character-string' / nnC'character-string'
Specifies the text that is to replace the original text. If byte 2 is not specified, the new text replaces the old text for the length of the new text, starting with byte 1.
“nn” is an integer which specifies a repetition factor for the specified string.
No distinction is made between uppercase and lowercase if C'...' is specified.
Default value: no text is changed.
The text must not extend beyond the PAM page or PAM key.
Third operand
byte2
Specifies the location in the original PAM page where the text which is to be added to the new text begins, regardless of whether the new text is shorter, longer or equally long.
Kn2
Specifies the location in the original PAM key where the text which is to be added to the new text begins.
The locations which the first and thid operands specify must both be located on the PAM page or in the PAM key.
Modifications in the first 8 bytes of the PAM key will not be transcribed back to the file. Furthermore, in the case of files without a PAM key, the first 12 bytes of a page (control block field) will not be transferred to the file.
Example
The original page is assumed to contain: 'ABCCATDOGXX...'
and the original key is assumed to contain: '1234DEFGO...'
MODIFY 5, 'OW', 7
Changes the entire page to: 'ABCCOWDOGXX....'
MODIFY 5, 'OW'
Changes the page, like the instruction in example a), to: 'ABCCOWDOGXX...'
MODIFY , 3X'C8C1', 10
Changes the page to: 'HAHAHAXX...'
The page will be padded at the end with 3 bytes of hexadecimal zeros (X'000000').
M K1, 16x'00'
Sets the key to hexadecimal zero.
After the instruction WRITE only bytes 9..16 of the key are written back to the disk. Bytes 1..8 are not changed.