Page 1 of 1

Fatal Error: Caught unknown exception in main program

Posted: Mon Feb 06, 2006 11:49 am
by reachthiru
Hi,

I have a job which is created for doing a simple job: create flat file from a sql server table. So, my job has odbc stage -> transformer -> sequence stage. I added the transformer stage just to change data type of some of the fields, basically from timestamp to varchar.

Now, when I compile and then validate my job, I am getting the following error and then the validedation failed.

Code: Select all

main_program: Fatal Error: Caught unknown exception in main program: terminating.

Contents of phantom output file =>
DataStage Job 63 Phantom 6784
Note: The phantom # changes for every validation like 7296, 3476, etc.

The contents of the main_program are just like other jobs only:

Code: Select all

main_program: APT configuration file: C:/Ascential/DataStage/Configurations/default.apt
{
	node "node1"
	{
		fastname "SMURFITDS"
		pools ""
		resource disk "C:/Ascential/DataStage/Datasets" { pools "" }
		resource scratchdisk "C:/Ascential/DataStage/Scratch" { pools "" }
	}
	node "node2"
	{
		fastname "SMURFITDS"
		pools ""
		resource disk "C:/Ascential/DataStage/Datasets" { pools "" }
		resource scratchdisk "C:/Ascential/DataStage/Scratch" { pools "" }
	}
}
Pls let me know what could be the problem? Thx

Posted: Mon Feb 06, 2006 12:17 pm
by ArndW
The error message you get when running the job will be much clearer than something during validation. Try running it (it's only writing to a sequential so you won't be messing up any data) and see what you get.

Posted: Mon Feb 06, 2006 1:43 pm
by reachthiru
Hi Arndw,

Thanks for your information. As u said, when I ran the job, it told me the error. Actually I had messed up variables. After fixing the problem, it executed. But after the job completion, I am still getting the error. In fact, the # of rows in the table were written to the file successfully. I am getting the error message after seeing the 'job successfully completed' message and the startup and production run time messages. What could be the problem?

Thanks.

Posted: Mon Feb 06, 2006 1:55 pm
by ray.wurlod
We are not mind readers. What was the message?

Posted: Mon Feb 06, 2006 1:55 pm
by ArndW
Could you please post your error to this thread?

Posted: Mon Feb 06, 2006 3:30 pm
by reachthiru
I am sorry ArndW. I wanted to type 'I am getting the same error message', ie

Code: Select all

main_program: Fatal Error: Caught unknown exception in main program: terminating. 

Contents of phantom output file => 
DataStage Job 63 Phantom 7246
I am getting this error message after the DS loading the data to the flat file without rejecting any data and it also shows the info of startup time and run time.

Posted: Mon Feb 06, 2006 6:34 pm
by ray.wurlod
There is not enough information. Earlier you showed us the configuration file, which indicates two processing nodes using the same directories as each other. This may or may not be related to the problem you are having. Can you please post the generated OSH code?

Posted: Mon Feb 06, 2006 9:18 pm
by kumar_s
Are you able to veiw the data in the output sequential file without any issue (Both from DS and from an text editor).

-Kumar

Posted: Tue Feb 07, 2006 12:05 pm
by reachthiru
Hi Ray,

I feel that, the configuration file may not be the reason, because we are using the same config file for all our jobs. Below is my OSH code.

Code: Select all

Parallel job initiated
# OSH / orchestrate script for Job EquipmentSAPFileLoad compiled at 23:38:24 07 FEB 2006
#################################################################
#### STAGE: Tbl_Equipment_Master
## Operator
odbcread
## Operator options
-db_cs [&DSProjectMapName]
-data_source '[&_SQL_Data_Source]'
-user '[&_SQL_USER_ID]'
-password [&_SQL_Password]
-table '[&_Source_Table_Name]'
-use_strings

