- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Taking UCX SH COMM output to a file
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
05-19-2005 10:02 PM
05-19-2005 10:02 PM
I want to take the output of UCX SH COMM to a file which can be further used for OPEN/READ by VMS program. I have tried by assigning SYS$OUTPUT but the output file is not comming in standard text format. If you TYPE that file, it looks OK but if you edit it, it shows lots of escape caharacters in it which is not usable for OPEN/READ by VMS program.
Pls suggest
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2005 11:34 PM
05-19-2005 11:34 PM
Re: Taking UCX SH COMM output to a file
It is not convenient for parsing (and anyhow may change in future versions of TCPIP services).
What do You want to achieve ? Maybe there are other ways to get the information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2005 08:42 AM
05-20-2005 08:42 AM
Re: Taking UCX SH COMM output to a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2005 09:57 AM
05-20-2005 09:57 AM
Re: Taking UCX SH COMM output to a file
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2005 10:38 PM
05-20-2005 10:38 PM
Re: Taking UCX SH COMM output to a file
let me try to explain what the others said.
First, unlike UNIXes en Micro$oft Operating Systems, VMS knows of, and can handle, a lot of different ways to organise data into a file.
For Unix, a file ALWAYS is a stream of bytes, with a
For M$, it is the extension to the filename that (nearly) madatorily determines the type of content, and so, the programm to use on the file. For text files, that extension is .TXT, and those may be read with, eg, Notepad or Weird, (sometimes named Word).
For VMS, MUCH more info about the file is held in the File Header. One of things the header describes, is HOW the data in the file should be interpreted.
And now comes the "big fun" with programms that are ported (mostly from Unix): there is no way for those to know about the structure of the file.
Most notorious of these is FTP (because it is used to transfer files from other systems, that do not specify how they are to
be treated).
The least un-safe way to handle such files is to not do anything, and just fransfer byte-by byte ("Image transfer mode"). If it is KNOWN that the file contains just text records, then the user can set "ASCII transfer mode". Now, essentially, the processing goes record-by-record, and the record separators are added one way, and treated correctly the other way. The FTP info output itself will be
It is comparable to TELLING you that this text is in Dutch, and your interpreter (your programm that processes it) has to translate it from Dutch into
The result will be hard to understand, just like you experienced.
Now, if I leave this text as it is, but tell your interpreter it is in English, suddenly everything becomes understandable.
The interpreter in this story is RMS (VMS's Record Management Services), and John's "SET FILE/ATTRIBUTE=RFM:STMLF" is telling it, that in this case the file consistst of records, separated by
Note: now the
Try using HELP to determine how to change the SET FILE command to do that.
Hope this helps,
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2005 08:56 AM
05-21-2005 08:56 AM
SolutionThe define sys$output produces a standard VMS variable length output, and the
The only eventual solution could be to CONVERT the file using a RFM=STM output FDL.
Like:
$ define/user sys$output tcpip.tmp
$ tcpip show communication
$ convert tcpip.tmp tcpip.stream/FDL=sys$input
FILE
ORGANIZATION sequential
RECORD
CARRIAGE_CONTROL carriage_return
FORMAT stream
$EOD
Then the result file tcpip.stream is clean text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2005 09:13 AM
05-21-2005 09:13 AM
Re: Taking UCX SH COMM output to a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2005 03:18 PM
05-22-2005 03:18 PM
Re: Taking UCX SH COMM output to a file
Maybe you could use PIPE? You may not even need an intermediate file.
If that's not feasible, rather than CONVERTing your output file, you can usually make DCL append an existing file, and get the characteristics you want. For example, in this case:
$ CREATE/FDL=SYS$INPUT TCPIP.OUT
RECORD
FORMAT STREAM
$ OPEN/APPEND OUT TCPIP.OUT
$ DEFINE/USER SYS$OUTPUT OUT
$ TCPIP SHOW COMM
$ CLOSE OUT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2005 03:38 AM
05-25-2005 03:38 AM
Re: Taking UCX SH COMM output to a file
I tried as per the example but it seems some line or command is missing as it is not comming to DCL prompt after
$CREATE/FDL=SYS$INPUT TCPIP.OUT
RECORD
FORMAT STREAM to give further commands.
Joseph,
Your help has solved my problem and I got a clear text file, thanks, cheers...
John Donovan,
Your help also has solved my problem for using F$extract lexical but
Jan,
Thanks for your explanation of the subject and It is good..bye..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2005 03:51 AM
05-25-2005 03:51 AM
Re: Taking UCX SH COMM output to a file
If you are typing commands on a terminal, type
In a DCL procedure there is no need of this.
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2005 09:52 AM
05-25-2005 09:52 AM
Re: Taking UCX SH COMM output to a file
$ create/fdl=sys$input tcpip.out
RECORD
FORMAT STREAM
$ define/user sys$output tcpip.out
$ tcpip show comm
$ exit