z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

The following assembler program example shows how to invoke the RCCSetFilters request:
***********************************************************************         
*        RCCSetFilters request                                        *         
*                                                                     *         
*        The RCCHeader is reused from the RCCOpen request.            *         
*        This request contains two filters:                           *         
*        1. The first filter is for packet trace                      *         
*        2. The second filter is for data trace                       *         
*                                                                     *         
***********************************************************************         
SetFilter DS   0H                                                               
Flt1     USING RCCFilt,DynRccF                                                  
Pkt1     USING RCCPkt,Flt1.RCFLPkt                                              
Flt2     USING RCCFilt,DynRccF+RCFLSize                                         
Dat2     USING RCCDat,Flt2.RCFLDat                                              
         MVI   RCHRRequest,RCCSetFilters                                        
         LHI   R0,2                     Number of filters                  
         STH   R0,RCHRNum                                                       
         XC    DynRccF,DynRccF          Zero filters              
         L     R0,=A(RCFLEyeC)                                                  
         ST    R0,Flt1.RCFLEye          Set eyecatcher for a Filter             
*                                                                               
*              Setup packet trace filter                                       
*                                                                               
         L     R0,=A(RCPKEyeC)                                                  
         ST    R0,Pkt1.RCPKEye          Indicate packet trace                   
         MVI   Pkt1.RCPKVer,RCPKCurrentVer                                      
         LHI   R0,RCPKSize              Size of structure                       
         STH   R0,Pkt1.RCPKLen                                                  
         LHI   R0,PortNum               Get the port number                     
         STH   R0,Pkt1.RCPKPortNum      Save it                                 
         OI    Pkt1.RCPKFiltFlag1,RCPKFPortNum  Indicate port filter            
*                                                                               
         L     R0,Payload               Get the payload value                   
         ST    R0,Pkt1.RCPKPayLoad      Save it                                 
         OI    Pkt1.RCPKOptFlags,RCPKFPayload  Indicate payload param           
*                                                                               
*              Setup Data trace filter                                         
*                                                                               
         L     R0,=A(RCFLEyeC)                                                  
         ST    R0,Flt2.RCFLEye          Set eyecatcher for a Filter             
         L     R0,=A(RCDAEyeC)                                                  
         ST    R0,Dat2.RCDAEye          Indicate data trace                     
         MMI   Dat2.RCDAVer,RCDACurrentVer                                      
         LHI   R0,RCDASize              Size of structure                       
         STH   R0,Dat2.RCDALen                                                  
         LHI   R0,PortNum               Get the port number                     
         STH   R0,Dat2.RCDAPortNum      Save it                                 
         OI    Dat2.RCDAFiltFlag1,RCDAFPortNum  Indicate port filter            
*                                                                               
         L     R0,Payload               Get the payload value                   
         ST    R0,Dat2.RCDAPayLoad      Save it                                 
         OI    Dat2.RCDAOptFlags,RCDAFPayload  Indicate payload param           
         LHI   R0,RCHrSize+2*RCFLSize   Size of header and filters          
         ST    R0,DynReqLn                                                      
         EZBRCIFR RCCHeader,DynReqLn,                                  X        
               DynRtVal,DynRtCde,DynRtRsn,                             X        
               MF=(E,DynRcIfr)          Issue RCCSetFilters request             
         LT    R15,DynRtVal             Did it work?                            
         JNZ   ErrRtn                   Error                                   
.                                                                               
.                                                                               
                                                                                
DynRcIfr EZBRCIFR MF=L                  RCC API parameter list                  
DynReqLn DS    F                        Length of request input               
DynRtVal DS    F                        Return value                            
DynRtCde DS    F                        Return Code                             
DynRtRsn DS    F                        Reason Code                             
DynRccH  DS    XL(RCHRSize)             Space for the RCC header              
DynRccF  DS    XL(RCFLSize*2)           Space for two filters                   
PortNum  EQU   25                       Filter port number                      
PayLoad  EQU   1024                     Payload value 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014