Capturing part of job log using routine

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

ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Failure to Compile

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post by Roopanwita »

Last edited by Roopanwita on Thu Jun 19, 2008 10:21 pm, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post by Roopanwita »

Routine is compiling successfully but unable to send mail.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Calls to DSLogInfo() will serve in place of PRINT statements.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post by Roopanwita »

It is throwing error ,while compiling - "3 Errors detected, No Object Code Produced."
Last edited by Roopanwita on Thu Jun 19, 2008 10:22 pm, edited 2 times in total.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Would your glasses be half full or half empty?
:lol:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

My glass is half full, if I could find it...
Post Reply