RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Use QWCRSVAL API to get the serial number Print E-mail
User Rating: / 0
PoorBest 
Written by Chamara Withanachchi   

D QWCRSVAL        PR                  ExtPgm('QWCRSVAL')   
D  p_Rcvr                             Like(w_Rcvr)         
D  p_RcvrLngth                        Like(w_RcvrLngth)    
D  p_NbrToRtv                         Like(w_NbrToRtv)     
D  p_SysVal                           Like(w_SysVal)       
D  p_Error                            Like(DS_APIError)    

 
************************************************************************
** 
 * #RtvSrlNbr - Retrieve the system Serial Number                         
* 
 
************************************************************************
** 
P #RtvSrlNbr      B                   Export                                
D                 PI             8a                                         
                                                                            
 * Work Fields used by Procedure                                            
D  w_SrlNbr       S              8                                          
D  w_Rcvr         S             36a                                         
D  w_RcvrLngth    S             10i 0 inz(%len(w_Rcvr))                     
D  w_NbrToRtv     S             10i 0 inz(1)                                
D  w_SysVal       S             10a   inz('QSRLNBR')                        
                                                                            
 * Prototypes for calls                                                     
D QWCRSVAL        PR                  ExtPgm('QWCRSVAL')         
D  p_Rcvr                             Like(w_Rcvr)               
D  p_RcvrLngth                        Like(w_RcvrLngth)          
D  p_NbrToRtv                         Like(w_NbrToRtv)           
D  p_SysVal                           Like(w_SysVal)             
D  p_Error                            Like(DS_APIError)          
                                                                 
D DS_SysValTbl    DS                                             
D  d_ValsRtn                    10i 0                            
D  d_Offset                     10i 0                            
D  D_Align                       4a                              
D  d_SysVal                     10a                              
D  d_ValType                     1a                              
D  d_InfoSts                     1a                              
D  d_DtaLngth                   10i 0                            
D  d_Data                       10a                              
                                                                 
C                   Reset                   DS_APIError          
                                                                      
C                   CallP     QWCRSVAL(w_Rcvr :                       
C                                      w_RcvrLngth :                  
C                                      w_NbrToRtv :                   
C                                      w_SysVal :                     
C                                      DS_APIError )                  
C                   Eval      DS_SysValTbl = w_Rcvr                   
C                   Eval      w_SrlNbr = %subst(d_Data:1:d_DtaLngth)  
C                   Return    w_SrlNbr                                
P #RtvSrlNbr      E                                                   

User Comments

Please login or register to add comments

<Previous   Next>