Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issues with sending emails

Status
Not open for further replies.

sdap4321

Programmer
Jul 15, 2004
5
US
We need to send Informatica generated emails.

The Informatica session is kicked off as a concurrent job in Oracle Applications. The user submitting the job in Oracle application changes every time .The email addresses of the users are stored in an Oracle table, which is not related to this Informatica session.

Is there a way to define a variable or parameter that can be used to send the Informatica log files to the User submitting the job in Oracle Application.
 
A session from informatica server manager has a post session command that you can email to specific users. However for your example I'm assuming that the session is started by pmcmd command.

To do this, in unix solaris, the user through the oracle app will have to log in as a user that has grants to the pmcmd command so;

On the basis of:
Its the log file that has to be sent to the user and not the confirmation that the session ran ok.
Your using unix OS.

The user logs into the unix box to kick off the session using pmcmd command (another assumption not being oracle apps trained).

The user has an environment variable set called env when they log on. This is the users name for example bobjones.

Use the pmcmd command which will log out of unix only after completion of the mapping, there are two one which returns to the command line after completion of the session and one that returns immediately. (Not at work so can't give the exact command from the help files.) In this way the env variable will be available throughout the session run to any post session commands on successful completion of the session.

following the completion of the session a post session command kicks off a unix script and is passed the name of the session being run.

The script picks up the env variable, which could be used to lookup the users email address somehow.

The session name that is past to the script is then mailx to the email address.

I'm sure there's an easier way and would love to here from anyone who knows.

cheers

simmo
 
Actually you can get the username from $USER as well which is a bit easier.

If the post session command can't pick up the $USER variable try creating a temporary file with this value which can be read then deleted following the session run

cheers

simmo
 
Thank you for helping out.
The problem is that the user does not log onto to unix box to start the session,the session kicks off as a concurrent program to the oracle application.

We get the user mailing address from another table and I am unable to relate the table and the user address to the $USE
 
So how does the user kick off the session. Via a gui.

Do they have to click a button? If this is the case then could you not;

1) Code the oracle app to write a temporary unix file with the users email address.

2)This could be a field in a table that the oracle app can look up and then use dbms_file (or something similarly named) to open a file, write the this value to it.

3)Then a post session command kicks off a script that looks this value up mailx's to that mail address and deletes the temp file.


I've seen this used a number of times but not for this particular issue. There are plenty of faq's out there on how to write files from oracle tables.


cheers

simmo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top