Page 2 of 2

Failure to Compile

Posted: Tue Jun 03, 2008 11:59 pm
by ray.wurlod
The language is DataStage BASIC, not C. Therefore you must use BASIC-style comments, not C-style comments. The "/*" characters are the immediate cause of your failure to compile.

Posted: Wed Jun 04, 2008 12:26 am
by Roopanwita

Posted: Wed Jun 04, 2008 1:21 am
by ray.wurlod
"Not working" is meaningless.

Is it compiling (which is the only thing I addressed)?

What do you want the routine to do, what is it producing (if anything)? What is appearing in the log (or in the Results window in the test grid)?

Posted: Wed Jun 04, 2008 1:23 am
by Roopanwita
Routine is compiling successfully but unable to send mail.

Posted: Wed Jun 04, 2008 1:26 am
by ArndW
roopanwita - put in PRINT statements to see if you get valid values for your calls, i.e. print out FROM_MAILID, TO_MAILID, and the evaluation of the parameter to DSSendMail.

Posted: Wed Jun 04, 2008 1:30 am
by ray.wurlod
Calls to DSLogInfo() will serve in place of PRINT statements.

Posted: Wed Jun 04, 2008 3:31 am
by Roopanwita
It is throwing error ,while compiling - "3 Errors detected, No Object Code Produced."

Posted: Wed Jun 04, 2008 3:41 am
by ArndW
You cannot modify input arguments. At the beginning of your job, add

TempFROM_MAILID = FROM_MAILID
TempTO_MAILID = TO_MAILID
TempSUBJECT = SUBJECT

and use the Temp... variables in your job.

Posted: Wed Jun 04, 2008 5:59 am
by Roopanwita
With modified value of TO_MAILID & FROM_MAILID (as u mentioned to define as TempTO_MAILID) , the routine is running for long time and unable to send mail msg.

Posted: Wed Jun 04, 2008 6:30 am
by ArndW
Add
MailCommand = "From:":FROM_MAILID:"\nTo:":TO_MAILID:"\nSubject:":SUBJECT:"\nBody:"

and then PRINT or Call DSLogInfo() of the MailCommand variable. What do you get?

Posted: Wed Jun 04, 2008 6:50 am
by ray.wurlod
It's DataStage BASIC, not a shell script. Comments do not begin with "#" in DataStage BASIC.

Comments in DataStage BASIC can be specified in three ways:
  • a statement beginning with "*" and containing at least one space
    a statement beginning with "!" and containing at least one space
    a statement beginning with "REM" and containing at least one space

Posted: Wed Jun 04, 2008 7:10 am
by ArndW
I should have caught that. I just looked at the error message, not the red text to see what actually caused it. I need glasses...

Posted: Wed Jun 04, 2008 3:07 pm
by ray.wurlod
Would your glasses be half full or half empty?
:lol:

Posted: Thu Jun 05, 2008 1:10 am
by ArndW
My glass is half full, if I could find it...