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



Hi everybody,
i'm trying to use QtmsCreateSendEmail API but IBM documentation is
completely unusefull and can't find help over the internet.
Now my COBOL program doesn't return any error, specificately it returns
the Error Code field as blank value and the job log doesn't record
nothing.
So i'm interpreting my program works fine but email doesn't arrive.
So what's wrong ? Any help for logging or something else ?
I pasted my code following.
Thanks in advance.


WORKING-STORAGE SECTION.
*--- Parametri chiamata 'QtmsCreateSendEmail'.
01 QMTS-RECIPIENT-ARRAY.
03 QMTS-RA-CCSID PIC S9(009) BINARY.
03 QMTS-RA-RECIPIENT-TYPE PIC S9(009) BINARY.
03 QMTS-RA-OFFSET PIC S9(009) BINARY.
03 QMTS-RA-LENGTH PIC S9(009) BINARY.
03 QMTS-RA-RECIPIENT-ADDRESS PIC X(200).
01 QMTS-NUMBER-OF-RECIPIENTS PIC S9(009) BINARY.
01 QMTS-F-NAME-OF-RECIPIENTS PIC X(008).
01 QMTS-NOTE.
03 QMTS-N-INPUT-CCSID PIC S9(009) BINARY.
03 QMTS-N-OFFSET-TO-PASSWORD PIC S9(009) BINARY.
03 QMTS-N-LENGTH-OF-PASSWORD PIC S9(009) BINARY.
03 QMTS-N-OFFSET-TO-SUBJECT PIC S9(009) BINARY.
03 QMTS-N-LENGTH-OF-SUBJECT PIC S9(009) BINARY.
03 QMTS-N-OFFSET-TO-NOTE PIC S9(009) BINARY.
03 QMTS-N-LENGTH-OF-NOTE PIC S9(009) BINARY.
03 QMTS-N-NOTE-SECURITY-LEVEL PIC S9(009) BINARY.
03 QMTS-N-NOTE-CONTENT-TYPE PIC S9(009) BINARY.
03 QMTS-N-PASSWORD-SUBJECT-NOTE PIC X(200).
01 QMTS-F-NAME-OF-NOTE PIC X(008).
01 QMTS-ATTACHMENT-ARRAY.
03 QMTS-AA-INPUT-CCSID PIC S9(009) BINARY.
03 QMTS-AA-OFFSET-TO-FILE-NAME PIC S9(009) BINARY.
03 QMTS-AA-LENGTH-TO-FILE-NAME PIC S9(009) BINARY.
03 QMTS-AA-CONTENT-TYPE PIC S9(009) BINARY.
03 QMTS-AA-FILE-NAME PIC X(200).
01 QMTS-NUMBER-OF-ATTACHMENTS PIC S9(009) BINARY.
01 QMTS-F-NAME-OF-ATTACHMENTS PIC X(008).
01 QMTS-ERROR-CODE PIC X(200).
*----------------------------------------------------------------------*
LINKAGE SECTION.
*======================================================================*
PROCEDURE DIVISION.
A01-MAIN.
*--- Recipient Array.
INITIALIZE QMTS-RECIPIENT-ARRAY.
MOVE 1140 TO QMTS-RA-CCSID.
MOVE 0 TO QMTS-RA-RECIPIENT-TYPE.
MOVE 16 TO QMTS-RA-OFFSET.
MOVE 29 TO QMTS-RA-LENGTH.
MOVE 'francesco.venturini@xxxxxxxxx'
TO QMTS-RA-RECIPIENT-ADDRESS.
MOVE 1 TO QMTS-NUMBER-OF-RECIPIENTS.
MOVE 'RCPT0100' TO QMTS-F-NAME-OF-RECIPIENTS.

*--- Note.
INITIALIZE QMTS-NOTE.
MOVE 1140 TO QMTS-N-INPUT-CCSID.
MOVE 0 TO QMTS-N-OFFSET-TO-PASSWORD.
MOVE 0 TO QMTS-N-LENGTH-OF-PASSWORD.
MOVE 36 TO QMTS-N-OFFSET-TO-SUBJECT.
MOVE 7 TO QMTS-N-LENGTH-OF-SUBJECT.
MOVE 43 TO QMTS-N-OFFSET-TO-NOTE.
MOVE 4 TO QMTS-N-LENGTH-OF-NOTE.
MOVE 0 TO QMTS-N-NOTE-SECURITY-LEVEL.
MOVE 0 TO QMTS-N-NOTE-CONTENT-TYPE.
MOVE 'subjectnote' TO
QMTS-N-PASSWORD-SUBJECT-NOTE.
MOVE 'NOTE0100' TO QMTS-F-NAME-OF-NOTE.

*--- Attachments Array.
INITIALIZE QMTS-ATTACHMENT-ARRAY.
MOVE LOW-VALUE TO QMTS-ATTACHMENT-ARRAY.
MOVE 0 TO QMTS-NUMBER-OF-ATTACHMENTS.
MOVE LOW-VALUE TO QMTS-F-NAME-OF-ATTACHMENTS.

*--- Error.
INITIALIZE QMTS-ERROR-CODE.

CALL PROCEDURE 'QtmsCreateSendEmail'
USING QMTS-RECIPIENT-ARRAY
QMTS-NUMBER-OF-RECIPIENTS
QMTS-F-NAME-OF-RECIPIENTS
QMTS-NOTE
QMTS-F-NAME-OF-NOTE
QMTS-ATTACHMENT-ARRAY
QMTS-NUMBER-OF-ATTACHMENTS
QMTS-F-NAME-OF-ATTACHMENTS
QMTS-ERROR-CODE.

A01-FINE.
GOBACK.

---------------------------------------------------
Francesco Venturini
OCS
Via Sorbanella, 24
25125 - Brescia
Tel. +39 030 210411
Fax. +39 030 2104500
e-mail francesco.venturini@xxxxxxxxx

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.