Data Type Conversion Error in Transformer

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
maffan76
Participant
Posts: 110
Joined: Tue Aug 23, 2005 5:27 am

Data Type Conversion Error in Transformer

Post by maffan76 »

Hi,
When i try to compile the Transformer, i get this error

Code: Select all

Cl not Found
But When i compiple the same code from command line i get this error

Code: Select all

warning C4244: '=' : Conversion from 'APT_Int64' to 'Int', Possible Data Loss
Any Idea How to remove this error or what i am doing wrong?

Thanks in Advance.
[/code]
Regards,
Affan
"Questioning is Half Knowledge"
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

From the warning it shows that you are makin a mapping where int64 is mapped to less than it original byte length.
Check with transformation.

Regards
kumar
maffan76
Participant
Posts: 110
Joined: Tue Aug 23, 2005 5:27 am

Post by maffan76 »

Kumar,
I jumped to error line in C program and maxrejectlogs variable is being assigned a 64 bit value which is causing problem, now i am unable to understand hows to fix this problem.
Regards,
Affan
"Questioning is Half Knowledge"
maffan76
Participant
Posts: 110
Joined: Tue Aug 23, 2005 5:27 am

Post by maffan76 »

Also i am getting this error in general, although i have created reject links as well but still i am getting the reject llink error as well and plenty of conversion errors.
Thanks in advance

Code: Select all

Output from transformer compilation follows:

##I TFCN 000001 15:58:49(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:58:49(001) <main_program> orchgeneral: loaded
##I TOSH 000002 15:58:49(002) <main_program> orchsort: loaded
##I TOSH 000002 15:58:49(003) <main_program> orchstats: loaded
##W TFPA 000012 15:58:49(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:58:50(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 256
##E TFSR 000019 15:58:50(001) <main_program> Could not check all operators because of previous error(s)
##W TFCP 000000 15:58:50(002) <transform> Error when checking composite operator:  The number of reject datasets "0"is less than the number of input datasets "1".
##W TFCP 000025 15:58:50(003) <transform> Error when checking composite operator: Converting number to string
##W TFCP 000000 15:58:50(004) <transform> Error when checking composite operator:  Implicit conversion from source type "UInt64" to result type "String".
##I TFCP 000008 15:58:50(005) <transform> Error when checking composite operator: cxx  -O   -IC:/Ascential/DataStage/PXEngine/include -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c C:/Ascential/DataStage/Projects/PXJobs/RT_BP1.O/V0S1_PXTest_Transformer_1.C -o C:/Ascential/DataStage/Projects/PXJobs/RT_BP1.O/V0S1_PXTest_Transformer_1.tmp.o
##I TBLD 000000 15:58:50(006) <main_program> Error when checking composite operator: Output from subprocess: Compiler "cl" not found.

##E TCOS 000029 15:58:50(007) <main_program> Creation of step finished with status = FAILED (PXTest.Transformer_1)

*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S1_repos_Transformer_1 transform operator.
0003: //
0004: 
0005: // define our input/output link names
0006: inputname 0 DSLink2;
0007: outputname 0 DSLink4;
0008: outputname 1 DSLink6;
0009: 
0010: initialize {
0011: 	// define our row rejected variable
0012: 	int8 RowRejected0;
0013: 
0014: 	// define our null set variable
0015: 	int8 NullSetVar0;
0016: 
0017: 	// define and initialise each link row count variable required
0018: 	uint64 RowCount0_1;
0019: 	RowCount0_1 = 0;
0020: 
0021: 	// declare our intermediate variables for this section
0022: 	int8 InterVar0_0;
0023: 
0024: 	// initialise constant values which require conversion
0025: 	InterVar0_0 = 0;
0026: }
0027: 
0028: mainloop {
0029: 	// initialise our row rejected variable
0030: 	RowRejected0 = 1;
0031: 
0032: 	// declare our intermediate variables for this section
0033: 	int64 InterVar0_1;
0034: 
0035: 	// evaluate constraint and columns for link: DSLink4
0036: 	if ((null(DSLink2.Field001) == InterVar0_0))
0037: 	{
0038: 		writerecord 0;
0039: 		RowRejected0 = 0;
0040: 	}
0041: 	// evaluate constraint and columns for link: DSLink6
0042: 	InterVar0_1 = RowRejected0;
0043: 	if (InterVar0_1)
0044: 	{
0045: 		DSLink6.Field001 = DSLink2.Field001;
0046: 		DSLink6.Field002 = DSLink2.Field002;
0047: 		writerecord 1;
0048: 		RowRejected0 = 0;
0049: 		RowCount0_1 = RowCount0_1 + 1;
0050: 	}
0051: }
0052: 
0053: finish {
0054: 	// Log warnings for any reject links
0055: 	string LogMsg0;
0056: 	string LogLink0;
0057: 	if (RowCount0_1 > 0) {
0058: 		LogMsg0 = RowCount0_1;
0059: 		LogLink0 = " rows written to reject link: ";
0060: 		LogMsg0 = LogMsg0 + LogLink0;
0061: 		LogLink0 = "DSLink6";
0062: 		LogMsg0 = LogMsg0 + LogLink0;
0063: 		print_message(LogMsg0);
0064: 	}
0065: 
0066: }
0067: 
*** End of Internal Generated Transformer Code
Regards,
Affan
"Questioning is Half Knowledge"
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

maffan76 wrote:

Code: Select all

##I TBLD 000000 15:58:50(006) <main_program> Error when checking composite operator: Output from subprocess: Compiler "cl" not found.
The problem is that no compiler is avaliable to DataStage.
maffan76
Participant
Posts: 110
Joined: Tue Aug 23, 2005 5:27 am

Post by maffan76 »

Eric,
The compiler is available coz when i compiled the c Code from Command Line i get the APT_INT64 Assignment Error.

Now after doing some Path Adjustements now i am getting the other errors i posted in my other Post

viewtopic.php?p=150591&sid=c7f4b40fb6bf ... fdc#150591

Thanks in advance
Regards,
Affan
"Questioning is Half Knowledge"
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

maffan76 wrote:Eric,
The compiler is available coz when i compiled the c Code from Command Line
This does not mean that DataStage can find the compiler.
Did you have only Studio .NET installed Before you installed DataStage?

You other post has problems with Unknown compiler and linking Options (i.e. -Wc++) - Why are you not using the defaults?
maffan76
Participant
Posts: 110
Joined: Tue Aug 23, 2005 5:27 am

Post by maffan76 »

Yes i did install the VC++ .net 2003 Compiler installed downloaded from MS Site. And i have also found out that if the compiler installation has spaces in path then the Wc++ and /MD errors come and i re installled the compiler and got rid of those error but the data truncation warning still exist, further investing the ccg file i found out that some how MKS tool kit is enabling the 64 bit processing. i dont know why :(

Secondly, there are some misterious errors see teh erros below

Thanks in advance.

Code: Select all

Output from transformer compilation follows:

##I TFCN 000001 09:53: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 09:53:29(001) <main_program> orchgeneral: loaded
##I TOSH 000002 09:53:30(000) <main_program> orchsort: loaded
##I TOSH 000002 09:53:30(001) <main_program> orchstats: loaded
##E TBLD 000000 09:53:42(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 40192
##E TFSR 000019 09:53:42(001) <main_program> Could not check all operators because of previous error(s)
Regards,
Affan
"Questioning is Half Knowledge"
Post Reply