Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
BRIF—Browse interface z/OS ISPF Services Guide SC19-3626-00 |
|
The Browse Interface (BRIF) service provides browse functions for
data accessed through dialog-supplied I/O routines. The invoking dialog
must perform all environment-dependent functions such as file allocation,
opening, reading, closing, and freeing. The dialog is also responsible
for any Enqueue/Dequeue serialization that is required. With the dialog
providing the I/O routines, BRIF allows you to:
The invoking dialog provides addresses of routines that will:
All addresses must be 31-bit addresses, and the routines must have an addressing mode (AMODE) of 31. The dialog-supplied read, write, and command processing routines are called directly by ISPF at the same task level (TCB) that displays the ISPF screens. If you need to ensure that your program runs at the same task level as the routines, use the SELECT PGM( ) service to start your program. This may be a factor if your program expects to create or share data spaces or other task-specific resources between the main program and the read, write, or command routines. Command invocation formatCommand procedures cannot be used to invoke this service. Call invocation format>>-CALL--ISPLINK--('BRIFbbbb'--,-+-data-name-+--,rec-format-----> '-'b'-------' >--,rec-len--,read-routine--,-+-cmd-routine-+-------------------> '-'b'---------' .-ISRBROBA---. >--,-+-dialog-data-+--,-+-panel-name-+--,-+-format-name-+-------> '-'b'---------' '-'b'--------' '-'b'---------' .-'NObbbbb'-. >--,-+-'b'-------+-);------------------------------------------>< '-'YESbbbb'-' Parameters
Dialog-supplied routinesThe dialog-supplied routines are invoked by using standard linkage. Addresses must be 31-bit addresses, and the addressing mode (AMODE) of the routines must be AMODE=31. A BRIF read routine must have an assembler interface to be used in a call to BRIF. The dialog-supplied read and command processing routines are called directly by ISPF at the same task level (TCB) that displays the ISPF screens. If you need to ensure that your program runs at the same task level as the routines, use the SELECT PGM( ) service to start your program. This may be a factor if your program expects to create or share data spaces or other task-specific resources between the main program and the read, write, or command routines. Note:
Read routineThe read routine is invoked with these parameters:
BRIF calls the read routine as the data records are required to be displayed. Data not being displayed is not retained. After the first screen of data is displayed, the first SCROLL DOWN MAX command results in a request to the dialog read routine for relative record number 99999999 (this is the maximum number of records allowed for browsing). The read routine is responsible for determining the relative record number of the last record in the data. It must return that last record number, and a pointer to the data with a return code of 4; the end of file is temporary, or 8, if the end of file is permanent. When BRIF receives this response, it uses the last record number to determine the relative record number of the first data record that should appear on the display (last record number minus the number of data lines on the display + 1). BRIF then calls the read routine requesting this first data display record, and subsequently requests all following records up to the last record in the data to fill the display. The read routine should maintain the previous record number requested so that on the next read request a determination can be made whether the requested record is the next record in the data. This could save a considerable amount of processing time in the read routine, since data records are frequently requested in sequential order for partitions of data. If an I/O error occurs while attempting to read to the end of data, the read routine returns the relative record number of the record causing the I/O error with a return code of 8. When BRIF requests this record number again to format the screen, the read routine then issues a return code of 16, indicating a read error. The BRIF service requests and displays all additional records beyond the temporary end of data (return code 4) if you attempt to scroll down past the end of data or cause any interrupt (such as Enter) when the end-of-data line is present on the display. If you decrease the number of records during the BRIF session, the read routine can set a new last record number that is smaller than the current value with return code 4. When the BRIF service receives a return code 8, it sets the last record number as the permanent end of file. The BRIF service does not request any additional records beyond the permanent end of file. Command routineThe dialog-supplied command routine, when specified, is called to
process the BROWSE primary command or any dialog-specific primary
commands. The Command Routine is invoked with two parameters:
Return codesWhen a dialog routine terminates with a return code (12 or higher or an unexpected return code), the dialog can issue a SETMSG to generate a message on the next panel display. If the dialog does not set a message, the BRIF service will issue a default message. Read Routine Return Codes
Command routine
Errors that the BRIF service cannot handle must be handled by the dialog; for example, environment-dependent errors would be processed by the dialog. BRIF service
After the Browse session has been terminated, control is returned to the dialog with a return code indicating the completion status of the service. ExampleThis example invokes the BRIF service to browse data called SPOOL.DATA, which has a variable record format with a maximum record length of 132 characters. The READRTN read routine reads the data records. The CMDRTN command routine processes the BROWSE primary command and any dialog-specific primary commands. Call invocation
For a more complete example of using BRIF, including dialog-supplied I/O routines and source code, see the z/OS ISPF Dialog Developer's Guide and Reference. |
Copyright IBM Corporation 1990, 2014
|