- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: how can i read a sequential rms file and write...
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
тАО08-18-2008 05:37 AM
тАО08-18-2008 05:37 AM
Hein's offer a dcl script that can put CRLF inside file and this is first step for me.
$ crlf = f$fao("!/")
$ create/fdl=nl: test.tmp ! FDL is optional really, all defaults applied
$ open/write test test.tmp
$ write test "EUROPA",crlf,"AFRICA"
$ write test "AMERICA"
$ close test
$ type test.tmp
this creates a rms file with record format VCF
i want it sequential variable lenght.
And i want to create it from reading a file(that come from xp-dos with ftp) and write to file(that i want)
I need a dcl that reads a file record by record
until end of file and write to another file.
Who can propose a dcl script for it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 05:42 AM
тАО08-18-2008 05:42 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
open/write
by
open/append
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 05:57 AM
тАО08-18-2008 05:57 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
Anyway... here is what I tried to reply to the FTP topic, but it close, and it seems to apply here:
FTP is going to be a little tricky, because of the cr-lf. On the dos side, and in an ascci file transfer, at the cr-lf is undistinguishable from a new line.
Fortunately the data is well recognizable.
So on the OpenVMS side you could process the ascii text and glue everything together unless it starts with "14-spaces and a tab followed by 6 numbers and a tab". SMOP. Send money and we'll do it :-).
I would look at delivering the file with 'codes' for cr-lf and ff (and tab optionally). The PERL/C style escapes might do (\r \f \t ...) but since this is OpenVMS, why not use the Formatted Ascii Output directives.
Check out: help lexi f$fao directive
For example, the first two lines as generated on Windoze could be:
HA050501390004
A000026 !_020508!_0033848!/0062!_00440!_842!/0139!_99999.999.!/NORM!_12000!_4!_RPS!_N!/TEST!/!/!_TEST!/SEN METAL END.VE SAN.TI
C.LTD.STI!/TR41000139007C0030712BL001!_7350477692!_G!/ALICI TEST!^0139999990033848
(all together, I also used !_ for
Now feed this into a DCL script
----- Formatter.com ----
$if p2.eqs."" then exit
$close/nolog in
$close/nolog out
$open/error=done in 'p1
$create 'p2
$open/append out 'p2
$loop:
$read/end=done in record
$write out f$fao(record)
$goto loop
$done:
$close/nolog in
$close/nolog out
$exit
--------------------
Use as: @formatter.com test.dat test.out
When I do this, the DUMP/RECORD for test.out gives EXACTLY the same bytes you attached in the dump.
Good luck!
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 06:00 AM
тАО08-18-2008 06:00 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
What you suggested ?
is it convert my file from VCF to variable lenght record format ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 06:04 AM
тАО08-18-2008 06:04 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
If the 'damge is already done' then you can just convert the DCL generated VFC-PRN file to a 'normal' sequential file using:
$CONVERT/FDL=NL: dcl.txt normal.txt
Yes, that's right. An 'empty' FDL file has all the default to make a normal file.
Enjoy,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 06:14 AM
тАО08-18-2008 06:14 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
So,
create new.dat
open/append x neww.dat
open/read o old.dat
b:
read/end=e o o_rec
write x o_rec
goto b
e:
close x
close o
Not sure what your file contains. Maybe you have to split o_rec.
Wim
BTW : my file transfer from dos to vms gives correct results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 06:54 AM
тАО08-18-2008 06:54 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
so i did tried heins one... it run but do nothing :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 07:00 AM
тАО08-18-2008 07:00 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
$if p2.eqs."" then exit
$close/nolog in
$close/nolog out
$open/error=done in 'p1
$create 'p2
$open/append out 'p2
$loop:
$read/end=done in record
$write out f$fao(record)
...
here what is p2 and 'p2
and is (record) means my record or it is only a keyword ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 07:05 AM
тАО08-18-2008 07:05 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
that is okey but with ' it understand it is a veriable??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2008 07:31 AM
тАО08-18-2008 07:31 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
so i did tried heins one... it run but do nothing :)"
What exactly did you try? The formatter or the create/fdl=nl:?
The formatter works given the input hein provided (you will have to remove a line wrap from the input file).
Hein's proposal is about as straight forward as you can get. If you can't work with that, you need to hire someone to write the programs.