Page 1 of 1

SendEmail task message variable truncation

Posted: Thu Jun 12, 2014 10:59 am
by rarogerson
Hello, in my program I have
Code: Select all
D message_Vr      s             48a   inz('Message')   
D message_Name    s          32768a   inz(*blanks)     
and later in the program I set the message_Name
Code: Select all
Message_Name =                                                           
  'The following shuttle item had a negative margin.</br></br>' +        
  '<table style="font-weight: bold; color: #006699;">' +                 
    '<tr><td>Buyer:</td>' +                                              
         '<td>' + %editc(i_RcvDta.Ds_Buyer: 'X') + ' - ' +               
                     i_RcvDta.Ds_BuyerName + '</td>' +                   
    '</tr><tr><td>PO#:</td>' +                                           
              '<td>' + %editc(i_PO#: 'X') + '</td>' +                    
    '</tr><tr><td>Received:</td>' +                                      
              '<td>' + %char(i_RcvDta.Ds_RcvDate: *mdy) + '</td>' +      
    '</tr><tr><td>From Warehouse:</td>' +                                
              '<td>' + %char(i_RcvDta.Ds_Warehouse) + '</td>' +          
    '</tr><tr><td>To Warehouse:</td>' +                                  
              '<td>' + %char(i_RcvDta.Ds_Dest) + '</td>' +               
    '</tr><tr><td>Item:</td>' +                                          
              '<td>' + %char(i_RcvDta.Ds_Item#) + '</td>' +              
    '</tr><tr><td>Shipped:</td>' +                                       
              '<td>' + %editc(i_RcvDta.Ds_Shipped: 'J') + '</td>' +      
    '</tr><tr><td>Received:</td>' +                                      
              '<td>' + %editc(i_RcvDta.Ds_Received: 'J')+ '</td>' +      
    '</tr><tr><td>Transfer:</td>' +                                      
              '<td>' + %editc(i_Transfer: 'J') + '</td>' +               
    '</tr><tr><td>Retail:</td>' +                                        
              '<td>' + %editc(i_CaseRetail: 'J') + '</td>' +             
    '</tr><tr><td>Margin:</td>' +                                        
              '<td>' + %editc(i_Margin: 'J') + '</td></tr></table>';     
When I run the project it sends the email, but the body is truncated to
The following shuttle item had a negative margin.</br></br><table style="font-weight: bold; color: #006699;"><tr><td>Buyer:</td><td>093 - LORI KUNKLE </td></tr><tr><td>PO#:</td><td>0448921</td></tr><tr><td>Received:</td><td>04/03/14</td></tr><tr><t
Any idea why it's truncating the message_Name field?

Thanks,

Rob

Re: SendEmail task message variable truncation

Posted: Thu Jun 12, 2014 2:33 pm
by Support_Jon
Rob,

Which procedure are you using in your code? Also, could you provide more details about your program or the code?

It is possible you have either run out of bytes with your variable, or perhaps may be using the wrong procedure.

More details can help us better assist you.

Thanks - Jon

Re: SendEmail task message variable truncation

Posted: Thu Jun 12, 2014 7:25 pm
by rarogerson
Thanks Jon, I was calling RUNPROJECT rather than RUNPROJECT3. I knew it was something simple.

Rob