× 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.



The point is that it should look like ""SBMJOB CMD(CALL PGM(BATCHEMAIL)
PARM(' me@xxxxxxxxxxxxxxxxxx' 'me@xxxxxxxxxxxxxxxxxx' ' ' ' ' 'My Subject'
'My body') JOB(SNDEMAIL)"

I want to remove the spaces to cut down the size. And I am getting an error
message saying it can't find the matching parenthesis.

On 10/13/06, rob@xxxxxxxxx <rob@xxxxxxxxx> wrote:

Do you see the "JOB(SNDEMAIL)"?  Before, or after, the large group of
spaces?  If before then what is probably happening is that debug is
showing you the entire field of cmd at the maximum length and wrapping "
around it, and, the " are not really part of the variable.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





Mike <koldark@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/13/2006 11:12 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
%trim and %trimr Not Working on a 32767A Field






Just as the subject says. I am wring a subproceedure that can take in any
length of field. I am trying to trim down the field to the proper size,
but
it isn't. Here is the code:

     P SendBatchEmail  B                   EXPORT
     D SendBatchEmail  PI
     D  fromAddress                 100A   CONST
     D                                     OPTIONS(*VARSIZE)
     D  toAddress                 32767A   CONST
     D                                     OPTIONS(*VARSIZE)
     D  ccAddress                 32767A   CONST
     D                                     OPTIONS(*VARSIZE)
     D  bccAddress                32767A   CONST
     D                                     OPTIONS(*VARSIZE)
     D  subject                   32767A   CONST
     D                                     OPTIONS(*VARSIZE)
     D  body                      32767A   CONST
     D                                     OPTIONS(*VARSIZE)

      /free

        cmd = 'SBMJOB CMD(CALL PGM(BATCHEMAIL) ' +
              'PARM(''' + %trim(fromAddress) + ''' ''' +
                          %trim(toAddress) + ''' ''' +
                          %trim(ccAddress) + ''' ''' +
                          %trim(bccAddress) + ''' ''' +
                          %trim(subject) + ''' ''' +
                          %trim(body) + ''') JOB(SNDEMAIL)';

        ExecClCmd(cmd);

      /end-free
     P SendBatchEmail  E

After the assignment to cmd, it contains "SBMJOB CMD(CALL PGM(BATCHEMAIL)
PARM('me@xxxxxxxxxxxxxxxxxx' 'me@xxxxxxxxxxxxxxxxxx
..." A ton of spaces and no ending quote mark. Any ideas? I am sure I am
doing something stupid, I just can't see it.

--
Mike Wills
Blog - http://mikewills.name
Podcasts - http://theriverbendpodcast.com
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.