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 RCCGetRecords request:
***********************************************************************         
*        RCCGetRecords request                                        *         
*                                                                     *         
*        The RCCHeader is reused from the RCCOpen request.            *         
*        This request uses move mode to place records into a          *         
*        buffer.                                                      *         
*                                                                     *         
***********************************************************************         
GetRecs  DS    0H                                                               
         USING RCCGetInfo,DynRccG                                               
         MVI   RCHRRequest,RCCGetRecords Set request                            
         LHI   R0,1                     Number of input structures                    
         STH   R0,RCHRNum                                                       
         XC    DynRccG,DynRccG          Zero RCCGetInfo structure                  
         L     R0,=A(RCGREyeC)          Set Eyecatcher                          
         ST    R0,RCGREye                                                       
         MVI   RCGRVer,RCGRCurrentVer   Version                                 
         LHI   R0,RCGRSize              Size of structure                       
         STH   R0,RCGRLen                                                       
         L     R0,=A(LenBuffr)          Size of buffer                          
         ST    R0,RCGRBufLen            .                                       
*                                                                               
*        Need to obtain storage before use DynBuffr                             
*                                                                               
         LA    R4,DynBuffr              Address of buffer                       
         ST    R4,RCGRBufAddr31         Save buffer address                     
         L     R0,DynWTime              Get wait time                           
         MHI   R0,1000                  Convert to milliseconds                 
         ST    R0,RCGRWaitTime          Set time to wait                        
         LHI   R0,RCHrSize+RCGRSize     Size of request buffer                  
         ST    R0,DynReqLn                                    
GetMore  DS    0H                  
         EZBRCIFR RCCHeader,DynReqLn,                                  X        
               DynRtVal,DynRtCde,DynRtRsn,                             X        
               MF=(E,DynRcIfr)          Issue RCCSetFilters request             
         LT    R15,DynRtVal             Did it work?                            
         JNZ   ErrRtn                   Error 
         LT    R5,RCGRBufUsed           Any records (time out)
         JNP   GetMore                  No, try again for more                                  
.                                                                               
.                                                                               
                                                                                
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              
DynRccG  DS    XL(RCGRSize)             Space for RCCGetInfo                
DynWTime EQU   30                       Seconds                                 
LenBuffr EQU   32768                    Buffer for trace records                   
DynBuffr DS    XL(LenBuffr)             Address of buffer 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014