Archive for February, 2011

HA4i PHP interfaces gains more functionality

February 22nd, 2011

We have just completed writing the code to bring the spool file replication process to the HA4i PHP interface. As with our other screens we have also added the ability to retry failed requests from the screens plus start and stop the process.

Here is the new main monitoring screen which shows the overall status of all of the replication processes.

Main Monitor with Spool status

Spool status in Main Monitor screen

The main screen shows that we have 2 errors in the replication process, clicking in the field will bring up the following screen which displays all of the details about the replication error.

Spool File error listing

List of spool file replication errors

We can also see from the main monitoring screen that there are 4 entries still waiting to be processed (we held the replication queue to allow us to capture this), clicking in the field will bring up the following display which provides the details about the spool files which are still to be processed.


Spool Files waiting replication to target

We continue to improve the interface and use different techniques to retrieve the data from the IBM i which in turn improves our understanding and the power of the i5_toolkit functions provided by the EasyCom server. Some of the data is pulled back using C programs on the IBM i which interface with the i5_toolkit functions using Service Program connections while others retrieve the data directly using SQL and Native File Access within the i5_toolkit. The main purpose of the interface is still about systems management and monitoring the replication process, we are considering how we can implement a configuration tool based around the PHP i5_toolkit functions with a number of our own C Service Programs. High Availability does not need to be hard, we think this interface helps ease the burden on system administrators while providing accurate and up to date information.

if you would like to see a demo of the product or discuss the implementation we have used for providing the data to the browser let us know, we will be more than willing to share..


Application Modernization, C Programming System i5, Disaster recovery, EasyCom Server, High Availability, HTTP Server, Linux, PHP, PHP Programming, Systems Management

Initializing the Continuation Handle for QWCLSCDE

February 21st, 2011

If you are using C for calling the above API it is important that you initialize the Continuation Handle to blanks before calling the API. This is because failing to initialize the parameter will cause unpredictable results. We have asked IBM to change the documentation to reflect this requirement but in the meantime we felt it is important that you understand this requirement.

Here is a sample program we shipped to IBM for testing which shows the effect of not setting the parameter (Note: in RPG the problem does not exist because the compiler initializes the parameter before calling the program automatically.)

#include                        /* List job schedule entries */ 
#include                           /* std input / output  */ 
#include                           /* File record I/O */ 
#include                          /* Std Lib       */ 
#include                          /* generic space header */ 
#include                        /* usrspc ptr */ 
#include                        /* usrspc ptr */ 
#include                         /* send message */ 
#include                           /* error code */ 

typedef _Packed struct  EC_x { 
                     Qus_EC_t EC; 
                     char Exception_Data[48]; 
                     } EC_t; 

int Crt_Usr_Spc(char *, int); 

int main(int argc, char **argv) { 
int i = 0; 
char Req_SPC[20] = "JESPC     QTEMP     ";  /* usrspc name */ 
char Format[8] = "SCDL0100";                /* output format */ 
char Cont_Hdl[16];                          /* continuation Handle */ 
char *tmp;                                  /* pointer */ 
Qwc_SCDL0100_t *List_Entry;                 /* data pointer */ 
Qus_Generic_Header_0100_t *space;           /* User Space Hdr Ptr */ 
EC_t Error_Code = {0};                      /* Error Code */ 

Error_Code.EC.Bytes_Provided = sizeof(Error_Code); 

if(Error_Code.EC.Bytes_Available > 0){ 
printf("QUSPTRUS %.7s\n",Error_Code.EC.Exception_Id); 
if(Error_Code.EC.Bytes_Available > 0){ 
printf("QWCLSCDE %.7s\n",Error_Code.EC.Exception_Id); 
if(space->Number_List_Entries <= 0) { 
printf("No entries found\n"); 
tmp = (char *)space; 
tmp += space->Offset_List_Data; 
List_Entry = (Qwc_SCDL0100_t *)tmp; 
for(i = 0; i < space->Number_List_Entries; i++) { 
printf("JobName = %.10s\n",List_Entry->Job_Name); 
printf("Status = %.3s\n",List_Entry->Status); 
printf("Scheduled Date = %.10s\n",List_Entry->Scheduled_Date); 
printf("Scheduled Time = %.6s\n",List_Entry->Scheduled_Time); 
printf("Frequency = %.10s\n",List_Entry->Frequency); 

The above code expects the user space used to receive the output to already exist.


Application Modernization, C Programming System i5, Main Category

Bad Behavior has blocked 547 access attempts in the last 7 days.