## General options
[ident('Tbl_Equipment_Master'); jobmon_ident('Tbl_Equipment_Master')]
## Outputs
0> [modify (
  EQUNR1:not_nullable string[max=18]=EQUNR1;
  DATSL:nullable timestamp=DATSL;
  EQTYP:nullable string[1]=EQTYP;
  EQKTX:nullable string[max=50]=EQKTX;
  TXLINE:nullable string[max=70]=TXLINE;
  EQART:nullable string[max=50]=EQART;
  BEGRU:nullable string[max=50]=BEGRU;
  GROES:nullable string[max=50]=GROES;
  BRGEW:nullable string[max=13]=BRGEW;
  GEWE1:nullable string[max=3]=GEWE1;
  INVNR:nullable string[max=50]=INVNR;
  INBDT:nullable timestamp=INBDT;
  ANSDT:nullable timestamp=ANSDT;
  ANSWT:nullable string[max=50]=ANSWT;
  WAERS:nullable string[max=50]=WAERS;
  HERST:nullable string[max=50]=HERST;
  HERLD:nullable string[max=50]=HERLD;
  BAUJJ:nullable string[max=50]=BAUJJ;
  BAUNM:nullable string[max=50]=BAUNM;
  TYPBZ:nullable string[max=50]=TYPBZ;
  MAPAR:nullable string[max=50]=MAPAR;
  SERGE:nullable string[max=50]=SERGE;
  SWERK:not_nullable string[max=50]=SWERK;
  STORT:nullable string[max=50]=STORT;
  MSGRP:nullable string[max=50]=MSGRP;
  EQFNR:nullable string[max=50]=EQFNR;
  RBNR:nullable string[max=50]=RBNR;
  KOSTL:nullable string[max=50]=KOSTL;
  BUKRS:nullable string[max=50]=BUKRS;
  INGRP:nullable string[max=50]=INGRP;
  IWERK:nullable string[max=50]=IWERK;
  GEWRK:nullable string[max=50]=GEWRK;
  TPLNR:nullable string[max=50]=TPLNR;
  POSNR:nullable string[max=50]=POSNR;
  TIDNR:nullable string[max=50]=TIDNR;
  SUBMT:nullable string[max=50]=SUBMT;
  DATUM:nullable timestamp=DATUM;
  USEIT:nullable string[max=50]=USEIT;
  HSTPS:nullable string[max=50]=HSTPS;
  EQUNR:nullable string[max=50]=EQUNR;
  DATDN:nullable timestamp=DATDN;
  UZTDN:nullable timestamp=UZTDN;
  MATNR:nullable string[max=50]=MATNR;
  SERNR:nullable string[max=50]=SERNR;
  CHARGE:nullable string[max=50]=CHARGE;
  ROWID:not_nullable int64=ROWID;
keep
  EQUNR1,DATSL,EQTYP,EQKTX,
  TXLINE,EQART,BEGRU,GROES,
  BRGEW,GEWE1,INVNR,INBDT,
  ANSDT,ANSWT,WAERS,HERST,
  HERLD,BAUJJ,BAUNM,TYPBZ,
  MAPAR,SERGE,SWERK,STORT,
  MSGRP,EQFNR,RBNR,KOSTL,
  BUKRS,INGRP,IWERK,GEWRK,
  TPLNR,POSNR,TIDNR,SUBMT,
  DATUM,USEIT,HSTPS,EQUNR,
  DATDN,UZTDN,MATNR,SERNR,
  CHARGE,ROWID;
)] 'Tbl_Equipment_Master:ToTRANS.v'
;

#################################################################
#### STAGE: Txt_Equipment_Master
## Operator
export
## Operator options
-schema record
  {final_delim=end, record_delim_string='\r\n', delim=',', null_field=' ', quote=double}
