Page 1 of 1

error in parallel job with source as DB2 database

Posted: Mon Dec 18, 2006 9:35 am
by kirankota79
I have created a prallel job in which i have source db2 connection, a transformer and a sequential file as output file. I just want to get the data from db2 source into a sequential file without any transformation.
When i try to run the job, i get the following error.

DB2_UDB_API_10,0: Field type must be string in order to call setOutputFieldAsString() for field '37' in output dataset '0'.

I can view data in DB2 source stage without any problem, and iam not doing any transformation in the transformer, just passing the output to sequential file through transformer.

Can anybody have an answer for it? please help me out.

Posted: Mon Dec 18, 2006 9:38 am
by DSguru2B
Search is your friend. Reference this similar post.

Posted: Mon Dec 18, 2006 9:43 am
by kirankota79
i have tried to change the extended code....but still it is not working.

Posted: Mon Dec 18, 2006 9:46 am
by DSguru2B
What is sqltype and length of field 37? With the first column starting from 0. Do you have NLS enabled?

Posted: Mon Dec 18, 2006 9:55 am
by kirankota79
these are the error iam getting:


DB2_UDB_API_10,0: Info: DB2_UDB_API_10: Using NLS map ISO-8859-1
DB2_UDB_API_10,0: Field type must be string in order to call setOutputFieldAsString() for field '37' in output dataset '0'. (fatal)
DB2_UDB_API_10,0: Operator signalled one or more errors.(fatal)
DB2_UDB_API_10,0: Output 0 produced 0 records.
Sequential_File_2,0: Export complete. 0 records exported successfully, 0 rejected.
APT_CombinedOperatorController,0: Operator's runLocally() failed.(fatal)
APT_CombinedOperatorController,0: Operator terminated abnormally: runLocally did not return APT_StatusOk (fatal)
main_program: Step execution finished with status = FAILED.

Posted: Mon Dec 18, 2006 9:57 am
by DSguru2B
You have NLS enabled in DataStage. But is it enabled in the database. Disable NLS and then run the job.

Posted: Mon Dec 18, 2006 10:17 am
by kirankota79
I have 55 columns in my db2 file. Now the job running since i removed the extended type (unicode) for all the columns. In this file i have also some timestamp columns. Physically i got an output sequential file created. but when i try to view data from data stage i get this error.

