z/OS MVS Programming: Assembler Services Reference ABE-HSP
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Description

z/OS MVS Programming: Assembler Services Reference ABE-HSP
SA23-1369-00

HSPSERV transfers data between virtual storage areas in address spaces and hiperspaces. It reads data from a hiperspace to an address space and it writes data to a hiperspace from an address space.

A hiperspace can be either a standard hiperspace, of which there are two types, shared and nonshared, or an ESO (expanded storage only) hiperspace. The nonshared standard hiperspace and the shared standard hiperspace are backed with real storage, and if necessary, with auxiliary storage. Through the buffer area in the address space, your program can view or scroll through the hiperspace. HSPSERV SWRITE and HSPSERV SREAD transfer data to and from a standard hiperspace. For more information about hiperspaces, see z/OS MVS Programming: Assembler Services Guide.

The STOKEN parameter identifies the specific hiperspace to be read from or written to. The HSPALET parameter specifies an optional ALET for the hiperspace. The RANGLIST parameter identifies the storage range in the address space and the storage range in the hiperspace. A storage range consists of contiguous 4K byte blocks starting on a 4K byte boundary.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Problem state and any PSW key
Dispatchable unit mode: Task or SRB
Cross memory mode: Any PASN, any HASN, any SASN
Note: PASN=HASN=SASN is required for a nonshared standard hiperspace for which an ALET is not used (the HSPALET parameter is omitted).
AMODE: 31-bit
ASC mode: Primary or access register (AR)
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held
Control parameters: Must be in the caller's primary address space. If the caller's PSW key is not zero, the PSW key must match the storage key associated with the control parameters.

Programming requirements

  • If you code the HSPALET parameter on the HSPSERV macro, you must first issue the SYSSTATE macro to indicate the ASC mode of your program.
  • If you code the HSPALET parameter on the HSPSERV macro, you must provide a 144-byte save area in the caller's primary address space.
  • The range list must be addressable in the caller's primary address space.

Restrictions

None.

Input register information

Before issuing the HSPSERV macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.

However, if the caller specifies the HSPALET parameter:
  • General purpose register (GPR) 13 must contain the address of a 144-byte save area. The save area must be in the caller's primary address space.
  • Access register (AR) 13 must contain 0, regardless of whether the caller is in primary or AR address space control (ASC) mode.

Output register information

When control returns to the caller, the general purpose registers (GPRs) contain:
Register
Contents
0
Reason code
1
Used as a work register by the system
2-13
Unchanged
14
Used as a work register by the system
15
Return code
When control returns to the caller, the access registers (ARs) contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14-15
Used as work registers by the system

Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.

Performance implications

None.

The following figure describes the characteristics and restrictions for the use of standard hiperspaces, the hiperspaces that allow your program to scroll through large areas of data.
Figure 1. Characteristics and Restrictions for Standard Hiperspacesieaa71a1

Syntax

The standard form of the HSPSERV macro for standard hiperspaces is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede HSPSERV.
   
HSPSERV  
   
One or more blanks must follow HSPSERV.
   

SREAD
SWRITE

 
   
,STOKEN=stoken-addr stoken-addr: RX-type address or register (2) - (12).
   
   ,HSPALET=alet-addr alet-addr: RX-type address or register (2) - (12).
   
   ,NUMRANGE=n n: Number from 1 to 50.
   ,NUMRANGE=num-addr num-addr: RX-type address or register (2) - (12).
  Default: NUMRANGE=1.
   
,RANGLIST=list-addr list-addr: RX-type address or register (2) - 12).
   
   ,RELEASE=NO Default: RELEASE=NO.
   ,RELEASE=YES  
   
   ,RETCODE=ret-addr ret-addr: RX-type address or register (2) - (12).
   
   ,RSNCODE=rsn-addr rsn-addr: RX-type address or register (2) - (12).
   
   ,MF=S  
   

Parameters

The parameters are explained as follows:

SREAD
Requests that the system read data from a standard hiperspace to an address space.

STOKEN and RANGLIST are required parameters on the SREAD request. NUMRANGE, RELEASE, HSPALET, RSNCODE, and RETCODE are optional parameters.

SWRITE
Requests that the system write data to a standard hiperspace from an address space.
Notes:
  • When HSPSERV returns to the caller after the SWRITE operation, the contents of the address space storage range are not preserved. You can use the address space area again.
  • If the hiperspace maps a data-in-virtual object, do not issue an SWRITE request while a DIV SAVE request is current.

