- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- DCL Scripting
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
02-22-2007 04:49 PM
02-22-2007 04:49 PM
Can I know How can I do them?
1)different ways to redirect the output of a
dcl command to a file
2)To grep all the lines (from a file)with a perticular string/Word and redirect the output to a file
Regards
Jayakrishnan G Naik
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 05:06 PM
02-22-2007 05:06 PM
Solution1.1) Many commands have build in redirection
$
1.2) Re-direct sys$output through temporary logical
$define/user sys$output
$
1.3) Place commands in script, capture script triggered output
$@<script>/out=
1.4) Pipe, line Unix, but costs a sub-process
$pipe
1.5) Use terminal session log
$set host 0::/log=
2)
2.1) As per 1.1, use build in redirect
$search
2.2) As per 1.4, pipe
$pipe searc
Hope this helps
Hein van den Heuvel
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 05:53 PM
02-22-2007 05:53 PM
Re: DCL Scripting
Thank you for the valuable info
I havesome doubts in the below commands
in 2.1 what does this do?-/MATCH=xxx
in 2.2)|
2.1) As per 1.1, use build in redirect
$search
2.2) As per 1.4, pipe
$pipe searc
Regards
Jayakrishnan G Naik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 06:11 PM
02-22-2007 06:11 PM
Re: DCL Scripting
I got the output as I needed in a file
I need to send that file to my mail id?
How can I add this in script?
Is there any way to make this output in excel format so that I can open this file
with excel?
I need to periodically run this script say
once in a week how to put it in que to run
weekly?
Can you please let me know how Can I do this?
Thanks & Regards
Jayakrishnan G NAIK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 06:13 PM
02-22-2007 06:13 PM
Re: DCL Scripting
Use the force: $HELP SEARCH /MATCH
The xxx stands for specific matching (such as AND or XOR) to do when multiple word are provided. My implied suggestion is the you should look at that as alternative for the typical multiple pipes used for complex greps:
#grep x
>> in 2.2)|
Whatever you fancy! The thought there is that you probably put the output into a file for a reason. If that reason is further processing, then this is possibly better done in redirected through a pipe
Regards
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 06:35 PM
02-22-2007 06:35 PM
Re: DCL Scripting
$ MAIL filename.ext mailid
(See HELP MAIL for more info and qualifiers).
If you need an EXCEL compatible format, you will have to convert the file yourself.
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 06:36 PM
02-22-2007 06:36 PM
Re: DCL Scripting
Pls. search the forum, as there have been many threads covering this topic.
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 07:37 PM
02-22-2007 07:37 PM
Re: DCL Scripting
google +site:itrc.hp.com
Simple example of mail:
$ pipe show dev d | search sys$pipe mounted | mail/sub=mounted sys$pipe
Simple example of CSV for same data:
$ pipe show dev d | perl -lne "if (/Mounted/){print join("","",(split))" | mail/sub=mounted sys$pipe
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 12:28 AM
02-23-2007 12:28 AM
Re: DCL Scripting
Hi
I need to periodically run this script say
once in a week how to put it in que to run
weekly?
Can you please let me know how Can I do this?
How to do "Cut", "sed" kind of operations
in dcl scripts?
Regards
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 01:22 AM
02-23-2007 01:22 AM
Re: DCL Scripting
For short, a weekly job can submit itself by
submit/after=("today+7-3") 'f$environment("procedure")'
today+7 means in once week, and -3 means at 3:00h .
In addition to reading the VMS FAQ, see HELP DCL date, HELP LEXICAL F$ENVIRONMENT.
What do You mean "Cut" ? If You mean "cat","sed":
these are Unix utilities, and made available to VMS via the GNV open source project.
See software/open source from the HP Openvms home page how to get GNV.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 01:40 AM
02-23-2007 01:40 AM
Re: DCL Scripting
see
$ help lex f$extract
You have awk under Vms, define
gawk :== $ SYS$COMMON:[SYSHLP.EXAMPLES.TCPIP.SNMP]gawk.exe
For sed, I do no know a Vms equivalent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 02:33 AM
02-23-2007 02:33 AM
Re: DCL Scripting
For sed, I do no know a Vms equivalent
<<<
Hunter Goatley has ist in his archive: http://vms.process.com/scripts/fileserv/fileserv.com?SED
cu,
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 03:02 AM
02-23-2007 03:02 AM
Re: DCL Scripting
in dcl scripts?
perl
DCL scripting is a 'whole new world'. Embrace it, don't fight it.
Think DCL, don't think cut/sed/wc/grep...
READ the fine manuals, READ the HELP.
Do NOT try to translate Unix Shell solutions into DCL scripts.
As labadie writes, where a unix person thinks 'cut', A DCL scrill will probably need F$EXTRACT (think substr) for fix positions of F$ELEMENT (think split) for delimited strings.
'sed' will be tricky. There is no easy string replacement, but in 25+ years of DCL programming I rarely missed it. You would send to rebuild a new string from piece rather than replace.
$ new = f$elem(0,"-",old) + "-xx-" + f$elem(2,"-",old)
For fixed length strings, replace in place:
$ name[4,3] := "xxx"
But you should possibly use Perl or Awk to massage lots of data.
For further and better help, why don't you describe a specific example in more detail.
Output from which command?
Sample output inline AND in a .txt attachment
Which trnasformations?
Sample result inline AND in same .txt attachment.
hth,
Hein van den Heuvel
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 04:03 AM
02-23-2007 04:03 AM
Re: DCL Scripting
The fine doc set is available at http://h71000.www7.hp.com/doc/
If you're getting started and don't have someone available, you may consider some of the third party books.
http://www.amazon.com/Writing-Real-Programs-DCL-Technologies/dp/B000FO58MG/sr=8-1/qid=1172250047/ref=sr_1_1/104-7423816-8530324?ie=UTF8&s=books
http://www.amazon.com/OpenVMS-System-Management-Guide-Technologies/dp/1555582435/sr=8-2/qid=1172250047/ref=sr_1_2/104-7423816-8530324?ie=UTF8&s=books
http://www.openvms.org/pages.php?page=Books
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 10:30 PM
02-23-2007 10:30 PM
Re: DCL Scripting
from your Forum Profile:
I have assigned points to 6 of 22 responses to my questions.
Maybe you can find some time to do some assigning?
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.
Consider, that every poster took at least the trouble of posting for you!
To easily find your streams with unassigned points, click your own name somewhere.
This will bring up your profile.
Near the bottom of that page, under the caption "My Question(s)" you will find "questions or topics with unassigned points " Clicking that will give all, and only, your questions that still have unassigned postings.
If you have closed some of those streams, you must "Reopen" them to "Submit points". (After which you can "Close" again)
Thanks on behalf of your Forum colleagues.
PS. - nothing personal in this. I try to post it to everyone with this kind of assignment ratio in this forum. If you have received a posting like this before - please do not take offence - none is intended!
PPS. - Zero points for this.
Proost.
Have one on me.
jpe