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



Hello,

In your first loop, in your CHGVAR command, you forgot to put "&MSG *CAT" at the beginning of the VALUE parameter.

As for &P and &N, I know that we can use them in the text of a message in a message file. But I don't know if the ESNDMAIL command understand them.


Denis Robitaille
Chef de service TI - Solution d'entreprise
Infrastructure et opérations

CASCADES CENTRE DES TECHNOLOGIES
412 Marie Victorin
Kingsey falls(Québec) Canada J0A 1B0
Tél : 819 363 6100 Poste :52130
Cell : 819 352 9362


-----Message d'origine-----
De : MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de MichaelLange@xxxxxxxxxx
Envoyé : 21 février 2018 13:25
À : midrange-l@xxxxxxxxxxxx
Objet : Reading files in CLP for email msg output



System 7.2


I need to create an email msg from 3 files to be distributed to various people.
Never done this sort of thing before.
The info from the 3 files need to be in the same msg body.
It seems that each read wipes out the previous info instead of adding to the MSG.
Also what is the significance of &P and &N, is this new paragraph and new line?

My current test code is...
DCLF FILE(SAB16AW) RCDFMT(*ALL) OPNID(A)
DCLF FILE(SAB16BW) RCDFMT(*ALL) OPNID(B)
DCLF FILE(SAB16CW) RCDFMT(*ALL) OPNID(C)
DCL VAR(&MSG) TYPE(*CHAR) LEN(2000)
DCL VAR(&DATE8C) TYPE(*CHAR) LEN(8)
CHGVAR VAR(&MSG) VALUE('Daily performance for ' *CAT
&DATE8C *CAT '&P ')
LOOP1: RCVF RCDFMT(SAB16SR) OPNID(A)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(LOOP2))
CHGVAR VAR(&MSG) VALUE('&N ' *CAT &A_SRCDE *CAT %CHAR(
&A_DLYRCV) *CAT +
%CHAR(&A_MTDRCV) *CAT %CHAR(&A_MTDSLT) *TCAT '%'
*CAT +
%CHAR(&A_MTHDIF) *CAT %CHAR(&A_YTDRCV) *CAT %CHAR
(&A_YTDSLT) *TCAT +
'%')
GOTO CMDLBL(LOOP1)
LOOP2: RCVF RCDFMT(SAB16DR) OPNID(B)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(LOOP3))
CHGVAR VAR(&MSG) VALUE(&MSG *CAT '&N ' *CAT &B_DIVN *CAT
%CHAR(&B_DIVD$) *CAT +
%CHAR(&B_DIVM$) *CAT %CHAR(&B_DMTDST) *TCAT '%'
*CAT %CHAR(&B_DMTHD) +
*CAT %CHAR(&B_DYTDRC) *CAT %CHAR(&B_DYTDST) *TCAT
'%')
GOTO CMDLBL(LOOP2)
LOOP3: RCVF RCDFMT(SAB16HR) OPNID(C)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EMAIL))
CHGVAR VAR(&MSG) VALUE(&MSG *CAT '&N ' *CAT &C_HSLDTO *CAT
&C_HSTNAM *CAT &C_HTAG +
*CAT %CHAR(&C_HNET$$) *CAT %CHAR(&C_HORDER#) *CAT
%CHAR(&C_HOENTD))
GOTO CMDLBL(LOOP3)
/**************************************/
/* Email */
/**************************************/
EMAIL:
ESEND/ESNDMAIL RECIPIENT(MICHAELLANGE@xxxxxxxxxx) SUBJECT(
'SAB16C: Daily VIS +
email') MSG(&MSG)





Regards
Michael Lange
Loewen WindowsThis e-mail message, including any attachments, is for the sole use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments. Loewen makes no warranty that this e-mail is error or virus free.
Please think green before printing this email.
--
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: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.