STOKEN and RANGLIST are required parameters on the SWRITE request. NUMRANGE, HSPALET, RETCODE, and RSNCODE are optional parameters.

,STOKEN=stoken-addr
Specifies the address of the eight-character variable that contains the STOKEN for the standard hiperspace from which the data is to be read or into which the data is to be written. Restrictions on standard hiperspaces are described in Figure 1.
,HSPALET=alet-addr
Specifies either the address of a fullword or a register that contains the ALET for the hiperspace that is to be accessed. The ALET must be for a hiperspace that is on the caller's DU-AL or PASN-AL.

The HSPALET parameter is optional except for the following case: If the calling program accesses a shared hiperspace, is in problem state, and uses PSW key 8 - F, HSPALET is required.

If you code HSPALET, do not code RELEASE=YES.

If you code HSPALET, your recovery routine cannot attempt retry at the time of error.

,NUMRANGE=n
,NUMRANGE=num-addr
Specifies the number of entries, from 1 to 50, or specifies a fullword that identifies the number of entries in the range list (that the RANGLIST parameter points to), or specifies a register containing the address of a fullword containing the number of entries. The default is NUMRANGE=1.

If you omit NUMRANGE, HSPSERV reads or writes one entry in the range list.

,RANGLIST=list-addr
Specifies a fullword that contains an address of a list of ranges that the system is to read or write, or specifies a register that contains the address of the fullword pointer to the range list. The range list consists of a number of entries (specified by NUMRANGE) where each entry specifies (1) a storage location in an address space, (2) a storage location in a hiperspace, and (3) the number of blocks of data the system is to read or write.
Each entry in the range list consists of three words as follows:
First Word
The starting virtual address in the address space into which the data is to be read or from which the data is to be written
Second Word
The starting virtual address in the hiperspace from which the system is to read or into which the system is to write
Third Word
The number of blocks the system is to read or write

Note that the address is the block number followed by 12 binary zeros.

An example of how to code the RANGLIST parameter when NUMRANGE=3 is as follows:
ieaa7num

Restrictions on the areas in the address space and the hiperspace are described in Figure 1.

On return, only if the caller issued the HSPSERV macro with the HSPALET parameter, the range list values might be different from the input values if the system could not at first successfully complete the read or write operation. In that case, the system changes the range list values, but does not restore the input values when it finally returns control to the caller.

,RELEASE=NO
,RELEASE=YES
Specifies whether or not the system is to release the hiperspace pages after it completes the SREAD operation. RELEASE is valid only with SREAD.

RELEASE=NO specifies that the system does not release the hiperspace pages after it completes the SREAD operation. (Unless a subsequent SWRITE request changes the data, the same data will be available again on the next SREAD request.) RELEASE=NO is the default.

RELEASE=YES specifies that, after the SREAD request, the system is to release the storage that backed the data in the hiperspace.

If you code RELEASE=YES, do not code HSPALET.

,RSNCODE=rsn-addr
Specifies the location where the system is to store the reason code. The reason code is also in GPR 0.
,RETCODE=ret-addr
Specifies the location where the system is to store the return code. The return code is also in GPR 15.
,MF=S
Specifies the standard form of the macro. This form generates code to place the parameters into an inline parameter list and invoke the service.

ABEND codes

HSPSERV might abnormally terminate with abend code X'01D'. See z/OS MVS System Codes for an explanation of abend code X'01D'.

Return and reason codes

When control returns from HSPSERV SREAD or HSPSERV SWRITE, GPR 15 (and ret-addr, if you coded RETCODE) contains one of the following hexadecimal return codes. GPR 0 (and rsn-addr, if you coded RSNCODE) contains one of the following hexadecimal reason codes.

Return Code Reason Code Meaning and Action
00 00 Meaning: HSPSERV completed successfully.

Action: None.

08 xxyy05xx Meaning: System error. The system rejects the request. A hiperspace page is unavailable.

Action: Record the return and reason code and supply it to the appropriate IBM® support personnel.

08 xxyy06xx Meaning: System error. The system rejects the request. An address space page is unavailable.

Action: Record the return and reason code and supply it to the appropriate IBM support personnel.

0C xx006xx Meaning: System error. System failure due to environmental problems.

Action: Record the return and reason code and supply it to the appropriate IBM support personnel.

Note: yy is X'09' for SREAD and X'0A' for SWRITE.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014