IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

ODS et reporting Discussion :

envoyer des mails avec piece jointe / SAS v9.1


Sujet :

ODS et reporting

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    26
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 26
    Points : 21
    Points
    21
    Par défaut envoyer des mails avec piece jointe / SAS v9.1
    Bonjour à tous,

    j'utilise un code qui est senser tourner, mais une ligne ne passe pas.
    Voici mon code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
     
    proc sql;
         CREATE TABLE MAIL (adress char(50),file char(100)); 
     
         INSERT INTO MAIL (adress, file)
    	VALUES ("toto@toto.com","D:\toto\toto.xls");
    quit;
     
    filename reports email "toto@toto.com";
     
    data _null_ ; 
         file reports;
         length adress $ 30 file $ 100;
         set mail;
         put '!EM_TO!' adress;
         put '!EM_SUBJECT! Report for ' file;
         put adress ',';
         put 'Report for ' file '.';
         put '!EM_ATTACH! ('file') ';
         put '!EM_SEND!';
         put '!EM_NEWMSG!';
         put '!EM_ABORT!';
    run;
    Voici ma log :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
     
    NOTE: (E9BX04) SAS 9.1.3 SP 4
     
    NOTE: SAS Initialization used (Total process time):
          real time           0.01 seconds
          cpu time            0.01 seconds
     
     
    1        !   proc sql;
    2        CREATE TABLE MAIL (adress char(50),	file char(100));
    NOTE: Table WORK.MAIL created, with 0 rows and 2 columns.
    3          
    4        INSERT INTO MAIL (adress, file)
    5        VALUES ("toto@toto.com","D:\toto\toto.xls");
    NOTE: 1 row was inserted into WORK.MAIL.
    6        quit;
    NOTE: PROCEDURE SQL used (Total process time):
          real time           0.01 seconds
          cpu time            0.01 seconds
     
     
    7          
    8       filename reports email "toto@toto.com";
    9          
    10         		
    10       !   data _null_ ;
    11         	file reports;
    12         	length adress $ 30 file $ 100;
    13         	set mail;
    14         	put '!EM_TO!' adress;
    15         	put '!EM_SUBJECT! Report for ' file;
    16         	put adress ',';
    17         	put 'Report for ' file '.';
    18         	put '!EM_ATTACH! ('file') ';
                        49
    NOTE 49-169: The meaning of an identifier after a quoted string may change
    in a future SAS release.  Inserting white space between a quoted string and
    the succeeding identifier is recommended.
     
    19         	put '!EM_SEND!';
    20         	put '!EM_NEWMSG!';
    21         	put '!EM_ABORT!';
    22         	run;
     
    NOTE: The file REPORTS is:
          E-Mail Access Device
     
    ERROR: Invalid value for the !EM_ATTACH option.
    FATAL: Unrecoverable I/O error detected in the execution of the data step program.  Aborted during the EXECUTION phase.
    Message sent
          To:          'toto@toto.com
          Cc:          
          Bcc:         
          Subject:     Report for D:\toto\toto.xls
          Attachments: 
    NOTE: 4 records were written to the file REPORTS.
          The minimum record length was 31.
          The maximum record length was 78.
    NOTE: The SAS System stopped processing this step because of errors.
    NOTE: There were 1 observations read from the data set WORK.MAIL.
    NOTE: DATA statement used (Total process time):
          real time           0.03 seconds
    1           The SAS System 
                18:31 Monday, May 3, 2010
     
          cpu time            0.01 seconds
    J'ai beau chercher sur le net.....je ne pense pas m'en sortir sans aide.

    Merci à tous.

  2. #2
    Rédacteur

    Homme Profil pro
    SAS ALLIANCE SILVER. Consultant et formateur SAS et Cognos.
    Inscrit en
    Avril 2009
    Messages
    2 497
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : SAS ALLIANCE SILVER. Consultant et formateur SAS et Cognos.
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2009
    Messages : 2 497
    Points : 6 064
    Points
    6 064

Discussions similaires

  1. Workflow pour envoyer mail avec piece jointe
    Par zeanlou dans le forum SAGE
    Réponses: 2
    Dernier message: 24/10/2013, 09h17
  2. Réponses: 11
    Dernier message: 07/02/2011, 10h07
  3. [Mail] Envoyer un mail avec piece jointe
    Par Seb33300 dans le forum Langage
    Réponses: 3
    Dernier message: 22/04/2009, 16h39
  4. Envoyer mail avec piece jointe par outlook
    Par skunkies dans le forum Windows Forms
    Réponses: 6
    Dernier message: 18/11/2008, 01h09
  5. [Mail] je veux envoyer un mail avec Piece Jointe en php
    Par hanafimohammed dans le forum Langage
    Réponses: 2
    Dernier message: 20/04/2007, 17h07

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo