The following JCL executes the program called DIVSAMPL. The function
of DIVSAMPL is to change and display bytes (characters) in the data-in-virtual
object, DIV.SAMPLE, that was allocated in
Creating a linear data set.
//DIV JOB .....
//DIV EXEC PGM=DIVSAMPL
//STEPLIB DD DISP=SHR,DSN=DIV.LOAD
//DIVDD DD DISP=OLD,DSN=DIV.SAMPLE
//SYSABEND DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
S 00001000 A Changes byte X'1000' to "A"
D 00000F00 Displays "?" since byte X'F00' contains X'00'
S 00000F00 B Changes byte X'F00' to "B"
S 00010000 C Saves previous changes, gets new map,
changes byte X'10000'
D 00001000 Displays "A" which was set by first statement
D 00000F00 Displays "B" which was set by third statement
E Saves changes since last save (stmt 4), and terminates pgm
/*
DIVSAMPL reads statements from SYSIN that tell the program what
to do. The format of each statement is
f aaaaaaaa v,
where:
- f
- Function to perform:
- S
- Set a character in the object.
- D
- Display a character in the object.
- E
- End the program.
- aaaaaaaa
- The hexadecimal address of the storage to set or display. Leading
0s are required. The value must be less than X'003E8000'.
- v
- For Set, the character to put into the object.
Note: The program actually saves the change requested by
the S function when either the user asks to change a byte past the
current size of the object, or the user asks to terminate the program
(E function).