- 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-19-2008 03:57 AM
тАО08-19-2008 03:57 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2008 04:07 AM
тАО08-19-2008 04:07 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
"qw" only a string.
i used it instead of CRLF in my file.
Now i transfer my file with ftp(ascii mode) to vms AND ready to convert "qw" with CRLF.
i cant find any replace function...
As want to strip "qw" and add CRLF to same offset
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2008 04:45 AM
тАО08-19-2008 04:45 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
$ pos=f$loc("qw",rec)
$ len=f$len(rec)
$ if pos .lt. len
$ then
$ rec=f$extr(0,pos-1,rec)+ cr + lf + f$extr(pos+2,len-pos-1)
$ goto loop
$ endif
Wim (untested)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2008 08:10 AM
тАО08-19-2008 08:10 AM
Solution$crlf = F$FAO("!/")
$loop:
$qw = F$LOCATE("qw",record)
$IF qw.EQ.F$LEN(record) THEN GOTO no_more_qw
$record = f$extract(0,qw,record) + crlf + f$extract(qw+2,999,record)
$GOTO loop
$no_more_qw:
Here is an other for the now much simplyfied problem:
Just use a TPU script.
-------------- replace.tpu ----------------
procedure replace_qw_by_crlf
local string_range;
loop;
string_range := search('qw',forward);
exitif string_range = 0;
position(beginning_of(string_range));
erase(string_range);
copy_text(ascii(13));
copy_text(ascii(10));
endloop;
exit;
endprocedure;
replace_qw_by_crlf;
write;
exit;
----------------------------------
$ edit/tpu/nodisplay/command=replace.tpu /out=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2008 01:45 PM
тАО08-19-2008 01:45 PM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
you want to get a file in a format so FASTWIRE 'eats' it? Well, how does the format of a file written by FASTWIRE look like (DUMP/RECORD)?
Then we can tell you how it may be composed on the Windows side or, how your FTPed file can be transformed on the OpenVMS side.
One thing to keep in mind with OpenVMS file atrributes is that "Record attributes: Carriage return carriage control" means if that file is presented on a terminal or printer an extra CR/LF is output to the device. But this CR/LF IS NOT IN THE FILE!!!
/Guenther
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2008 11:17 PM
тАО08-19-2008 11:17 PM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
But removing the 999 easy solution :
$ set ver
$@wim.lis !execution now starts
$rec="abcqwdefg"
$cr="1"
$lf="2"
$
$loop:
$ pos=f$loc("qw",rec)
$ len=f$len(rec)
$ if pos .lt. len
$ then
$ rec=f$extr(0,pos,rec)+ cr + lf + f$extr(pos+2,len-pos,rec)
$ goto loop
$loop:
$ pos=f$loc("qw",rec)
$ len=f$len(rec)
$ if pos .lt. len
$ endif
$ sh symb rec
REC = "abc12defg"
fwiw
Wim (will write 1 page with "I will not post untested code")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2008 04:57 AM
тАО08-21-2008 04:57 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
Can't solve with only FTP but
FTP+TELNET(running a dcl scrit)
These are my champions,
Hein van den Heuvel(VMS)
Michael Phelp(Swimming)
Usain Bolt(Athletics)
Thanks Hein a lot,
and sure Wim, Schweda and others
Best Regards To ALL From ISTANBUL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2008 05:52 AM
тАО08-21-2008 05:52 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
I liked your tpu procedure approach, so I copied it and tried it with the following input file:
QWqwQwqW
Record number 1 (00000001), 8 (0008) bytes, RFA(0001,0000,0000)
0A0D0A0D 0A0D0A0D ................ 000000
So, it appears that the tpu search builtin is case insensitive. So it wouldn't be appropriate if "QW", "Qw" or "qW" should not be translated to crlf. A somewhat cursory look at the tpu documentation didn't reveal how to make the search be an exact match. I tried specifying an /init file with "SET FIND CASE EXACT" in it, but that didn't change the behavior of the search.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2008 06:06 AM
тАО08-21-2008 06:06 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
The input file had the four case variations of QW, and all were converted to crlf, not just the all lowercase version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2008 08:26 AM
тАО08-21-2008 08:26 AM
Re: how can i read a sequential rms file and write it to a sequential variable lenght rms file
Add EXACT to the search command:
string_range := search('qw',forward,EXACT);