##E TOIX 000139 08:16:37(001) <Sequential_File_2> Import validation failed:
##W TFIG 000000 08:16:37(002) <Sequential_File_2> At field "NCS_DATE": "null_field" length (0) must match field's fixed width (19)
##W TFIG 000000 08:16:37(003) <Sequential_File_2> At field "STATUS_DATE": "null_field" length (0) must match field's fixed width (19)
##W TFIG 000000 08:16:37(004) <Sequential_File_2> At field "LAST_LOGIN": "null_field" length (0) must match field's fixed width (19)
##W TFIG 000000 08:16:37(005) <Sequential_File_2> At field "RETURN_SCREEN": "null_field" length (0) must match field's fixed width (1)
##W TFIG 000000 08:16:37(006) <Sequential_File_2> At field "UPDATE_DATE": "null_field" length (0) must match field's fixed width (19)
##W TFIG 000000 08:16:37(007) <Sequential_File_2> At field "DEFAULT_CENTER_REGION": "null_field" length (0) must match field's fixed width (4)
##W TFIG 000000 08:16:37(008) <Sequential_File_2> At field "MOVE_JOB_ACTION": "null_field" length (0) must match field's fixed width (1)
>##E TFIG 000000 08:16:37(009) <Sequential_File_2> At field "NCS_DATE": A fixed length field cannot have a "null_field" of length 0 on import
>##E TFIG 000000 08:16:37(010) <Sequential_File_2> At field "STATUS_DATE": A fixed length field cannot have a "null_field" of length 0 on import
>##E TFIG 000000 08:16:37(011) <Sequential_File_2> At field "LAST_LOGIN": A fixed length field cannot have a "null_field" of length 0 on import
>##E TFIG 000000 08:16:37(012) <Sequential_File_2> At field "RETURN_SCREEN": A fixed length field cannot have a "null_field" of length 0 on import
>##E TFIG 000000 08:16:37(013) <Sequential_File_2> At field "UPDATE_DATE": A fixed length field cannot have a "null_field" of length 0 on import
>##E TFIG 000000 08:16:37(014) <Sequential_File_2> At field "DEFAULT_CENTER_REGION": A fixed length field cannot have a "null_field" of length 0 on import
>##E TFIG 000000 08:16:37(015) <Sequential_File_2> At field "MOVE_JOB_ACTION": A fixed length field cannot have a "null_field" of length 0 on import
>##E TOPK 000000 08:16:38(001) <_PEEK_IDENT_> Input dataset does not have field: "VERIZON_ID"
>##E TOPK 000000 08:16:38(002) <_PEEK_IDENT_> Input dataset does not have field: "TITLE_ID"
>##E TOPK 000000 08:16:38(003) <_PEEK_IDENT_> Input dataset does not have field: "CONTRACT_ID"
>##E TOPK 000000 08:16:38(004) <_PEEK_IDENT_> Input dataset does not have field: "CENTER_ID"
>##E TOPK 000000 08:16:38(005) <_PEEK_IDENT_> Input dataset does not have field: "BCODE"
>##E TOPK 000000 08:16:38(006) <_PEEK_IDENT_> Input dataset does not have field: "SSN"
>##E TOPK 000000 08:16:38(007) <_PEEK_IDENT_> Input dataset does not have field: "NCS_DATE"
>##E TOPK 000000 08:16:38(008) <_PEEK_IDENT_> Input dataset does not have field: "SUFFIX"
>##E TOPK 000000 08:16:38(009) <_PEEK_IDENT_> Input dataset does not have field: "TITLE"
>##E TOPK 000000 08:16:38(010) <_PEEK_IDENT_> Input dataset does not have field: "LAST_NAME"
>##E TOPK 000000 08:16:38(011) <_PEEK_IDENT_> Input dataset does not have field: "FIRST_NAME"
>##E TOPK 000000 08:16:38(012) <_PEEK_IDENT_> Input dataset does not have field: "MIDDLE_INITIAL"
>##E TOPK 000000 08:16:38(013) <_PEEK_IDENT_> Input dataset does not have field: "NICK_NAME"
>##E TOPK 000000 08:16:38(014) <_PEEK_IDENT_> Input dataset does not have field: "RC_CODE"
>##E TOPK 000000 08:16:38(015) <_PEEK_IDENT_> Input dataset does not have field: "DN_CODE"
>##E TOPK 000000 08:16:38(016) <_PEEK_IDENT_> Input dataset does not have field: "ALIAS"
>##E TOPK 000000 08:16:38(017) <_PEEK_IDENT_> Input dataset does not have field: "PAY_LOCATION"
>##E TOPK 000000 08:16:38(018) <_PEEK_IDENT_> Input dataset does not have field: "REPT_LOCATION"
>##E TOPK 000000 08:16:38(019) <_PEEK_IDENT_> Input dataset does not have field: "BUSINESS_PHONE"
>##E TOPK 000000 08:16:38(020) <_PEEK_IDENT_> Input dataset does not have field: "FAX_PHONE"
>##E TOPK 000000 08:16:38(021) <_PEEK_IDENT_> Input dataset does not have field: "VOICE_MAIL"
>##E TOPK 000000 08:16:38(022) <_PEEK_IDENT_> Input dataset does not have field: "CELL_PHONE_PHONE"
>##E TOPK 000000 08:16:38(023) <_PEEK_IDENT_> Input dataset does not have field: "PAGER"
>##E TOPK 000000 08:16:38(024) <_PEEK_IDENT_> Input dataset does not have field: "PAGER_PIN"
>##E TOPK 000000 08:16:38(025) <_PEEK_IDENT_> Input dataset does not have field: "HOME_PHONE"
>##E TOPK 000000 08:16:38(026) <_PEEK_IDENT_> Input dataset does not have field: "PRI_CALLOUT_PHONE"
>##E TOPK 000000 08:16:38(027) <_PEEK_IDENT_> Input dataset does not have field: "ALT_CALLOUT_PHONE"
>##E TOPK 000000 08:16:38(028) <_PEEK_IDENT_> Input dataset does not have field: "EMAIL"
>##E TOPK 000000 08:16:38(029) <_PEEK_IDENT_> Input dataset does not have field: "LTERM"
>##E TOPK 000000 08:16:38(030) <_PEEK_IDENT_> Input dataset does not have field: "ACTIVE"
>##E TOPK 000000 08:16:38(031) <_PEEK_IDENT_> Input dataset does not have field: "COMMENTS"
>##E TOPK 000000 08:16:38(032) <_PEEK_IDENT_> Input dataset does not have field: "REPORTS_TO"
>##E TOPK 000000 08:16:38(033) <_PEEK_IDENT_> Input dataset does not have field: "UNION_REP"
>##E TOPK 000000 08:16:38(034) <_PEEK_IDENT_> Input dataset does not have field: "STATUS"
>##E TOPK 000000 08:16:38(035) <_PEEK_IDENT_> Input dataset does not have field: "STATUS_DATE"
>##E TOPK 000000 08:16:38(036) <_PEEK_IDENT_> Input dataset does not have field: "WFADI_PASSWORD"
>##E TOPK 000000 08:16:38(037) <_PEEK_IDENT_> Input dataset does not have field: "PAGERDOMAIN"
>##E TOPK 000000 08:16:38(038) <_PEEK_IDENT_> Input dataset does not have field: "UI_STYLE"
>##E TOPK 000000 08:16:38(039) <_PEEK_IDENT_> Input dataset does not have field: "LAST_LOGIN"
>##E TOPK 000000 08:16:38(040) <_PEEK_IDENT_> Input dataset does not have field: "SMS_DOMAIN"
>##E TOPK 000000 08:16:38(041) <_PEEK_IDENT_> Input dataset does not have field: "REGION_CODE"
>##E TOPK 000000 08:16:38(042) <_PEEK_IDENT_> Input dataset does not have field: "RETURN_SCREEN"
>##E TOPK 000000 08:16:38(043) <_PEEK_IDENT_> Input dataset does not have field: "DIACCESS"
>##E TOPK 000000 08:16:38(044) <_PEEK_IDENT_> Input dataset does not have field: "DYN_RESTRICTION"
>##E TOPK 000000 08:16:38(045) <_PEEK_IDENT_> Input dataset does not have field: "DEFAULT_APP"
>##E TOPK 000000 08:16:38(046) <_PEEK_IDENT_> Input dataset does not have field: "REMARKS"
>##E TOPK 000000 08:16:38(047) <_PEEK_IDENT_> Input dataset does not have field: "UPDATE_BY"
>##E TOPK 000000 08:16:38(048) <_PEEK_IDENT_> Input dataset does not have field: "UPDATE_DATE"
>##E TOPK 000000 08:16:38(049) <_PEEK_IDENT_> Input dataset does not have field: "DEFAULT_CLUSTER_CODE"
>##E TOPK 000000 08:16:38(050) <_PEEK_IDENT_> Input dataset does not have field: "MANAGEMENT_LEVEL"
>##E TOPK 000000 08:16:38(051) <_PEEK_IDENT_> Input dataset does not have field: "CALLOUT_ORDER"
>##E TOPK 000000 08:16:38(052) <_PEEK_IDENT_> Input dataset does not have field: "DEFAULT_CENTER_REGION"
>##E TOPK 000000 08:16:38(053) <_PEEK_IDENT_> Input dataset does not have field: "MOVE_JOB_ACTION"
>##E TOPK 000000 08:16:38(054) <_PEEK_IDENT_> Input dataset does not have field: "WFAC_ALIAS"
>##E TOPK 000000 08:16:38(055) <_PEEK_IDENT_> Input dataset does not have field: "WFAC_PASSWORD"
>##E TFSR 000019 08:16:38(057) <main_program> Could not check all operators because of previous error(s)
>##E TCOS 000029 08:16:38(058) <main_program> Creation of step finished with status = FAILED

Posted: Mon Dec 18, 2006 10:52 am
by DSguru2B
Are you building a fixed width file or a delimited file? make sure you have correct lengths for all those listed columns.

Posted: Mon Dec 18, 2006 2:54 pm
by shilpa79
Could you please let me know what kind of data ur trying to extract for the I/P.Is it mainframe DB2 data.DB2 is very particular about the sql types.

Posted: Mon Dec 18, 2006 3:30 pm
by ray.wurlod
The message says not to use the setOutputFieldAsString() function unless the target data type is string (that is, Char or VarChar).