× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I've never had cause to do this before and I can't find any examples,
and I'm not a command expert, so could someone please help...........

 

I'm using the EASY400 software to generate emails from our iSeries
application. The command doesn't really matter.

 

The command I'm using is EMLSTMF which allows up to 50 recipients to
receive an email with attachments.

Here is the definition from the CMD source for the TO parameter:

 

0013.00              PARM       KWD(TO) TYPE(QUAL1) MIN(1) MAX(50) +


0014.00                           PROMPT('Recipients')


0015.00  QUAL1:      QUAL       TYPE(*NAME) LEN(4) RSTD(*YES) DFT(*TO) +


0016.00                           SPCVAL((*TO 0) (*CC 1) (*BCC 2))


0017.00              QUAL       TYPE(*CHAR) LEN(50) MIN(1) +


0018.00                           PROMPT('''name''')


0019.00              QUAL       TYPE(*CHAR) LEN(50) MIN(1) +


0020.00                           PROMPT('''e-mail address''')


0021.00                                                    

 

When I run this command from a command entry line I am able to include a
number of recipients defined as *TO or *CC or *BCC, all in the single
command:

 

EMLSTMF     SUBJECT(BLAH) 

FROMNAME(MIKE) 

FROMADDR(MPANTZOPOULOS@xxxxxxxxxxxxxxxx)
TO(MPANTZOPOULOS@xxxxxxxxxxxxxxxx/MIKE/*TO
AROSS@xxxxxxxxxxxxxxxx/ANDREW/*CC) 

STMF('/i90/anvdev/emailbody/ed972ok.txt')          

 

 

Notice how the TO parameter has constructed the two qualified values.

 

I now want to run this same sort of thing in a CL and populate the TO
parameter with 1 or more recipients in a dynamic manner based on other
reference data. For example, a particular report may need to go to two
different team leaders, but may also need to be copied to senior
manager. Who the recipients are will be based on a reference table
accessed by report id.

 

I tried creating a character variable to look like the above TO
parameter but it ended up being used as the first qualifier above (the
email address). The slashes between the individual qualifiers seem to be
markers required by the qualified parameter, but are ignored when I
include them in a string substitution value. In other words a single
substitution value consisting of a character variable will not work.

 

The fundamental question is:

 

How do I construct the qualified parameters dynamically so that I can
have 1 - 50 sets of recipients?

 

I have a feeling it's a problem with apostrophes but I can't seem to
quite 'get it'. 

 

TIA

 

Mike Pantzopoulos

 

                              


*********************************************************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you are not the intended recipient, any use, disclosure or copying of this 
message is unauthorised. If you have received this message in error, please 
reply using the sender's email address. 

This footnote confirms that this email message has been scanned for computer 
viruses. EIG-Ansvar Limited does not accept liability for any loss or damage, 
whether caused by our own negligence or not, that results from a computer virus 
or defect in the transmission of this email or any attached file. 

EIG-Ansvar Limited - Australia (A.B.N. 21 007 216 506)
Email : insure@xxxxxxxxxxxxxxxx

Eig-Ansvar Limited - New Zealand
Email : insure@xxxxxxxxxxxxxxxx

*********************************************************************************************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.