Error in getting statistics using DSGetLinkInfo

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Error in getting statistics using DSGetLinkInfo

Post by Aruna Gutti »

I am trying to find the link statistics from a particular link in a Job. I am using a parallel routine to get the link statistics but getting the following error :

Update_Audit: Failed to load the library "V0S128_RXDWW06L_RouTest_Update_Audit.so"; either the directory containing the library file
is not on the library search path, or the library was compiled on a system
that is incompatible with this system: Could not load "V0S128_RXDWW06L_RouTest_Update_Audit": /opt/IBM/InformationServer/Server/Projects/LCDW/RT_BP245.O/V0S128_RXDWW06L_RouTest_Update_Audit.so: undefined symbol: DSGetLinkInfo
.

I compiled the routine in the same system on which DataStage is running with the same compiler options. I also tried this on another Linux server with DataStage Version 7.5.2 but getting the same error as above.

Could someone please help me resolve this. We already opened a ticket with our service provider couple of weeks back.

The following is the c++ Code in the Routine :

#ifdef WIN32
#include <windows.h>
#endif
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <ctype.h>
# include <stdlib.h>
#include <string.h>
#include<unistd.h>
#include "/opt/IBM/InformationServer/Server/DSEngine/include/dsapi.h"


#ifndef BOOL
#define BOOL int
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#define DSJE_DSJOB_ERROR -9999

/*****************************************************************************/
/*
* Handle the -linkinfo sub-command
*/
int jobLinkInfo(int argc, char* Proj, char* jobnm, char* Stagenm, char* linknm)
{
DSPROJECT hProject;
DSJOB hJob;
int status;
char *project;
char *job;
char *stage;
char *link;
DSLINKINFO linkInfo;



project = Proj;
job = jobnm;
stage = Stagenm;
link = linknm;

/* Attempt to open the project and the job */
if ((hProject = DSOpenProject(project)) == NULL)
{
status = DSGetLastError();
fprintf(stderr, "ERROR: Failed to open project\n");
}
else
{
if ((hJob = DSOpenJob(hProject, job)) == NULL)
{
status = DSGetLastError();
fprintf(stderr, "ERROR: Failed to open job\n");
}
else
{
/* Try getting all the link info */
status = DSGetLinkInfo(hJob, stage, link, DSJ_LINKROWCOUNT, &linkInfo);
if (status != DSJE_NOERROR)
fprintf(stderr, "Error %d getting link row count\n", status);
else
printf("Link Row Count\t: %d\n", linkInfo.info.rowCount);
status = DSGetLinkInfo(hJob, stage, link, DSJ_LINKLASTERR, &linkInfo);
if (status == DSJE_NOT_AVAILABLE)
{
printf("Link Last Error\t: <none>\n");
status = DSJE_NOERROR;
}
else if (status != DSJE_NOERROR)
fprintf(stderr, "Error %d getting link last error\n", status);
else
{
printf("Link Last Error\t:\n");
/*printLogDetail(1, &(linkInfo.info.lastError));*/
}
(void) DSCloseJob(hJob);
}
(void) DSCloseProject(hProject);
}
return status;
}
/*****************************************************************************/
csri
Participant
Posts: 99
Joined: Wed Jul 11, 2007 8:02 am

Post by csri »

Seems like DSGetLinkInfo routine is not identified. Are the datastage libraries in the library path variable in your environment i.e. LD path or SHLIB variables. Also, check if dsapi.h has function DSGetLinkInfo declared if not I think you have to include the .h file in your code that has the function declaration.

Just some thoughts...
Post Reply