- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: how to write dcl to shell
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
тАО10-05-2009 11:15 PM
тАО10-05-2009 11:15 PM
how to write dcl to shell
$!
$ set term/width=132
$ DIR/Date=Created/nosize/noheader/ -
width=(filename=90,display=130)/ -
exc=(OLD_*.*,ORIG_*.*,CYCLE*.COM,CEE*.*,VCCL_*.*,VISUALEXPLOR*.*)/ -
output=cee.txt -
'p1'*.prg;0,*.com;0
$set term/width=80
$ write sys$output "-- output file created is named CEE.TXT"
$exit
Please translate the above script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2009 11:37 PM
тАО10-05-2009 11:37 PM
Re: how to write dcl to shell
The dir command translates in a shell in a ls or in a find command, depending upon circumstances.
$ set term/wid=80 translates to stty col 80
and write sys$output translates to echo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2009 12:49 AM
тАО10-06-2009 12:49 AM
Re: how to write dcl to shell
May be it is there to do debugging without the /out.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2009 03:53 AM
тАО10-06-2009 03:53 AM
Re: how to write dcl to shell
Asking OpenVMS folks in an OpenVMS forum to write Unix shell code? That's likely not the most expedient course here.
There are forums around for folks that know Unix shell scripting; there are some folks here, but fewer. Best to use a Unix forum, and describe what you want done here; it looks like somebody's established a list of files they don't want to see in a directory listing.
The only command within that DCL procedure that matters here is the directory command. The "stuff" around it is likely intended to encourage the DIRECTORY command to display full-width filenames (sans wrapping) for what are undoubtedly long filenames used in the default directory.
As for the commands most likely used here over on Unix:
man ls
man grep
You'll likely be piping the output from ls into grep to remove the filenames you don't want to see; regular expressions. There are other ways (like find or such) to "nest" shell commands to act on individual files.
DCL and bash command comparison:
http://labs.hoffmanlabs.com/node/741
One wrinkle: there is no direct analog for the OpenVMS created date on various Unix boxes. Mac OS X, various BSD and some other Unix boxes do have a creation date.
http://labs.hoffmanlabs.com/node/138
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2009 04:48 AM
тАО10-06-2009 04:48 AM
Re: how to write dcl to shell
That's the 'fun' answer because using file systems do NOT have a 'create time' attribute.
What problem are your really trying to solve?
Please provide a slightly larger context.
What is the crux of your question... the exclusions or the byte offsets for the columns of data or all?
My guess is that you need a file with directory information to be further processed by a next stage, maybe to drive an FTP or other job.
If you force Unix style commands to generate OpenVMS formatted output, than that next phase will have to be coded to un-ravel that.
It may be better to just accept the 'ls -l' output and enjoy the optional date ordering it offers, and post-filter it with GREP or AWK.
Something like:
ls -l | awk '!/^OLD/ && !/^ORIG/ && ... { print $8 }
Now for the exclusion please consider whether that list was driven due to the WEAKNESS of OpenVMS to specify inclusions. On OpenVMS you can only specify a wildcard character or range. On Unix you can specify specific values for example 200[89] to specify just the last 2 years. On OpenVMS that would be 200? and you would have to post-filter.
Personally I would look for a solution which would work on Unix as well as OpenVMS, for obvious test reasons.
For example some PERL similar to:
use Cwd;
for (<*.*>) {
next if /^old/i or/^orig/i or /^cycl*com$/;
printf "%-90s%s\n", cwd().$_, scalar localtime((stat)[9]);
}
Good luck!
Hein.