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 caller issues a call to change or set the CPC status for a CPC.
.
.
SetType = HWI_ACCSTAT; 
SetTypeValue = HWMCA_STATUS_OPERATING; 
SetTypeValue_Ptr = addr(SetTypeValue); 
SetTypeValueLen = Length(SetTypeValue); 
CALL HWISET (ReturnCode, ConnectToken, SetType, SetTypeValue_Ptr, 
             SetTypeValueLen, DiagArea)
.
.
Start of changeA REXX programming example for the HWISET service:
mySetType = HWI_ACCSTAT            /* AccStat attribute        */ 
mySetTypeValue =  HWMCA_STATUS_EXCEPTIONS            
                                                      
address bcpii                                            
       "hwiset RetCode myConnectToken mySetType mySetTypeValue 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