I'm running datastage + client on a virtual machine: ds 8.5 fixpack 1, Windows Server 2008 (64 bit).
Summary: Using C++ I can call connect with DSGetProjectList( ) provided I don't use DSSetServerParams( ); I'd very much like to make it work with DSSetServerParams( ) and would welcome any trouble shooting insights you can suggest.
Thanks, John
details
I'm compiling for Win32.
When I run the C++ code below, I'm getting this:
Code: Select all
C:>ds_test.exe
Hello from ds85_test
(... 6 second pause ...)
after get project list: dserr=81011
ERROR: get project list failed.
Oddly enough, when I comment out the DSSetServerParams( ) call, it connects just fine (with no noticeable pauses):
Code: Select all
C:>ds_test.exe
Hello from ds85_test
after get project list: dserr=0
a=ANALYZERPROJECT
a=Develop
a=dstage1
a=Test
Done
code sample
Code: Select all
#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <dsapi.h>
int _tmain(int argc, _TCHAR* argv[])
{
char *a;
int dserr;
printf("Hello from ds85_test\n");
char domain[256] = "infoserver1:9080";
DSSetServerParams( domain, "infoserver1", "isadmin", "isadmin" );
a = DSGetProjectList( );
dserr = DSGetLastError( );
printf("after get project list: dserr=%d\n", dserr );
if( dserr != DSJE_NOERROR ) {
printf("ERROR: get project list failed.\n");
return 1;
}
while( *a ) {
printf("a=%s\n", a);
a += 1 + strlen(a);
}
printf("Done\n");
return 0;
}
And just to make sure I'm typing my userid + servername properly, dsjob works well enough:
Code: Select all
C:\IBM\InformationServer\Server\DSEngine\bin>dsjob -domain infoserver1:9080 -user isadmin -password isadmin -server infoserver1 -lprojects
ANALYZERPROJECT
Develop
dstage1
Test
Status code = 0
C:\IBM\InformationServer\Server\DSEngine\bin>dsjob -lprojects
ANALYZERPROJECT
Develop
dstage1
Test
Status code = 0