z/OS MVS Programming: Callable Services for High-Level Languages
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example

z/OS MVS Programming: Callable Services for High-Level Languages
SA23-1377-02

In the pseudocode example, the application attempts to establish a connection between the application and the target CPC.
.
.
InConnectToken = 16blanks;
ConnectType = HWI_CPC;
ConnectTypeValue_Ptr = Addr(ConnectTypeValue);
ConnectTypeValue = ‘CPCPLEX1.CPC01’;
CALL HWICONN (ReturnCode, InConnectToken, OutConnectToken,
              ConnectType, ConnectTypeValue_Ptr, DiagArea)
(After the call, OutConnectToken contains a token that can be used on all 
subsequent calls to perform CPC functions against the ‘CPCPLEX1.CPC01’ CPC 
including connecting to images, capacity records, and activation profiles 
residing on the CPC.)
.
.
Start of changeA REXX programming example for the HWICONN service:
myConnectType       = HWI_CPC             /* CPC connect type */ 
myConnectTypeValue  = 'IBM390xx.H123    ' /* 17-char CPC name */ 
                                                        
address bcpii                                           
        "hwiconn Retcode myInConnectToken myOutConnectToken myConnectType
            myConnectTypeValue myDiag."
                      
If (RC <> 0) | (Retcode <> 0) Then  
  Do  
     Say 'Service failed with REXX RC = 'RC' and API Retcode = 'Retcode'.'       
     If (RC=Hwi_REXXParmSyntaxError | Retcode<>0) Then
       Do
         Say ’ Diag_index=’ myDiag.DIAG_INDEX
         Say ’ Diag_key=’ myDiag.DIAG_KEY
         Say ’ Diag_actual=’ myDiag.DIAG_ACTUAL
         Say ’ Diag_expected=’ myDiag.DIAG_EXPECTED
         Say ’ Diag_commerr=’ myDiag.DIAG_COMMERR
         Say ’ Diag_text=’ myDiag.DIAG_TEXT
       End
  End
End of change

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014