The program in this information creates a hiperspace for temporary storage of a table of 4K bytes that the program generates and uses. The program cannot save this table permanently.
* CREATE A HIPERSPACE
.
DSPSERV CREATE,TYPE=HIPERSPACE,HSTYPE=SCROLL, X
NAME=HS2NAME,STOKEN=HS2STOK,BLOCKS=ONEBLOCK
.
* IDENTIFY THE HIPERSPACE AS A DATA-IN-VIRTUAL OBJECT
.
DIV IDENTIFY,ID=OBJID,TYPE=HS,STOKEN=HS2STOK
DIV ACCESS,ID=OBJID,MODE=UPDATE
DIV MAP,ID=OBJID,AREA=OBJAREA
.
HS2NAME DC CL8'MHSNAME ' HIPERSPACE NAME
HS2STOK DS CL8 HIPERSPACE STOKEN
ONEBLOCK DC F'1' HIPERSPACE SIZE OF 1 BLOCK
OBJID DS CL8 DIV OBJECT ID
OBJAREA DS CL8 WINDOW IN ADDRESS SPACE
When the hiperspace is a data-in-virtual object, your program does not need to know the origin of the hiperspace. All addresses refer to offsets within the hiperspace. Note that the example does not include the ORIGIN parameter on DSPSERV.
* SAVE CHANGES TO THE OBJECT
.
DIV SAVE,ID=OBJID
DIV RESET,ID=OBJID
* DELETE THE HIPERSPACE
.
DSPSERV DELETE,STOKEN=HS2STOK