- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Can I use the variable(have value of mail id) inst...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2019 06:33 AM
тАО02-28-2019 06:33 AM
Hello All,
I am writing the code to generate the report and automatically send it to specific mail id.
Within the command ,I have saved the mail id within the variable named MAIL_ID
I am trying to access mail id in mail command using variable name (MAIL_ID),but it not works.
In similar way, I saved the filename within variable name FILENAME_TXT and accessed it using variable name in mail command and it works.But it didnt recognize the mail id within the variable.
It recognizes mail id as filename and displays no file found.
Could you please let me know how to resolve it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2019 11:36 AM
тАО02-28-2019 11:36 AM
Re: Can I use the variable(have value of mail id) instead of entering mail id directly within mail c
> I am trying to access mail id in mail command using variable name
> (MAIL_ID),but it not works.
Instead of trying to describe your code, why not just show your code?
It's hard to guess what you're thinking, or what you're doing. Are you
talking about something like this?:
its $ type text.txt
Text.
its $ filename = "text.txt"
its $ type filename
%TYPE-W-SEARCHFAIL, error searching for ITS$DKA0:[SMS.itrc]filename.LIS;
-RMS-E-FNF, file not found
its $ type 'filename'
Text.
https://support.hpe.com/hpsc/doc/public/display?docId=a00058693en_us
https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04623190
Look for:
12 Defining Symbols, Commands, and Expressions
12.12 Understanding Symbol Substitution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2019 04:02 AM
тАО03-01-2019 04:02 AM
Re: Can I use the variable(have value of mail id) instead of entering mail id directly within mail c
Hello Steven,
Thanks for the reply.
Here is the code stored in variabletest.com file:
EMAIL_ID = ""bm957383@gsk.com""
FILE_NAME_TXT="meenakshi.txt"
mail 'FILE_NAME_TXT' /subj= "trial mail" 'EMAIL_ID'
exit
when I try to run this .com file,it displays below error.
BRESA4_BM957383>@variabletest.com
%DCL-W-SYMDEL, invalid symbol or value delimiter - check command syntax
%DCL-W-PARMDEL, invalid parameter delimiter - check use of special characters
\.TXT\
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2019 05:11 AM
тАО03-01-2019 05:11 AM
Re: Can I use the variable(have value of mail id) instead of entering mail id directly within mail c
Hello,
your simple DCL code runs, as expected, errors free :
$ type variabletest.com
$! disk$reserve:[dcl_procedures]variabletest.com
$ EMAIL_ID = "system"
$ FILE_NAME_TXT="disk$reserve:[dcl_procedures]meenakshi.txt"
$ mail 'FILE_NAME_TXT' /subj= "trial mail" 'EMAIL_ID'
$ exit
$!
$ @variabletest
New mail on node SHARK from SHARK::SYSTEM
Please, capture the output of the following steps :
$ set ver
$ @variabletest
And please, tell me also the platform you are working on (Vax, Alpha or Integrity) and the VMS version.
Regards,
/Maurizio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2019 07:11 AM - edited тАО03-04-2019 01:23 AM
тАО03-01-2019 07:11 AM - edited тАО03-04-2019 01:23 AM
Re: Can I use the variable(have value of mail id) instead of entering mail id directly within mail c
Hello Maurizio,
Thanks for the reply.
Please find the below error I received when I tried in our server.
Content in the file: VARIABLETEST.COM
EMAIL_ID="bm957383@gsk.com"
FILE_NAME_TXT="DKC0:[USERS.BM957383]meenakshi.txt"
mail 'FILE_NAME_TXT' /subj="Trial mail variables check" 'EMAIL_ID'
Running the command:
$ @variabletest.com
Error:
%DCL-E-OPENIN, error opening DKC0:[USERS.BM957383]GSK.COM; as input
-RMS-E-FNF, file not found
It considers my email Id as text file and shows error as "FILE NOT FOUND"
My current server is Compaq Alpha Server ES40
Operating System : OpenVMS 7.1-2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2019 07:51 AM
тАО03-01-2019 07:51 AM
Re: Can I use the variable(have value of mail id) instead of entering mail id directly within mail c
If you want to use an SMTP mail address, you should constuct the e-mail address symbol like:
$ EMAIL_ID = "smtp%""bm957383@gsk.com""" ! it's one, two and three double-quotes in this line
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2019 08:17 AM
тАО03-01-2019 08:17 AM
Re: Can I use the variable(have value of mail id) instead of entering mail id directly within mail c
Hello Volker,
I tried as you mentioned,unfortunately I got below error.
BRESA4_BM957383>@variabletest.com
%MAIL-E-NOSUCHUSR, no such user EXIT
contents in file:
EMAIL_ID="smtp%""bm957383@gsk.com"""
FILE_NAME_TXT="meenakshi.txt"
mail 'FILE_NAME_TXT' /subj="trialwith variables" 'EMAIL_ID'
exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2019 08:18 AM - edited тАО03-01-2019 08:22 AM
тАО03-01-2019 08:18 AM - edited тАО03-01-2019 08:22 AM
SolutionPerfect, I figured out where your problem was :
$! disk$reserve:[dcl_procedures]variabletest.com
$ EMAIL_ID = "system@digital.com"
$ FILE_NAME_TXT="meenakshi.txt"
$ mail 'FILE_NAME_TXT' /subj= "trial mail" "smtp%''EMAIL_ID'"
$ exit
Please, let me know.
Best Regards,
/Maurizio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2019 08:28 AM
тАО03-01-2019 08:28 AM
Re: Can I use the variable(have value of mail id) instead of entering mail id directly within mail c
Thank you so much Maurizio!
It exactly works. Thanks a ton :)