ray.wurlod wrote:Obfuscation? Maybe there are lots of #define statements literally changing the syntax to make it look like BASIC? You can do the same in BASIC with EQU LIT.
![Laughing :lol:](./images/smilies/icon_lol.gif)
ok, now I tried to make 1 Parellel Routine
but i am not able to bring it in runnable state
the code is as follows:
Code: Select all
#include "C:\Ascential\DataStage\Dsdk\include\dsapi.h"
long int GetRowCount(char* ProjectName,char* JobName,char* StageName,char* LinkName)
{
DSLINKINFO *ReturnInfo=new DSLINKINFO;
long int rowcount;
DSPROJECT ProjectHandle=DSOpenProject(ProjectName);
DSJOB JobHandle=DSOpenJob(ProjectHandle,JobName);
rowcount=DSGetLinkInfo(JobHandle,StageName,LinkName,DSJ_LINKROWCOUNT,ReturnInfo);
return(rowcount);
}
I compiled it
to get GetRowCount.obj
entries in datastage parellel routine window
routine name->GetRowCount
Type->External Function
Object Type->Object
External Subroutine Name->GetRowCount
Return Type->long
Library Path->c:\GetRowCount.obj
then I placed the routine in transformer with its arguments
but when i am trying to compile that job I am geeting an error
the error is as follows:
Output from transformer compilation follows:
##I TFCN 000001 15:17:29(000) <main_program>
Ascential DataStage(tm) Enterprise Edition 7.5
Copyright (c) 2004, 1997-2004 Ascential Software Corporation.
All Rights Reserved
##I TOSH 000002 15:17:29(001) <main_program> orchgeneral: loaded
##I TOSH 000002 15:17:29(002) <main_program> orchsort: loaded
##I TOSH 000002 15:17:29(003) <main_program> orchstats: loaded
##W TFPA 000012 15:17:29(006) <main_program> Warning: the PWD environment variable is not defined. Remote process startup may be unsuccessful as a result.If your ORCHESTRATE job does not start up correctly, please set your PWD variable to a value that will work on all nodes of your system.
##E TBLD 000000 15:17:35(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 40192
##E TFSR 000019 15:17:35(001) <main_program> Could not check all operators because of previous error(s)
##W TFCP 000000 15:17:35(002) <transform> Error when checking composite operator: The number of reject datasets "0"is less than the number of input datasets "1".
##I TBLD 000000 15:17:35(003) <main_program> Error when checking composite operator: Output from subprocess: C:\Ascential\DataStage\Projects\TCS\RT_BP40.O\V0S5_test_Transformer_5.C(240) : warning C4244: '=' : conversion from 'APT_Int64' to 'int', possible loss of data
##I TFCP 000008 15:17:35(004) <transform> Error when checking composite operator: cxx -LC:/Ascential/DataStage/Projects/TCS/RT_BP40.O/ -LC:/Ascential/DataStage/PXEngine/lib -LC:/Ascential/DataStage/PXEngine/user_lib -W/TP -W/dll -W/base:0x50000000 -lliborchnt -lliborchcorent -lliborchbuildopnt C:\GetRowCount.obj.o C:/Ascential/DataStage/Projects/TCS/RT_BP40.O/V0S5_test_Transformer_5.tmp.o -o C:/Ascential/DataStage/Projects/TCS/RT_BP40.O/V0S5_test_Transformer_5.dll
##I TBLD 000000 15:17:35(005) <main_program> Error when checking composite operator: Output from subprocess: LINK : warning LNK4224: /DEBUGTYPE:BOTH is no longer supported; ignored
LINK : fatal error LNK1181: cannot open input file 'C:GetRowCount.obj.o'
##E TCOS 000029 15:17:35(006) <main_program> Creation of step finished with status = FAILED (test.Transformer_5)
*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S5_test_Transformer_5 transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern int64 GetRowCount(string ProjectName,string JobName,string StageName,string LinkName);
0007:
0008: // define our input/output link names
0009: inputname 0 DSLink6;
0010: outputname 0 DSLink9;
0011:
0012: initialize {
0013: // define our row rejected variable
0014: int8 RowRejected0;
0015:
0016: // define our null set variable
0017: int8 NullSetVar0;
0018:
0019: // declare our intermediate variables for this section
0020: string InterVar0_0;
0021: string InterVar0_1;
0022: string InterVar0_2;
0023: string InterVar0_3;
0024:
0025: // initialise constant values which require conversion
0026: InterVar0_0 = "TCS";
0027: InterVar0_1 = "test";
0028: InterVar0_2 = "Row_Generator_0";
0029: InterVar0_3 = "DSLink3";
0030: }
0031:
0032: mainloop {
0033: // initialise our row rejected variable
0034: RowRejected0 = 1;
0035:
0036: // evaluate columns (no constraints) for link: DSLink9
0037: DSLink9.Rowcount = GetRowCount(InterVar0_0 , InterVar0_1 , InterVar0_2 , InterVar0_3);
0038: writerecord 0;
0039: RowRejected0 = 0;
0040: }
0041:
0042: finish {
0043: }
0044:
*** End of Internal Generated Transformer Code
Can any one tell me where i went wrong
or what are the other things i should do to make the routine runnable
thanks in advance