<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DCL code for setting mail forwarding in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955530#M33372</link>
    <description>The continuation character doesn't work when in the MAIL utility, so I've had to keep the command to one line. &lt;BR /&gt;&lt;BR /&gt;The following code works:&lt;BR /&gt;(username and full_name are defined previously in the procedure.)&lt;BR /&gt;&lt;BR /&gt;$ internet_name= F$element(0," ",full_name)+"."+ -&lt;BR /&gt;  F$element(1," ",full_name) + "." + F$Element(2," ",full_name)&lt;BR /&gt;$ open/write setmailfwd sys$scratch:setmailfwd.com&lt;BR /&gt;$ write setmailfwd "$ MAIL"&lt;BR /&gt;$ write setmailfwd "set forward/user=''username' SMTP%""''internet_name'@xxx.com"""&lt;BR /&gt;$ write setmailfwd "EXIT"&lt;BR /&gt;$ close/nolog setmailfwd&lt;BR /&gt;$ @sys$scratch:setmailfwd&lt;BR /&gt;$ delete sys$scratch:setmailfwd.com;*&lt;BR /&gt;&lt;BR /&gt;I've added the following to confirm:&lt;BR /&gt;&lt;BR /&gt;$ open/write showmailfwd sys$scratch:showmailfwd.com&lt;BR /&gt;$ write showmailfwd "$ MAIL"&lt;BR /&gt;$ write showmailfwd "show forward/user=''username'"&lt;BR /&gt;$ write showmailfwd "EXIT"&lt;BR /&gt;$ close/nolog showmailfwd&lt;BR /&gt;$ @sys$scratch:showmailfwd&lt;BR /&gt;$ delete sys$scratch:showmailfwd.com;*&lt;BR /&gt;&lt;BR /&gt;Niall</description>
    <pubDate>Fri, 27 Jan 2006 12:41:36 GMT</pubDate>
    <dc:creator>Niall Godwin</dc:creator>
    <dc:date>2006-01-27T12:41:36Z</dc:date>
    <item>
      <title>DCL code for setting mail forwarding</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955524#M33366</link>
      <description>Can one of you DCL Wizards help me with the following:&lt;BR /&gt;&lt;BR /&gt;I want to modify my DCL procedure for creating user accounts, and add code to forward the user’s mail to his/her internet mail account. &lt;BR /&gt;The OpenVMS account Owner is in the format &lt;FIRST name=""&gt;  space &lt;MIDDLE initial=""&gt; space &lt;LAST name=""&gt;.&lt;BR /&gt;The user’s  internet address is in the format &lt;FIRST name=""&gt; period &lt;MIDDLE initial=""&gt; period &lt;LAST name=""&gt;.&lt;BR /&gt;&lt;BR /&gt;I want the code to execute the following command:&lt;BR /&gt;MAIL&amp;gt; SET FORWARD/USER=&lt;USERNAME&gt; SMTP%"&lt;FIRST name=""&gt;.&lt;MIDDLE initial=""&gt;.&lt;LAST name=""&gt;@&lt;COMPANY domain=""&gt;&lt;/COMPANY&gt;Example: &lt;BR /&gt;OpenVMS Username: JXB12345&lt;BR /&gt;Owner: Joe X Bloggs&lt;BR /&gt;Forward Mail to SMTP%”joe.x.bloggs@xxx.com”&lt;BR /&gt;&lt;BR /&gt;Thank You,&lt;BR /&gt;Niall.&lt;BR /&gt;&lt;BR /&gt;&lt;/LAST&gt;&lt;/MIDDLE&gt;&lt;/FIRST&gt;&lt;/USERNAME&gt;&lt;/LAST&gt;&lt;/MIDDLE&gt;&lt;/FIRST&gt;&lt;/LAST&gt;&lt;/MIDDLE&gt;&lt;/FIRST&gt;</description>
      <pubDate>Fri, 27 Jan 2006 09:18:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955524#M33366</guid>
      <dc:creator>Niall Godwin</dc:creator>
      <dc:date>2006-01-27T09:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: DCL code for setting mail forwarding</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955525#M33367</link>
      <description>Some punctuation characters got corrupted in the original message. Here it is again:&lt;BR /&gt;&lt;BR /&gt;I want to modify my DCL procedure for creating user accounts, and add code to forward the user's mail to his/her internet mail account. &lt;BR /&gt;The OpenVMS account Owner is in the format &lt;FIRST name=""&gt; space &lt;MIDDLE initial=""&gt; space &lt;LAST name=""&gt;.&lt;BR /&gt;The user's internet address is in the format &lt;FIRST name=""&gt; period &lt;MIDDLE initial=""&gt; period &lt;LAST name=""&gt;.&lt;BR /&gt;&lt;BR /&gt;I want the code to execute the following command:&lt;BR /&gt;MAIL&amp;gt; SET FORWARD/USER=&lt;USERNAME&gt; SMTP%"&lt;FIRST name=""&gt;.&lt;MIDDLE initial=""&gt;.&lt;LAST name=""&gt;@&lt;COMPANY domain=""&gt;&lt;/COMPANY&gt;Example: &lt;BR /&gt;OpenVMS Username: JXB12345&lt;BR /&gt;Owner: Joe X Bloggs&lt;BR /&gt;Forward Mail to SMTP%"joe.x.bloggs@xxx.com"&lt;BR /&gt;&lt;BR /&gt;Thank You,&lt;BR /&gt;Niall.&lt;/LAST&gt;&lt;/MIDDLE&gt;&lt;/FIRST&gt;&lt;/USERNAME&gt;&lt;/LAST&gt;&lt;/MIDDLE&gt;&lt;/FIRST&gt;&lt;/LAST&gt;&lt;/MIDDLE&gt;&lt;/FIRST&gt;</description>
      <pubDate>Fri, 27 Jan 2006 09:23:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955525#M33367</guid>
      <dc:creator>Niall Godwin</dc:creator>
      <dc:date>2006-01-27T09:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: DCL code for setting mail forwarding</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955526#M33368</link>
      <description>I think, MAIL accepts these commands not in the commandline, so you have to create a temorary workfile along like:&lt;BR /&gt;$ VMSuser = "JXB12345"&lt;BR /&gt;$ user = "JOE X BLOKE"&lt;BR /&gt;$ user1= F$element(0," ",User)+"."+ -&lt;BR /&gt;  F$element(1," ",User) + "." + F$Element(2," ",User)&lt;BR /&gt;$ open/write lun tmp.com&lt;BR /&gt;$ write lun "$ MAIL"&lt;BR /&gt;$ write lun "set forward/user=""''VMSUser'"" -"&lt;BR /&gt;$ write lun "SMTP%""''UserX'@xxx.com"""&lt;BR /&gt;$ close/nolog lun&lt;BR /&gt;$ @tmp&lt;BR /&gt;$ delete tmp.com.&lt;BR /&gt;&lt;BR /&gt;This is untested, typos may occur, pls. check before making productive...&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Fri, 27 Jan 2006 09:31:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955526#M33368</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-01-27T09:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: DCL code for setting mail forwarding</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955527#M33369</link>
      <description>Niall,&lt;BR /&gt;&lt;BR /&gt;Kalle's procedure should work, but,&lt;BR /&gt;building USER1 &amp;amp; using USERX &lt;BR /&gt;those should of course be the same.&lt;BR /&gt;It probably is better to NOT complicate things by splitting up your MAIL input line.&lt;BR /&gt;Better to make one long line.&lt;BR /&gt;(but if you do the line breaks exactly right for the generated lines it will work identical).&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Fri, 27 Jan 2006 10:06:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955527#M33369</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-01-27T10:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: DCL code for setting mail forwarding</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955528#M33370</link>
      <description>I promised a typo and there it was :-)&lt;BR /&gt;&lt;BR /&gt;I made the line split to have it at a specific column and not to depend on the html input form. Bit I agre, normally I also prefer long lines instead of many continuation lines.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Fri, 27 Jan 2006 10:53:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955528#M33370</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-01-27T10:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: DCL code for setting mail forwarding</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955529#M33371</link>
      <description>&lt;BR /&gt;I like a temp file for bulk updates.&lt;BR /&gt;For single updates, consider using a pipe:&lt;BR /&gt;&lt;BR /&gt;$ pipe write sys$output "set forw smtp%""a@b.c""" | mail&lt;BR /&gt;$ pipe write sys$output "show forw" | mail&lt;BR /&gt;Y&lt;BR /&gt;&lt;BR /&gt;This will allow for easy symbol substitution.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jan 2006 11:07:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955529#M33371</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-01-27T11:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: DCL code for setting mail forwarding</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955530#M33372</link>
      <description>The continuation character doesn't work when in the MAIL utility, so I've had to keep the command to one line. &lt;BR /&gt;&lt;BR /&gt;The following code works:&lt;BR /&gt;(username and full_name are defined previously in the procedure.)&lt;BR /&gt;&lt;BR /&gt;$ internet_name= F$element(0," ",full_name)+"."+ -&lt;BR /&gt;  F$element(1," ",full_name) + "." + F$Element(2," ",full_name)&lt;BR /&gt;$ open/write setmailfwd sys$scratch:setmailfwd.com&lt;BR /&gt;$ write setmailfwd "$ MAIL"&lt;BR /&gt;$ write setmailfwd "set forward/user=''username' SMTP%""''internet_name'@xxx.com"""&lt;BR /&gt;$ write setmailfwd "EXIT"&lt;BR /&gt;$ close/nolog setmailfwd&lt;BR /&gt;$ @sys$scratch:setmailfwd&lt;BR /&gt;$ delete sys$scratch:setmailfwd.com;*&lt;BR /&gt;&lt;BR /&gt;I've added the following to confirm:&lt;BR /&gt;&lt;BR /&gt;$ open/write showmailfwd sys$scratch:showmailfwd.com&lt;BR /&gt;$ write showmailfwd "$ MAIL"&lt;BR /&gt;$ write showmailfwd "show forward/user=''username'"&lt;BR /&gt;$ write showmailfwd "EXIT"&lt;BR /&gt;$ close/nolog showmailfwd&lt;BR /&gt;$ @sys$scratch:showmailfwd&lt;BR /&gt;$ delete sys$scratch:showmailfwd.com;*&lt;BR /&gt;&lt;BR /&gt;Niall</description>
      <pubDate>Fri, 27 Jan 2006 12:41:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955530#M33372</guid>
      <dc:creator>Niall Godwin</dc:creator>
      <dc:date>2006-01-27T12:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: DCL code for setting mail forwarding</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955531#M33373</link>
      <description>See my last comment for the solution.&lt;BR /&gt;Thanks to all, especially Kalle, for your help.&lt;BR /&gt;&lt;BR /&gt;Niall</description>
      <pubDate>Fri, 27 Jan 2006 12:45:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-code-for-setting-mail-forwarding/m-p/4955531#M33373</guid>
      <dc:creator>Niall Godwin</dc:creator>
      <dc:date>2006-01-27T12:45:09Z</dc:date>
    </item>
  </channel>
</rss>

