Custom Routine Issues
Posted: Thu Dec 07, 2017 2:35 pm
Hi everyone,
I have reviewed some training in an advanced DataStage class that covers custom stages and routines, etc. I have a significant use case scenario where something like this would greatly benefit some of our job designs. As such I am attempting to merely test this process with a pretty dumb routine. I've compiled the following code into a .obj file and used that to create the custom routine:
I then designed a very basic job that does some RowGenerating, sends that to a transform that passes most of the columns I'm generating through, but applies the custom routine to one of the columns that has a 2/3 chance of containing the words "hello" or "ugly". Then saves everything to a txt file. My issue is that I cannot compile the job. The error log for the compile can be found here:
https://raw.githubusercontent.com/jacks ... rorlog.txt
I do have an alternate version of code as follows:
However I cannot get this one to compile as that gives me the following error when attempting to do so:
I have reviewed some training in an advanced DataStage class that covers custom stages and routines, etc. I have a significant use case scenario where something like this would greatly benefit some of our job designs. As such I am attempting to merely test this process with a pretty dumb routine. I've compiled the following code into a .obj file and used that to create the custom routine:
Code: Select all
#include <iostream>
#include <string>
using namespace std;
char * HelloUgly(char *inString)
{
if ( strstr(inString, "hello") != NULL ||
strstr(inString, "ugly") != NULL)
return "Y";
else
return "N";
}
https://raw.githubusercontent.com/jacks ... rorlog.txt
I do have an alternate version of code as follows:
Code: Select all
#include "C:\IBM\InformationServer\Server\PXEngine\include\apt_framework\orchestrate.h"
char * keyWords(char *inString)
{
APT_String s = inString;
if ( inString.occurences("hello") > 0 ||
inString.occurences("ugly") > 0 )
return "Y";
else
return "N";
}
Code: Select all
c:\CourseData\Custom>cl /c helloUgly.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
helloUgly.cpp
C:\IBM\InformationServer\Server\PXEngine\include\apt_framework\orchestrate.h(18)
: fatal error C1083: Cannot open include file: 'apt_framework/accessor.h': No such file or directory