1

I need to send a mail to the user that the job which is submitted has ended in error, for this how should i retrieve/fetch the email id of the user?

Nicolas
  • 45
  • 1
  • 5

1 Answers1

2

If you have defined the users email in the System Distribution Directory then you can retrieve the email with this RPG code:

chain User_Name qaokl02a;                                  
if %found;                                                 
  chain (wos1dden : machine) qatmsmtpa;                    
  if %found;                                               
    domroute = %xlate(up : lo : domroute);                 
    emailaddress = %trim(smtpuid) + '@' + %trim(domroute); 
  endif;
endif;                                                       
Scott Mildenberger
  • 1,456
  • 8
  • 17