|
I've hit the wall on what should be an easy problem to fix, but I can't seem to get around the problem..... We use a modified version of Dave Leland's SNDEMAIL command. One of the programmers here wrote a program to email change notifications to a group of application users. In his app, he builds a command string containing the SNDEMAIL command, formatted with the recipient addresses, then executes it via 'system' call. We have done similar projects and have not had problems until now... Problem: one recipient has hyphenated name. The ADDRESSEE parm looks like this: ADDRESSEE((test-address@xxxxxxxxxxxxxxx)) <------ no apostrophe's around the address string. When the program runs, the job logs the following error: Additional Message Information Message ID . . . . . . : CPD0050 Severity . . . . . . . : 30 Message type . . . . . : Diagnostic Date sent . . . . . . : 01/16/04 Time sent . . . . . . : 15:49:52 Message . . . . : Expression operator not allowed for parameter ADDRESSEE. Cause . . . . . : An expression operator was found immediately before or after a character string with no intervening blanks on a parameter that does not support expressions. Character string expressions are only allowed in CHGVAR commands, IF commands, or a parameter defined with EXPR(*YES). Arithmetic, relational, and logical expressions are only allowed on the CHGVAR and IF commands. Recovery . . . : Remove the expression operator or insert a blank between the operator and the character string. More information on expression operators can be found in the CL Reference manual. Bottom Here's the CMD source for the parm in question: ELEM1: ELEM TYPE(*PNAME) LEN(256) MIN(1) EXPR(*YES) + PROMPT('E-mail address of recipient') ELEM TYPE(*CHAR) LEN(256) DFT(*NONE) + SPCVAL((*NONE '')) EXPR(*YES) + PROMPT('Name of e-mail recipient') ELEM TYPE(*CHAR) LEN(1) DFT(*PRI) SPCVAL((*PRI + '0') (*CC '1') (*BCC '2')) EXPR(*YES) + PROMPT('Recipient type') The parm WANTS apostrophes around the string because of the hyphen. Can this be fixed in the command source, or possible a command validator program? Eric DeLong Sally Beauty Company MIS-Project Manager (BSG) 940-898-7863 or ext. 1863
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.