- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- DCL language
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
Forums
Discussions
Discussions
Discussions
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
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
01-11-2005 01:47 AM
01-11-2005 01:47 AM
is 'p' is a symbol substitution or is it ''p' ?
what's the difference between: "''p'" and ""''p'"" ?
if we take it more further, how to know the output?
"""''p'""" ; """"''p'"""" ; """""''p'""""" ?
double quotation is easy, but when mixed with single quotation gives very odd output?
I'm asking this because i got it as a question in the VMS administrator exam !!
Thanks and regards.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 02:02 AM
01-11-2005 02:02 AM
Re: DCL language
first, your question is very hard to read in the ITRC display, as you will note yourself when you see it back.
I will try to guess, but probably you get the concept.
Okay. I copied it into the input screen, now it is clear.
"''p'" upon execution is replaced with a quoted string with the value of P
""''p'"" is a double quote charecter, followed by the letter P followed by a double quote, ie, the string "P"
-- if you have access to a VMS system, you can very easily try it yourself!
P="abcde"
xx = "''p'"
show symbol xx
xx = ""''p'""
show symbol xx
hth
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 04:09 AM
01-11-2005 04:09 AM
Re: DCL language
What's the difference between single quotation and double quotation?
is `p` symbol substitution or is it ``p` ?
what's the difference between: "``p`" and ""``p`"" ?
if we take it more further, how to know the output?
"""``p`""" ; """"``p`"""" ; """""``p`""""" ?
double quotation is easy, but when mixed with single quotation gives very odd output?
I'm asking this because i got it as a question in the VMS administrator exam !!
I've tried it on my system, but I am not being able to get a conclusion about these. how to guess what's the output.
Thanks and regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 04:22 AM
01-11-2005 04:22 AM
Re: DCL language
A normal ' means symbol substitution, but the problem arises when you want a symbol substitution inside a quoted ( " ) string. In that case you use two single quotes inside the quoted string (i.e. " ' ' P ' ").
If you need to include a double quote inside a string, then you place two of them consecutively (i.e., " Add a Quote " " to this string", would assign Add a Quote " to this string).
Remember that I added extra spaces around each " and ' in the above to hopefully add clarity. The spaces would not be there in the real usage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 04:28 AM
01-11-2005 04:28 AM
Re: DCL language
Double quotation indicates literal.
If you includes only one single quotation between doubles ("`p`"), DCL implement the first single quotation as a ASCII character.
If you include a new single quotation before the first ("``p`"), you indicate to DCL that the second single quotation is a "DCL character" and substitutes ``p` with p symbol value.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 05:07 AM
01-11-2005 05:07 AM
Re: DCL language
after giving it some more thought, I think I had better try to play "parser", while explaining.
I am assuming the examples ARE the context, and that this is NOT WITHIN a string (if so, see the exercise at the end)
" ' ' p ' "
(extra spacing for readability only!)
The first double quote is the start of a string.
Within a string, if symbol substitution is to be done, that symbol MUST be directly preceeded by two single quotes, and followed by another one.
The next double quote terminates the string.
So, summed up, this represents a string wth the value of P as value.
" " ' ' P ' "
The first double quote is again the start of a string.
Then the second, if not IMMEDIATELY followed by a third, means end-of-tring.
So, together, an empty ( = zero-length) string.
The first single quote is the start of a symbol substitution. The next is the end, so an empty symbol vaule ( = nothing) is inserted.
Then the literal P
Next, another substitution starts.
Asymbol name ends with any non-valid character for symbol-name syntax, for which the double quote qualifies. Another nothing.
Two double quotes: see above.
"we take it further":
Two double quotes concatenated within a string represent the double quote character.
So 3 double quotes is the beginning of a string, that starts with a double quote.
Four double quotes: the end also, that means, the single character string of one double quote character.
The rest is just stubbornly applying the above, as much as necessary.
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 01:58 PM
01-11-2005 01:58 PM
Solutionhttp://h71000.www7.hp.com/doc/731FINAL/6489/6489pro_033.html#symbol_substitution
Try out the examples...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2005 07:59 PM
01-11-2005 07:59 PM
Re: DCL language
p = "fred"
p gives fred
" ' ' p ' " gives fred
" " ' ' p ' " " gives " fred "
Hope this helps.
Terry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2005 01:52 AM
01-12-2005 01:52 AM
Re: DCL language
multiple symbols (single quote and double quote) are used in mixed mode.
Inside two double quote, usually you put some string; e.g. S="My string"
Inside two single quote you put any symbol to substitute; e.g. 'P'
If you need of symbol substitution inside a string you must use twice single quote; e.g.
$ P="My string"
$ S="''P'" !Double quote, twice single quote, uppercase P, single quote, double quote
If you need some double quote inside a string, because double quote means string separator, you need twice double quote; e.g.
$ S="My ""quote"""
$ sh ym S
Please, look at first twice double quote, used to insert double quote symbol inside string and triple double quote at end that is a twice double quote plus double quote to end string.
H.T.H.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2005 01:54 AM
01-12-2005 01:54 AM
Re: DCL language
I've forgotten ...
$ S="""" !4 times double quote
$ show sym S
<">
you have to read:
1.st double quote: open string
2.nd twice double quote: insert double quote into string
Last double quote: close string
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2005 12:18 AM
01-13-2005 12:18 AM
Re: DCL language
For steps how to assign points see:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2005 12:24 AM
01-13-2005 12:24 AM
Re: DCL language
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2005 12:36 AM
01-13-2005 12:36 AM
Re: DCL language
"i am new to these forums"
Yeah, as first one to answer I should have noted, but none of the others made up for my mistake.
So, belatedly, but all the more cordially:
"WELCOME to VMS & the VMS Forum, Simon!!!"
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2005 01:12 AM
01-13-2005 01:12 AM
Re: DCL language
on giving points:
try to give points to EVERY answer to your questions!
It is fully up to you HOW MANY, and you can just give 0 (zero) if you think you don't want to give more.
Any assignment, including zero, removes the "unassigned" header.
It is reflected in your Forum Profile.
If you do not know that yet, then click your own name (in the questions summary, in your question header, in the header of any of your replies).
In your profile you will notice how many answers you have assigned to, from how many total.
If you somehow want more info on any other Forum user, it is basically the same.
( and hey, we have all begun as newbies, most of us stumbled over this! )
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2005 10:52 AM
01-13-2005 10:52 AM
Re: DCL language
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2005 10:09 PM
01-17-2005 10:09 PM
Re: DCL language
I have a doubt now going through this post, appreciate if you could clarify this, this is again about symbols and symbol substitutions
Look at the following
$STD = "01"+"-"+"DEC"+"-"+"2004"+":00:00:00.00"
$ETD = "31"+"-"+"DEC"+"-"+"2004"+":23:59:00.00"
$sh sym STD
STD = "01-DEC-2004:00:00:00.00"
$sh sym ETD
ETD = "31-DEC-2004:23:59:00.00"
If i would like to pass the values in the above symbol STD and ETD into some command, then how do i do it ? Should i say "''STD'" and "''ETD'" or ???
To make things simple lets assume that i would like to pass the values mentioned above within a DCL to the following command
$advise performance
select/x_points=480 -
/begin=
thanks
mobeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2005 10:17 PM
01-17-2005 10:17 PM
Re: DCL language
$advise performance select/x_points=480 -
/begin='STD'/end='ETD'
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2005 10:29 PM
01-17-2005 10:29 PM
Re: DCL language
Thanks for your response. I see the following error
$ STD = "01"+"-"+"DEC"+"-"+"2004"+":00:00:00.00"
$ ETD = "31"+"-"+"DEC"+"-"+"2004"+":23:59:00.00"
$ advise performance
select/x_points=480-
/begin='STD'/end='ETD'
%CLI-W-IVATIME, invalid absolute time - use DD-MMM-YYYY:HH:MM:SS.CC format
rgds
Mobeen
Simon :- i am sorry to be giving you more work, as this was the same topic, i posed my question. Please assign points at your convenience :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 12:10 AM
01-18-2005 12:10 AM
Re: DCL language
To use the DCL symbols to create a graph look at the
ADVISE PERFORM GRAPH command
(so DCL can subtitute the symbols then pass the command to PSPA).
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 12:27 AM
01-18-2005 12:27 AM
Re: DCL language
$ advise performance
select/x_points=480-
/begin='STD'/end='ETD'
%CLI-W-IVATIME, invalid absolute time - use DD-MMM-YYYY:HH:MM:SS.CC format
Maybe the ITRC formatting messed things up, but, if I read this correctly,
you enter ONE line with just
$ advise performance
and then ON THE NEXT LINE you entered the image input command statements.
Well, symbol substitution is ONLY done on the command line, NOT in data lines!
It is been a long time, but if I remember correctly ADVISE also accepts its sub-commands on the commandline.
If so, simply add a "-" (continuation) after "performance", but if not, you will have to generate a temporary file in which you substitute the symbol-value during creation, and the execute it and delete it,
or, if you are on VMS 7.2 + ,
you can you a pipe construct.
Examples of that have come along regularly in this forum lately.
Hope this helps.
Simon :- i am sorry to be giving you more work, as this was the same topic, i posed my question. Please assign points at your convenience :)
Maybe next time, it would be better to open a new thread, and start it with pointing to the one you like to reference.
Proost.
Have one on me.
Jan