The following examples illustrate how to use the #MREQ statement:
The #MREQ IN statement shown below requests that the system read the map associated with the map request block TESTMAP1. Data values are transferred from map fields to the corresponding variable-storage data fields. Subsequent commands can evaluate the input values and perform appropriate processing. For any error condition that can be specified by the COND=ALL parameter, control will be returned to the routine labeled ERRORTN.
#MREQ IN,MRB=TESTMAP1,INDATA=YES,COND=ALL,ERROR=ERRORTN
The #MREQ IN statement shown below requests that the system map in the next (default) modified detail occurrence of the pageable map associated with the map request block TESTPAG1.
#MREQ IN,MRB=TESTPAG1,DETAIL=YES,MODIFY=YES,COND=ALL, *
ERROR=ERRORTN
The #MREQ OUT statement shown below requests that the system map out all literal and data fields associated with the map request block TESTMAP1. The NEWPAGE option clears the screen before transferring the TESTMAP1 data fields to the screen.
#MREQ OUT,MRB=TESTMAP1,OUTDATA=YES,OPTNS=(NEWPAGE)
The #MREQ OUT statement shown below creates a new detail occurrence and maps out a page of detail occurrences to the terminal screen. The detail occurrence can be displayed in mixed uppercase and lowercase characters. Control is returned to the ERRRTN routine if the request cannot be serviced due to any of the conditions listed under the COND options. A program-supplied message is mapped out to the map message area. Register 7 points to where the message is stored; register 4 contains the message length
#MREQ OUT,MRB=TESTPAG1,OPTNS=(UPLOW),DETAIL=YES,RESUME=YES, *
COND=ALL,ERROR=ERRRTN,MSGADDR=(R7),MSGLEN=(R4)
|
Copyright © 2014 CA.
All rights reserved.
|
|