The following Assembler program is an example of how to start a Global Mirror session. The session will consist of a master storage control (serial number 0000000FC108) and three subordinate storage controls (serial numbers 000000018598, 000000018299, and 0000000FC132). The master storage control has LSSs corresponding to SSIDs B000 and B080. The subordinate storage controls have LSSs corresponding to SSIDs C100, 6000, and 8200. The GM session number is BC, and volume ZBOB40 is used as the access device
After coming back from ANTRQST, fields RTNCD and RSNCD are checked. If ANTRQST processing detects any syntax errors (for example, the action is specified as BEGIN instead of START) the error information is placed in RTNCD and RSNCD. If syntax checking is successful, the request is sent to address space ANTAS000 for processing. The first eight bytes of the return information field (RETINFO) contains the results of the execution.
TITLE 'RSESSION: Test ANTRQST REQUEST=RSESSION'
RSESSION CSECT ,
RSESSION AMODE 31
RSESSION RMODE ANY
USING *,15
B @PROLOG
DC CL1' '
DC CL8'RSESSION'
DC CL1' '
DC CL8'&SYSDATC'
DC CL1' '
DC CL8'&SYSTIME'
DC CL1' '
DROP 15
@PROLOG STM 14,12,12(13)
LR 12,15
@PSTART EQU RSESSION
USING @PSTART,12
L 0,@SIZDATD
GETMAIN RU,LV=(0)
LR 15,13
LR 13,01
USING @DATD,13
ST 15,4(,13)
ST 13,8(,15)
LM 15,01,16(15)
MVC SNBR,=XL1'BC'
MVC VOLSER,=CL6'ZBOB40'
MVC ACTION,=CL12'START'
MVC MSSERIAL,=CL12'0000000FC108'
* Fill in subordinate storage controlinformation
*
MVC SBNBR,=XL1'03'
MVC SBMSSID1,=XL2'B000'
MVC SBSSSID1,=XL2'C100'
MVC SBSSERIAL1,=CL12'000000018598'
MVC SBMSSID2,=XL2'B080'
MVC SBSSSID2,=XL2'6000'
MVC SBSSERIAL2,=CL12'000000018299'
MVC SBMSSID3,=XL2'B080'
MVC SBSSSID3,=XL2'8200'
MVC SBSSERIAL3,=CL12'0000000FC132'
*
* Invoke ANTRQST
*
ANTRQST ILK=ESSRVCS, X
REQUEST=RSESSION, X
SNBR=SNBR, X
VOLSER=VOLSER, X
ACTION=ACTION, X
MSSERIAL=MSSERIAL, X
SBINFO=SBINFO, X
RETINFO=XRETINFO, X
RETCODE=RTNCD, X
RSNCODE=RSNCD, X
MF=(E,P_LIST)
CLC RTNCD,=F'0' * Good return from syntax checking
BE SKIP * Yes
MVC RTCD,RTNCD * No - save return code
MVC RSCD,RSNCD * save reason code
B ERROR
SKIP DS 0H
MVC RTCD,RTC * Get return code from RETINFO
MVC RSCD,RSC * Get reason code from RETINFO
CLC RTCD,=F'0' * Good return from execution
BNE ERROR * No
*
* Do REQUEST=RSESSION processing
*
B FINISH
ERROR DS 0H
CLC RTCD,=A(RQST_PC_NUMBER_ZERO) * Have the API PC number?
BNE FINISH * Yes
WTO 'ANTAS000 NOT ACTIVE' * No
FINISH DS 0H
L 2,RTCD
L 3,RSCD
LR 1,13
L 13,4(,13)
LA 15,0
L 0,@SIZDATD
FREEMAIN RU,LV=(0),A=(1),SP=(15)
LR 15,2
LR 0,3
L 14,12(,13)
LM 1,12,24(13)
BR 14
LTORG
@SIZDATD DS 0A
DC AL1(0)
DC AL3(@DYNSIZE)
@DATD DSECT
DS 18F
RTNCD DS F
RSNCD DS F
RTCD DS F
RSCD DS F
XRETINFO DS 0F,CL100
ORG XRETINFO
RTC DS F
RSC DS F
ORG XRETINFO+100
SNBR DS XL1
VOLSER DS CL6
ACTION DS CL12
MSSERIAL DS CL12
subordinate storage control DS 0CL49
SBNBR DS XL1
SBMSSID1 DS XL2
SBSSSID1 DS XL2
SBSSERIAL1 DS CL12
SBMSSID2 DS XL2
SBSSSID2 DS XL2
SBSSERIAL2 DS CL12
SBMSSID3 DS XL2
SBSSSID3 DS XL2
SBSSERIAL3 DS CL12
ANTRQSTL NAME=P_LIST,BASE=0F
ORG *+1-(*-@DATD)/(*-@DATD)
@ENDDATD DS 0X
@DYNSIZE EQU ((@ENDDATD-@DATD+7)/8)*8
END RSESSION