Hello, I'm new on the list, but did you get it work?
I'm facing the same problems..
Hello. I assume you (as job owner) are in the System Distribution Directory, isnt'it ?
Sorry for silly note.
Sincerely
Domenico
-----Messaggio originale-----
Da: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] Per conto di francesco.venturini@xxxxxxxxx
Inviato: martedì 25 ottobre 2011 11.41
A: cobol400-l@xxxxxxxxxxxx
Oggetto: [COBOL400-L] API QtmsCreateSendEmail problem
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
Met vriendelijke groet,
Frans de Vries.
============================================================
F. de Vries | Detailresult Groep N.V. | Leeghwaterweg 11 - 1951 NA Velsen-Noord | Postbus 86 - 1940 AB Beverwijk
Bedrijfsondersteunende systemen & Rapportage | Detailresult ICT | tel: +31 (0)251-264183 |
www.Dirk.nl<
http://www.dirk.nl/> I www.Dekamarkt.nl<
http://www.dekamarkt.nl/> I www.Detailresult.nl<
http://www.detailresult.nl/> I e-mail: fdvries@xxxxxxxxxxxxxxx<mailto:fdvries@xxxxxxxxxxxxxxx>
As an Amazon Associate we earn from qualifying purchases.