LSTOWN-L Archives

LISTSERV List Owners' Forum

LSTOWN-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Gregory Juster <[log in to unmask]>
Thu, 9 Mar 2000 18:02:41 -0500
text/plain (116 lines)
I'm using lsmtp as the mail server and MS SQL 7 for the DBMS.
CR & LF might be my problem.
The query is not fixed. A web interface allow people to select customers
based on few criterias which build the query. Then I send a mail to listserv
by the web interface ... so I might need to check my carriage return.

Here's a simplified generated query and the result :

SELECT itcust.custno as custno, custem, tempfn, tempsn
FROM itcust, itcuin
WHERE itcust.custno = itcuin.custno
AND itcuin.userst = -1
AND itcust.custem like [log in to unmask] AND itcust.custem not like '% %'
AND itcust.custem not like '%.'
AND itcust.custem not like [log in to unmask]
AND itcuin.emlopt = -1
AND (itcust.dupind <> -1 OR itcust.dupind is null)
AND (itcust.prtind <> -1 OR itcust.prtind is null)
AND (itcust.chtind <> -1 OR itcust.chtind is null)
AND (itcust.context = 'fs')
AND itcuin.intlan in ('English')
AND itcust.ccdsid in (SELECT ccdsid from camp_country WHERE camp_id = 4)
ORDER BY custem

custno      custem                                             tempfn
tempsn
----------- -------------------------------------------------- -------------
-- ------------------------------
868383      [log in to unmask]                            AUGUST
AKINS
880300      [log in to unmask]                       MIKE
GOLDSTEIN
875524      [log in to unmask]                                  STEVE
HAMALIUK
883678      [log in to unmask]                                 LEIGHANN
CAMPBELL
880922      [log in to unmask]                            PETE
AGUILAR
911189      [log in to unmask]                        SVEN
DANELSING
860647      [log in to unmask]                                 HAYDEN
THOMPSON
860232      [log in to unmask]                          HARTLEY
GOLDENTHAL

Here's the DB related info in site.cfg

DBMS_DEFAULT_EMAIL=custem
DBMS_DEFAULT_NAME=tempsn
DBMS_DEFAULT_TABLE=itcust
ODBC_DSN=bulk
DBMS_DEFAULT_UEMAIL=uemail
ODBC_UID=bulk
DBMS_NO_HOSTNAME_ALIASING=0
DIST_OWNER_MAIL_MERGE=1
USE_LSMTP_MAIL_MERGE=1


-----Original Message-----
From: LISTSERV list owners' forum
[mailto:[log in to unmask]]On Behalf Of Francoise Becker
Sent: Thursday, March 09, 2000 4:02 PM
To: [log in to unmask]
Subject: Re: What I'm I doing wrong?


On 9 Mar 00, at 15:31, Gregory Juster wrote:

> DISTRIBUTE was on the next line and it was causing problems.
> I was receiving the following error :
> Job "CAMPAIGN" started on 3 Mar 2000 01:10:07
>
> > DISTRIBUTE MAIL-MERGE DBMS=ODBC [log in to unmask]
> Implicit DD (TO or DATA) not found in job stream.
>
> Job "CAMPAIGN" ended   on 3 Mar 2000 01:10:07

Sounds like either the //TO DD line was malformed, or the SELECT
statement did not return anything. Here is a sample job that works
(assuming the database is set up and MYTABLE exists, and there
is an email address starting with "FRANCOISE" in it):

------------------------------cut
here----------------------------------------
//TEST JOB ACK=MAIL
DISTRIBUTE MAIL DBMS=yes [log in to unmask] PW=xxxxx
//TO DD *
SELECT EMAIL FROM MYTABLE
WHERE UEMAIL LIKE 'FRANCOISE%'
/*
//DATA DD *,EOF
Date: &*date;
From: [log in to unmask]
To: &*to;
Subject: Hi

Hello,

This is a test message.

Francoise
------------------------------cut
here----------------------------------------

Make sure that lines are separated by carriage-return-line-feed and
not wrapping. Perhaps the mail program you are using is only
using one or the other but not both. What mail program are you
using to send the distribute job?

What database software are you using?
What is a sample output if you send the query you are using
directly to the database?
How is the database configured in your site.cfg file?

Francoise

ATOM RSS1 RSS2