(
  EQUNR1:string[max=18];
  DATSL:nullable string[max=23] {null_field=''};
  EQTYP:nullable string[max=1] {null_field=''};
  EQKTX:nullable string[max=50] {null_field=''};
  TXLINE:nullable string[max=70] {null_field=''};
  EQART:nullable string[max=50] {null_field=''};
  BEGRU:nullable string[max=50] {null_field=''};
  GROES:nullable string[max=50] {null_field=''};
  BRGEW:nullable string[max=13] {null_field=''};
  GEWE1:nullable string[max=3] {null_field=''};
  INVNR:nullable string[max=50] {null_field=''};
  INBDT:nullable string[max=23] {null_field=''};
  ANSDT:nullable string[max=23] {null_field=''};
  ANSWT:nullable string[max=50] {null_field=''};
  WAERS:nullable string[max=50] {null_field=''};
  HERST:nullable string[max=50] {null_field=''};
  HERLD:nullable string[max=50] {null_field=''};
  BAUJJ:nullable string[max=50] {null_field=''};
  BAUNM:nullable string[max=50] {null_field=''};
  TYPBZ:nullable string[max=50] {null_field=''};
  MAPAR:nullable string[max=50] {null_field=''};
  SERGE:nullable string[max=50] {null_field=''};
  SWERK:string[max=50];
  STORT:nullable string[max=50] {null_field=''};
  MSGRP:nullable string[max=50] {null_field=''};
  EQFNR:nullable string[max=50] {null_field=''};
  RBNR:nullable string[max=50] {null_field=''};
  KOSTL:nullable string[max=50] {null_field=''};
  BUKRS:nullable string[max=50] {null_field=''};
  INGRP:nullable string[max=50] {null_field=''};
  IWERK:nullable string[max=50] {null_field=''};
  GEWRK:nullable string[max=50] {null_field=''};
  TPLNR:nullable string[max=50] {null_field=''};
  POSNR:nullable string[max=50] {null_field=''};
  TIDNR:nullable string[max=50] {null_field=''};
  SUBMT:nullable string[max=50] {null_field=''};
  DATUM:nullable string[max=23] {null_field=''};
  USEIT:nullable string[max=50] {null_field=''};
  HSTPS:nullable string[max=50] {null_field=''};
  EQUNR:nullable string[max=50] {null_field=''};
  DATDN:nullable string[max=23] {null_field=''};
  UZTDN:nullable string[max=23] {null_field=''};
  MATNR:nullable string[max=50] {null_field=''};
  SERNR:nullable string[max=50] {null_field=''};
  CHARGE:nullable string[max=50] {null_field=''};
  ROWID:int64 {quote=none};
)
-file '[&_Target_File_Path]/[&_Target_File_Name]'
-overwrite
-rejects continue

## General options
[ident('Txt_Equipment_Master'); jobmon_ident('Txt_Equipment_Master')]
## Inputs
0< 'TRANS:ToSEQ.v'
;

#################################################################
#### STAGE: TRANS
## Operator
transform
## Operator options
-flag run
-name 'V0S3_EquipmentSAPFileLoad_TRANS'

## General options
[ident('TRANS'); jobmon_ident('TRANS')]
## Inputs
0< 'Tbl_Equipment_Master:ToTRANS.v'
## Outputs
0> [] 'TRANS:ToSEQ.v'
;


# End of OSH code
Hi Kumar,
I can see the data by opening the data file as well as thru DS Stage.

Thanks.

Posted: Tue Feb 07, 2006 12:19 pm
by ArndW
Do you still get the same error if you change your sequential file destination to /dev/null? If yes, if you change your job to go straight from ODBC to a sequential file (with no transform stage)? I'm just trying to see which stage might be triggering your runtime error.

Posted: Tue Feb 07, 2006 1:25 pm
by reachthiru
Hi Arndw,

My OS is Windows and is there any alternative for /dev/null? The reason for using TRANSFORMER stage is, my table has timestamp fields and it has NULL value also. So direct ODBC -> SEQUENTIAL gives the fixed length NULL value error.

Posted: Tue Feb 07, 2006 1:59 pm
by ArndW
try a constraint "1=2" on your transform to see if the error remains even when you don't write any output. You might also put in a handler in your sequential file for the nullable column to replace that value (right-click on the column name, then "edit row")

Posted: Tue Feb 07, 2006 2:26 pm
by ray.wurlod
reachthiru wrote:My OS is Windows and is there any alternative for /dev/null? The reason for using TRANSFORMER stage is, my table has timestamp fields and it has NULL value also. So direct ODBC -> SEQUENTIAL gives the fixed length NULL value error.
A file called NUL exists in every folder. So you can use .\NUL as the destination.

Posted: Tue Feb 07, 2006 3:56 pm
by reachthiru
Hi,

As u told, I did the following things and still got the same error

1. Output to NUL.
2. Constraint 1=2
3. No TRANSFOMER stage.

In all 3 occassions, I got the same old error message after the status saying 'Step execution finish with status=OK' and startup time and run time details.