MS Outlook lookups
- From: "Ninja67" <Ninja67@xxxxxxxxx>
- Date: 18 May 2005 14:20:17 -0700
I have an IIS website where users have authenticated using an ID. I
need to perform a lookup of this ID via Outlook. A coworker suggested
that I download all the user names from Outlook to a flat file and then
do lookups that way. He was also able to produce some TCL code that
accomplishes this for him. Neither he nor I user TCL and I really need
a solution in perl. If someone could look at the following code and
tell me how to write it in perl, I'd be estatic.
#!/usr/local/bin/tclsh_current
set CALLDB2 /home/db2/db2clnt/sqllib/bin/db2 # Log on to Outlook
catch {exec $CALLDB2 -tvf /data/.secure/connect/logon_XCDB.sql} sqlrc
#----------------------------------------------
# Work File definitions
#----------------------------------------------
set sql_out /data/bb/results.txt
set sql1 /data/bb/unload.sql
set outfile1 [open $sql1 w 0644]
puts $outfile1 "SELECT DISTINCT "
puts $outfile1 " RTRIM(UCASE(MAIL_NNME)) AS MS_EMPL_ID "
puts $outfile1 " ,EMPL_ID AS MS_USER_ID "
puts $outfile1 " ,LCASE(substr(SMTP_EMAIL_ID,6,50)) AS MS_EMAIL"
puts $outfile1 " ,RTRIM(EMPL_LNME) || ', ' || "
puts $outfile1 " RTRIM(EMPL_FNME) || ' ' || "
puts $outfile1 " EMPL_MINIT AS MS_EMPL_NAME "
puts $outfile1 " FROM XC.TEXCH_FULL_DCTRY "
puts $outfile1 "where EMPL_LNME > ' ' "
puts $outfile1 " and EMPL_FNME > ' ' "
puts $outfile1 " and EMPL_ID > ' ' "
puts $outfile1 " ;"
close $outfile1
#Execute Statememt
catch {exec $CALLDB2 -tvf $sql1 > $sql_out} emplrc
.
- Follow-Ups:
- Re: MS Outlook lookups
- From: Jim Gibson
- Re: MS Outlook lookups
- Prev by Date: Re: need Net::AIMTOC help
- Next by Date: Re: need Net::AIMTOC help
- Previous by thread: Net::SSH::Perl and X11 forwarding
- Next by thread: Re: MS Outlook lookups
- Index(es):
Relevant Pages
|
|