Read Email with Datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
caltog
Premium Member
Premium Member
Posts: 39
Joined: Thu May 22, 2003 7:32 am

Read Email with Datastage

Post by caltog »

I need to read an email within a datastage job. How can I do that ?
Any suggestions or experiences ? or is it really posssible...

many thanks

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

Post by ray.wurlod »

Why? (I'm always suspicious of queries that begin "I need to...", as they're often not well thought out.)

Do you only need to detect that the email has arrived, or do you need its content? Does your email client store email messages as text files or as encoded files - that is, are the email messages readily accessible via the file system.

In DataStage 6.0 you can use a front-end filter on the Sequential File stage to invoke an email reader; the output being streamed into the stage for processing as if it were a Sequential File. Otherwise (for example at earlier releases) you can create a before-stage or before-job subroutine to process the email message into a text file that DataStage can use, or use similar code in a job control routine to obtain the requisite information with which to set parameter values of child jobs.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
ariear
Participant
Posts: 237
Joined: Thu Dec 26, 2002 2:19 pm

Post by ariear »

Very easy [:D]
Install the ClickPack. It's on the CD and free - however it cannot be installed on NLS enabled systems (Ray maybe you have an idea how to overcome this ?)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What you get from ClickPack is a bit limited, but it's a good solution. I forgot it's free now.
In particular, from memory, the message text comes in in one column, and you only get pointers (pathnames) to where attachments are.
caltog
Premium Member
Premium Member
Posts: 39
Joined: Thu May 22, 2003 7:32 am

Post by caltog »

Hello eveybody,

I made some positive tests with the ClickPack and it is exactly what i needed...
thank you for help
ariear
Participant
Posts: 237
Joined: Thu Dec 26, 2002 2:19 pm

Post by ariear »

Good,

If you'll find a neat way to delete the emails from the POP3 server after you've read them, please share it with us
Post Reply