[NEWSboard IBMi Forum]
  1. #1
    Registriert seit
    May 2004
    Beiträge
    184

    InfoPrintServer ändern Empfänger

    Hallo Kollegen,

    gibt es eine Möglichkeit den Mail-Empfänger als Parameter an den InfoPrintServer zu übergeben.

    Danke im Voraus
    Jenne

  2. #2
    Registriert seit
    Sep 2004
    Beiträge
    142
    Hallo Jenne

    Dies ist mit einem Mapping Program möglich. Hiermit können auch weitere Parameter (wie Name des PDFs) mitgegeben werden. Wenn gewünscht helfe ich gerne mit Details

    Gruss

    Jan

  3. #3
    Registriert seit
    May 2004
    Beiträge
    184
    Hallo Jan,

    es war toll wenn Du mir diesbezüglich die Information zu kommen lassen könntest.


    Gruß
    Jenne

  4. #4
    Registriert seit
    Sep 2004
    Beiträge
    142
    Hallo Jenne


    Wir haben eine Datei (gilfrel0) ins QUSRSYS gestellt, in der wir alle die gewünschten Attributen des Mails (Empfänger, cc, bcc, reply to, Betreff, Name des PDFs etc.) hineinstellen. Der Schlüssel ist eine eindeutige Identifikation des Spoolfiles, das gemailt werden soll.


    Das Spoolfile wird im Attribute USRDFNDTA mit einem MAILTAG versehen, in dem der eindeutige SpoolID mitgegeben wird. Das Spoolfile wird in einem speziellen Outqueue gestellt. In der Device-Description des Einheiten, zu dem die Outqueue gehört ist ein Hinweis auf einen PSF-Objekt. In diesem PSF-Objekt ist weiter ein Hinweis auf das Mapping Program, das dann vom InfoprintServer während der Umwandlung des Spoolfiles in einem PDF aufgerufen wird.


    Das Mapping Program kommt hier:


    Code:
         H DEBUG DATEDIT(*DMY.)
          ********************************************************************
          * SYSTEM ......:    i5
          * APPLIKATION .:    G I S A
          * BEREICH .....:    GFG / FORMULARE
          *-------------------------------------------------------------------
          * NAME ........:    G F G E M 0 3
          * FUNKTION ....:    PROGRAMM FUER EMAIL-FUNKTION,
          *                   PDF MAPPING PROGRAM GFGEM03
          *                   *** Email-Modul Version 2 - NUR ab V5.3 ***
          * ERSTELLER ...:    JGV/WEMAG
          * DATUM .......:    21.09.04
          *-------------------------------------------------------------------
          * COPYRIGHT ...:    (C) BY WEMAG CONSULTING, KEHRSATZ
          ********************************************************************
          /EJECT
          ********************************************************************
          * AENDERUNG                                         ! DATUM    ! WER
          *-------------------------------------------------------------------
          * neu: attachements + directory files               ! 18.10.04 ! jgv
          * corr: initialise correct fields when filename pdf ! 08.11.04 ! jgv
          *       empty. Initialise fields when subject empty !          !
          * corr: length of pdf-name 120 bytes (not 116 bytes)! 14.09.07 ! jgv
          *       total length incl 'pdf' 124 bytes.          !          !
          * new   encryption/unable to change a document      ! 08.07.09 ! jgv
          **QQQQQQ************************************************************
         fgilfrel0  UF   E           K DISK
          *
         D wrkfields       DS
         d  wrkstring                   128a   varying
          *
         D INDS            DS
         D  JOBNAM                 1     26
         D  SPLFID                27     36
         D  SPLNO                 37     40B 0
         D  MAILTA                41    290
         D  MAILTK                41    100
         D  PDFFI1               291    546
         D  PDFFI2               547    630
         D  SVRTYP               631    631
         D  RES1                 632    632
         D  PCCSID               633    636B 0
         D  SENDER               637    646
         D  USRDTA               647    656
         D  SYSNAM               657    664
         D  TIMEST               665    672
         D  OUTQ                 673    682
         D  OUTQLI               683    692
          *
         D OUTDS           DS
         D  DISPOS                 1      1
         D  CALLAG                 2      2
         D  RES2                   3      4
         D  MSGLEN                 5      8B 0
         D  ADRRLE                 9     12B 0
         D  MSGTXT                13    267
         D  RES3                 268    268
         D  EXTOFF               269    272B 0
         D  CCSID                273    276B 0
         D  RES4                 277    287
         D  ADDRES               288    543
          *
         D  EXTLEN               544    547B 0
         D  SUBOFF               548    551B 0
         D  SUBLEN               552    555B 0
         D  RPLYOFF              556    559B 0
         D  RPLYLEN              560    563B 0
         D  CCOFF                564    567B 0
         D  CCLEN                568    571B 0
         D  BCCOFF               572    575B 0
         D  BCCLEN               576    579B 0
         D  bdypthoff            580    583B 0
         D  dirpthoff            584    587B 0
         D  dirpthlen            588    591B 0
         D  attpthoff            592    595B 0
          *    new for v5.3
         D  NEWPTHOFF            596    599B 0
         D  NEWPTHLEN            600    603B 0
         D  NEWOBJOFF            604    607B 0
         D  NEWOBJLEN            608    611B 0
         D  PUBAUTOFF            612    615B 0
         D  PUBAUTLEN            616    619B 0
         D  PDFQOFF              620    623B 0
         D  PDFQLEN              624    627B 0
         D  AFPQOFF              628    631B 0
         D  AFPQLEN              632    635B 0
         D  ENCRYPTOFF           636    639B 0
         D  ENCRYPTLEN           640    643B 0
          *
         D  EXTSUB               644    771
         D  EXTCC                772    831
         D  extbcc               832    891
         D  newobj               892   1015
         D  extreply            1016   1071
          * stream file format **body**
         D  bdylen              1076   1079B 0
         D  bdynum              1080   1083B 0
          * streamfile for body
         D  bdyx1               1084   1087B 0
         D  bdyy1               1088   1091B 0
         D  bdyoff1             1092   1095B 0
         D  bdyplen1            1096   1099B 0
         D  bdyuse1             1100   1100
         D  bdyres1             1101   1103  0
         D  bdypth1             1104   1223
          * path for files
         D  dirpth              1224   1343
          * stream file format  **attachement**
         D  attlen              1344   1347B 0
         D  attnum              1348   1351B 0
          * streamfile for attachement
         D  attx1               1352   1355B 0
         D  atty1               1356   1359B 0
         D  attoff1             1360   1363B 0
         D  attplen1            1364   1367B 0
         D  attuse1             1368   1368
         D  attres1             1369   1371  0
         D  attpth1             1372   1491
          * encryption
         D  PDFMasterPWD        1492   1523
         D  PDFUserPWD          1524   1555
         D  PDFPrint            1556   1556
         D  PDFDocChg           1557   1557
         D  PDFCopy             1558   1558
         D  PDFEncLvl           1559   1559
         D  PDFCntAccEna        1560   1560
         D  PDFChgCom           1561   1561
         D  PDFDocAss           1562   1562
          *
         D INLEN           DS             4
         D  BINLEN                 1      4B 0
         D OUTLEN          DS             4
         D  BOUTLE                 1      4B 0
         D OUTINF          DS             4
         D  BOUTIN                 1      4B 0
          /EJECT
          ********************************************************************
          * RECHEN-BESTIMMUNGEN / MAIN-LINE
          ********************************************************************
          *
         C     *ENTRY        PLIST
         C                   PARM                    INDS
         C                   PARM                    INLEN
         C                   PARM                    OUTDS
         C                   PARM                    OUTLEN
         C                   PARM                    OUTINF
          *
         C     ZWFIRS        IFEQ      *BLANK
         C                   EXSR      #IPGM
         C                   MOVE      '1'           ZWFIRS            1
         C                   ENDIF
         C                   Z-ADD     1562          BOUTIN
          *
         C     BOUTIN        IFLE      BOUTLE
          *
          *
         c     $GILF         KLIST
         c                   KFLD                    MAILTK
         c     $gilf         CHAIN     GILFREL0                           30
         c     *in30         ifeq      *off                                         found
          *
         C                   MOVE      '1'           DISPOS                         SEND THE MAIL
         C                   MOVE      '0'           CALLAG                         DON'T CALL AGAIN
         C                   eval      res2          = x'0000'                      X'0000'
          *
         c                   time                    zwtime           12 0
         c                   move      zwtime        zwtima           12
         c                   movel     zwtima        zwhms             6
         c                   move      zwtima        zwtmj             6
          * EMAIL-ADDRES
         C                   Z-ADD     256           ADRRLE                         LENGTH OF ADDRES
         c     zwhk          cat(p)    lftttx:0      addres                         mail-addres
         c                   cat       zwhk:0        addres
          * MESSAGE IN MAIL-BODY
         c                   Z-ADD     255           MSGLEN                         LENGTH OF MESSAGE
         c                   eval      msgtxt  = lfugtx
         C                   eval      res3          = x'00'
         C                   Z-ADD     543           EXTOFF                         EXTENSION OFFSET
         C                   Z-ADD     *ZERO         CCSID
         C                   Z-ADD     100           EXTLEN                         LEN OF EXT AREA FORM
         C                   eval      res4     = x'0000000000000000000000'         ALL X'00'
          * SUBJECT
         c     lfuhtx        ifeq      *blanks
         C                   eval      suboff = *zero                               OFFSET TO SUBJECT
         c                   eval      extsub = *blank                              subject
         c                   eval      sublen = *zero                               length og subject
         c                   else
         C                   eval      suboff = 643                                  offset to subject
         c                   eval      wrkstring = %trim(lfuhtx)
         c                   eval      extsub = wrkstring
         c                   eval      sublen = %len(wrkstring)
         c                   endif
          * cc
         c     lfuktx        ifeq      *blanks
         c                   eval      ccoff = 0                                    offset to cc
         c                   eval      cclen = 0                                    length of cc
         c                   eval      extcc = *blanks
         c                   else
         c                   eval      ccoff = 771                                  offset to cc
         c                   eval      wrkstring = %trim(lfuktx)
         c     zwhk          cat(p)    wrkstring:0   extcc                          mail-addres with '
         c                   cat       zwhk:0        extcc
         c                   eval      cclen = %len(wrkstring) + 2                  len of cc incl 2 '
         c                   endif
          * bcc
         c     lfultx        ifeq      *blanks
         c                   eval      bccoff = *zero                               offset to bcc
         c                   eval      bcclen = *zero                               length of bcc
         c                   eval      extbcc = *blanks
         c                   else
         c                   eval      bccoff = 831                                 offset to bcc
         c                   eval      wrkstring = %trim(lfultx)
         c     zwhk          cat(p)    wrkstring:0   extbcc                         mail-addres with '
         c                   cat       zwhk:0        extbcc
         c                   eval      bcclen = %len(wrkstring) + 2                 the two '
         c                   endif
          * reply-to
         c     lfujtx        ifeq      *blanks
         c                   eval      rplyoff = *zero                              offset to reply-to
         c                   eval      rplylen = *zero                              length of reply-tp
         c                   eval      extreply = *blanks
         c                   else
         c                   eval      rplyoff = 1015                                offset to reply-to
         c                   eval      wrkstring = %trim(lfujtx)
         c     zwhk          cat(p)    wrkstring:0   extreply                       mail-addres with '
         c                   cat       zwhk:0        extreply
         c                   eval      rplylen = %len(wrkstring) + 2                the two '
         c                   endif
          * name of pdf
         c     lfumtx        ifeq      *blanks
         c                   eval      newobjoff = *zero                            offset to pdf name
         c                   eval      newobjlen = *zero                            length of pdf name
         c                   eval      newobj = *blanks                             pdf name
         c                   else
         c                   eval      newobjoff = 891                              offset to new object
          /free
               wrkstring = %trim(lfumtx) + '.pdf';
               newobj = wrkstring;
               newobjlen = %len(wrkstring);               //length of new object
          /end-free
         c                   endif
          * set up path for files
         c     lfuntx        ifeq      *blanks
         c                   eval      dirpthoff =   *zero                          offset path dir-file
         c                   eval      dirpthlen =   *zero                          length path dir-file
         c                   eval      dirpth    =   *blanks                        directory files
         c                   else
         c                   eval      dirpthoff =   1223                           offset to path files
         c                   eval      wrkstring =   %trim(lfuntx)                  directory files
         c                   eval      dirpth    =   wrkstring                      directory files
         c                   eval      dirpthlen =   %len(wrkstring)                length path dir-file
         c                   endif
          * set up body file
         c     lfuptx        ifeq      *blanks
         c                   eval      bdypthoff =   *zero
         c                   eval      bdylen    =   *zero
          *
         c                   eval      bdynum    =   *zero
         c                   eval      bdyx1     =   *zero
         c                   eval      bdyy1     =   *zero
         c                   eval      bdyoff1   =   *zero
         c                   eval      bdyplen1  =   *zero
         c                   eval      bdyuse1   =   '0'
         c                   eval      bdyres1   =   x'000000'
         c                   eval      bdypth1   =   *blanks
         c                   else
         c                   eval      bdypthoff =   1075
         c                   eval      bdylen = 148
          *
         c                   eval      bdynum    =   1
         c                   eval      bdyx1     =   140
         c                   eval      bdyy1     =   20
         c                   eval      bdyoff1   =   20
         c                   eval      bdyuse1   =   lffgcd                         cde use path for fil
         c                   eval      bdyres1   =   x'000000'
         c                   eval      wrkstring = %trim(lfuptx)
         c                   eval      bdypth1 = wrkstring
         c                   eval      bdyplen1 = %len(wrkstring)                   len of body-filename
         c                   endif
          *
          * set up attachment file
         c     lfuotx        ifeq      *blanks
         c                   eval      attpthoff =   *zero
         c                   eval      attlen    =   *zero
          *
         c                   eval      attnum    =   *zero
         c                   eval      attx1     =   *zero
         c                   eval      atty1     =   *zero
         c                   eval      attoff1   =   *zero
         c                   eval      attplen1  =   *zero
         c                   eval      attuse1   =   '0'
         c                   eval      attres1   =   x'000000'
         c                   eval      attpth1   =   *blanks
         c                   else
         c                   eval      attpthoff =   1343
         c                   eval      attlen    =   148
          *
         c                   eval      attnum    =   1
         c                   eval      attx1     =   140
         c                   eval      atty1     =   20
         c                   eval      attoff1   =   20
         c                   eval      attuse1   =   lffgcd                         cde use path for fil
         c                   eval      attres1   =   x'000000'
         c                   eval      wrkstring = %trim(lfuotx)
         c                   eval      attpth1 = wrkstring
         c                   eval      attplen1  =  %len(wrkstring)
         c                   endif
          * encryption
          /free
               encryptoff = 1491;
               encryptlen = 71;
    
               PDFMasterPWD = *allX'00';
               PDFUserPWD   = *allX'00';
               PDFPrint     = '1';
               PDFDocChg    = '0';
               PDFCopy      = '1';
               PDFEncLvl    = '1';
               PDFCntAccEna = '1';
               PDFChgCom    = '0';
               PDFDocAss    = '0';
          /end-free
          *
         c                   move      zwhms         lfactm
         c                   move      zwtmj         lfcpdt
          *
         c                   update    @lfrelo
          * not used offsets (at least up till now)
         C                   Z-ADD     *zero         newpthoff
         C                   Z-ADD     *zero         newpthlen
         C                   Z-ADD     *zero         pubautoff
         C                   Z-ADD     *zero         pubautlen
         C                   Z-ADD     *zero         pdfqoff
         C                   Z-ADD     *zero         pdfqlen
         C                   Z-ADD     *zero         afpqoff
         C                   Z-ADD     *zero         afpqlen
          *******            Z-ADD     *zero         encryptoff
          *********          Z-ADD     *zero         encryptlen
         c                   endif
          *
         C                   ENDIF
          *
         C                   MOVE      *ON           *INLR
          /EJECT
          ********************************************************************
          *  INITIALISIERUNG PROGRAMM
          ********************************************************************
         C     #IPGM         BEGSR
          *-------------------------------------------------------------------
          *
         C                   MOVE      ''''          ZWHK              1            HOCH-KOMMA
         C                   BITON     '01234567'    ZWHXFF            1            X'FF'
         C                   BITOFF    '01234567'    ZWHX00            1            X'00'
          *-------------------------------------------------------------------
         C                   ENDSR                                                  #IPGM
          ********************************************************************

    Voraussetzung für das Ganze ist mindestens V5.3 des i5/OS.


    Eine ausführliche Beschreibung findest Du im User's Guide des InforprintServers (G544-5775-03)



    Gruss


    Jan

  5. #5
    Registriert seit
    May 2004
    Beiträge
    184
    Danke Jan,

    ich teste es einmal.


    Gruß
    Jenne

  6. #6
    Registriert seit
    May 2004
    Beiträge
    184
    Hallo Jan,

    könntest Du mir noch die Datensatzbeschreibung Deiner Datei
    (gilfrel0) zukommen lassen?

    Gruß
    Jenne

  7. #7
    Registriert seit
    Sep 2004
    Beiträge
    142
    Hallo Jenne

    gilfrel0 ist eine LF-Datei auf folgenden PF:

    Code:
         /*T: E-Mail-Kontroll-Datei     Physische Datei
         Z* CRTPF
          *
         H* Generated by  : SYNON/2  Version:  1058
         H* Company       : GISA/400-WEMAG Consulting, Köniz
         H* System        : GISA
         H* User name     : WEMAG
         H* Date          : 29.09.04  Time  : 13:50:48
         H* Copyright     : GISA/400-WEMAG Consulting, Köniz
         H*
         A*=====================================================================
         M* Maintenance   :
         A*=====================================================================
         A          R @LFRELN                   TEXT('E-Mail-Kontroll-Datei')
         A*---------------------------------------------------------------------
         A            LFJJCD        60          TEXT('Schlüsselfeld 1')
         A                                      COLHDG('Schlüsselfeld 1' )
         A            LFY5CD        10          TEXT('Spool Name')
         A                                      COLHDG('Spool Name' )
         A            LFUETX         6          TEXT('Spool-Nummer')
         A                                      COLHDG('Spool-Nummer' )
         A            LFUFTX        26          TEXT('Job-ID')
         A                                      COLHDG('Job-ID' )
         A            LFSGCD        10          TEXT('Benutzer Erfassung')
         A                                      COLHDG('Benutzer' +
         A                                             'Erfassung' )
         A            LFAPDT         7  0       TEXT('Datum Erfassung')
         A                                      COLHDG('Datum' +
         A                                             'Erfassung' )
         A                                      EDTWRD('   .  .  ')
         A            LFAATM         6  0       TEXT('Zeit Erfassung         /A')
         A                                      COLHDG('Zeit Erfassung' +
         A                                             '        /A' )
         A                                      EDTWRD('  :  :  ')
         A            LFTTTX        60          TEXT('E-Mail')
         A                                      COLHDG('E-Mail' )
         A            LFUGTX       255          TEXT('Message')
         A                                      COLHDG('Message' )
         A            LFUHTX       128          TEXT('Subject')
         A                                      COLHDG('Subject' )
         A            LFCPDT         7  0       TEXT('Datum Übermittlung *VRB')
         A                                      COLHDG('Datum' +
         A                                             'Übermittlung *VRB' )
         A                                      EDTWRD('   .  .  ')
         A            LFACTM         6  0       TEXT('Zeit Transaktion       /A')
         A                                      COLHDG('Zeit Transaktion' +
         A                                             '      /A' )
         A                                      EDTWRD('  :  :  ')
         A            LFABCD         1          TEXT('Code Status')
         A                                      COLHDG('Code' +
         A                                             'Status' )
         A                                      DFT(' ')
         A            LFUJTX        60          TEXT('E-Mail Antwort-Adresse')
         A                                      COLHDG('E-Mail' +
         A                                             'Antwort-Adresse' )
         A            LFUKTX        60          TEXT('E-Mail Adresse CC')
         A                                      COLHDG('E-Mail Adresse CC' )
         A            LFULTX        60          TEXT('E-Mail Adresse BCC')
         A                                      COLHDG('E-Mail Adresse BCC' )
         A            LFUMTX       120          TEXT('Name PDF-File (ohne pdf)')
         A                                      COLHDG('Name PDF-File' +
         A                                             '(ohne pdf)' )
         A            LFUNTX       120          TEXT('Pfad für Files')
         A                                      COLHDG('Pfad für Files' )
         A            LFUOTX       120          TEXT('Zusätzliche Attachment')
         A                                      COLHDG('Zusätzliche' +
         A                                             'Attachment' )
         A            LFFGCD         1          TEXT('Code Pfad-für-Files verw.')
         A                                      COLHDG('Code Pfad-für-Files' +
         A                                             'verw.' )
         A            LFUPTX       120          TEXT('Name File für Mailbody')
         A                                      COLHDG('Name File' +
         A                                             'für Mailbody' )
         A            LFY8CD        10          TEXT('Benutzer Übermittlung')
         A                                      COLHDG('Benutzer' +
         A                                             'Übermittlung' )
         A*=====================================================================
    Gruss

    Jan

  8. #8
    Registriert seit
    May 2004
    Beiträge
    184
    Hallo Jan,

    leider bin ich zu blind und finde in meiner *PSFCFG nicht den PARAMETER für das Mapping Programm. Könntest Du mir bitte den Parameter nennen. PDFMAP kann es nicht sein, denn dann startet sich meine Ausgeabeprogramm nicht.

    Gruß
    jenne

  9. #9
    Registriert seit
    Sep 2004
    Beiträge
    142
    Hallo Jenne

    Attribut PDFGEN muss auf *MAIL stehen. Dann erscheint auch PDFMAPPGM. Hier müssen dann das Programm und die Bibliothek angegeben werden.

    Gruss

    Jan

  10. #10
    Registriert seit
    May 2004
    Beiträge
    184
    Hallo Jan,

    jetzt habe ich soweit alles zum laufen gebracht. Wenn ich jetzt eine Liste erzeuge, bekommt diese gleich den Status Hold. Die Fehlermeldung sagt aus, das das Programm Fehlermeldung zurückgibt. Wahrscheinlich habe die Felder in der Datei nicht richtig gefüllt. Könntest Du mir bitte einmal mitteilen, was in den einzelnen Felder stehen muss.

    Meine Fehlermedlung ist :
    Falscher Wert für Disposition der PDF-E-Mail

    Danke für Deine Verständnis
    Jenne

  11. #11
    Registriert seit
    Sep 2004
    Beiträge
    142
    Hallo Jenne,

    Im Mapping Program siehst Du, was mit den einzelnen Feldern passiert. Kombiniert mit den Hinweisen im User's Guide sollte im Detail ersichtlich sein, welchen Inhalt in den Feldern erwartet wird.

    Wenn der PrinterWriter gestartet ist, findest Du im Subsystem QSPL 3 Jobs, die dazugehören. Wenn Du für diese drei Jobs das Attribut LOG in "4 00 *seclvl" änderst, ist eventuell in den drei Joblogs ersichtlich, welchen Fehler passiert.

    Gruss

    Jan

Similar Threads

  1. InfoPrintServer
    By pebu in forum NEWSboard Drucker
    Antworten: 1
    Letzter Beitrag: 02-12-08, 06:21
  2. InfoprintServer lässt sich nicht starten - IPS2211
    By Lisa in forum IBM i Hauptforum
    Antworten: 5
    Letzter Beitrag: 07-08-08, 16:07
  3. Journalempfänger sichern
    By bie-dro in forum IBM i Hauptforum
    Antworten: 3
    Letzter Beitrag: 22-01-08, 14:37
  4. InfoprintServer
    By Jenne in forum NEWSboard Drucker
    Antworten: 2
    Letzter Beitrag: 30-10-07, 07:26
  5. InfoPrint Server
    By muadeep in forum IBM i Hauptforum
    Antworten: 3
    Letzter Beitrag: 12-07-04, 15:17

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • You may not post attachments
  • You may not edit your posts
  •