SUBROUTINE KMK.FMTMAIL(f.dict,id,rec,parms,width,etid,message,error_flag,error_message)
This subroutine formats an email message.
f.dict |
File pointer to where dictionaries reside. |
id |
Item-id of current data record (needed for substitutions). |
rec |
The current data record (needed for substitutions). |
parms |
Dynamic substitution parameters value-mark delimited. |
width |
Width of the output. |
etid |
Item-id of KT_EMAIL_TEMPLATE item or null. |
message |
Undefined if ETID is non-null otherwise contains the contents of the message in standard DW substitution format. |
error_flag |
Undefined. |
error_message |
Undefined. |
f.dict |
Unchanged. |
id |
Unchanged. |
rec |
Unchanged. |
parms |
Unchanged. |
width |
Unchanged. |
etid |
Unchanged. |
message |
Contains the email message with substitutions performed. |
error_flag |
If non-null, message number to issue. |
error_message |
Parameters required by the message. |
- CALL HW.OPEN('DICT CUSTOMER',FD.CUST,OFLAG,1)
- CALL HW.OPEN('CUSTOMER',F.CUST,OFLAG,1)
- ID = '1000'
- READ CUST FROM F.CUST, ID ELSE STOP
- PARMS = '' ;* No Program Values
- WIDTH = '' ;* Use Default Width
- ETID = 'MSO-001' ;* Email Template ID
- CALL KMK.FMTMAIL(FD.CUST,ID,CUST,PARMS,WIDTH,ETID,MSG,ERRNO,ERRMSG)
- IF ERRNO THEN PRINT ERRMSG