Example: coupling new or existing XRC sessions

The following scenario describes the XRC commands that are used to start a new master session by coupling two XRC sessions. One of the XRC sessions is an existing session and the other is a new session. You can issue commands to the same logical partition or to different logical partitions. The master data set for master session CXRC must be accessible from each logical partition.

Perform the following steps to couple new or existing XRC sessions:

  1. Start a session named TUCSON, setting the error level for the session using the ERRORLEVEL parameter by entering:
    XSTART TUCSON SESSIONTYPE(XRC) ERRORLEVEL(SESSION)

    This ensures a recoverable consistency across all coupled sessions. See Specifying the ERRORLEVEL parameter in coupled and uncoupled sessions for information about what happens when an error occurs during master session processing for a coupled session.

  2. Issue the following command to add the XRC session named TUCSON to the master session named CXRC, with a default master high-level qualifier of SYS1.
    XCOUPLE TUCSON ADD MSESSION(CXRC) SYS1
  3. Start a previously suspended session named PHOENIX.
    XSTART PHOENIX SESSIONTYPE(XRC) ERRORLEVEL(SESSION)
  4. Add the XRC session named PHOENIX to the master session named CXRC, with a default master high-level qualifier of SYS1.
    XCOUPLE PHOENIX ADD MSESSION(CXRC)SYS1
  5. Add an XRC utility device and two volume pairs to session TUCSON.
    XADDPAIR TUCSON VOLUME(UTIL01,XRCUTL,PRIM01,SEC001,PRIM02,SEC002)
  6. Add the previously suspended volumes again to the session PHOENIX.
    XADDPAIR PHOENIX SUSPENDED
  7. Issue the following command to generate an XQUERY MASTER report:
    XQUERY CXRC MASTER

    Result: The XQUERY MASTER report command generates the following output:

    ANTQ8300I XQUERY STARTED FOR MSESSION(CXRC) MHLQ(SYS1)         
    ANTQ8202I XQUERY MASTER REPORT - 002                                   
    ANTQ8302I SESSION   STA VOL INT CMD   JOURNAL DELTA      RCV/ADV DELTA 
    ANTQ8303I -------------------------------------------------------------
    ANTQ8304I TUCSON    ACT      Y       =00:00:01.830727  =00:00:00.000000
    ANTQ8304I PHOENIX   ACT      Y       +00:00:00.000000  +00:00:02.352970
    ANTQ8305I TOTAL=2  ACT=2  SUS=0  END=0  ARV=0  RCV=0  UNK=0            
    ANTQ8308I MSESSION RECOVERABLE TIME(2004.080 22:33:20.664559)          
    ANTQ8309I INTERLOCKED=2  NON-INTERLOCKED=0                             
    ANTQ8301I XQUERY MASTER REPORT COMPLETE FOR MSESSION(CXRC)