|
I'm fairly certain that the ADDRESSEE command parameter type is the cause of your problem, as explained in the error text "EXPR(*YES)" - you need to review the specification of that PARM statement in the command source; even if it is not EXPR(*YES), the odds are something here is the problem. The technique I use in these circumstances is to use EXPR(*NO), do all the string manipulation in a separate work field, including a single quote at the start & end of string, then pass the field into the command. The '-' sign is not the only character that can cause problems like this, classics are spaces and the single quote character. Kind regards, Jeffrey E. Bull OS400 Software Support Consultant IBM Certified Systems Expert, iSeries Technical Solutions IBM Certified Systems Specialist, AS/400 System Administration * +44 [0] 149 454 9533 swb. +44 [0] 149 454 9400 mbl. +44 [0] 786 750 4961 fax. +44 [0] 149 454 9454 web. http://www.itm-group.co.uk ITM Group Ltd, Latimer Square, White Lion Road, Amersham, Buckinghamshire, HP7 9JQ, United Kingdom -----Original Message----- From: DeLong, Eric [mailto:EDeLong@xxxxxxxxxxxxxxx] Sent: 16 January 2004 23:22 To: 'midrange-l@xxxxxxxxxxxx' Subject: CMD prompt question 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 _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. ________________________________________________________________________ This e-mail has been scanned for all viruses by ITM. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, email marketing@xxxxxxxxxxxxxxx ITM - Managing Communication and Information through technology Company registration number - 3783433 ________________________________________________________________________ DISCLAIMER Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. If you have received this email in error please notify the IT manager by telephone on +44 (0)870 871 2233 or via email to Administrator@xxxxxxxxxxxxxxx, including a copy of this message. Please then delete this email and destroy any copies of it. ________________________________________________________________________This e-mail has been scanned for all viruses by ITM. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, email marketing@xxxxxxxxxxxxxxx ITM - Managing Communication and Information through technology Company registration number - 3783433________________________________________________________________________
As an Amazon Associate we earn from qualifying purchases.
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.