- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- VMS adding bytes
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
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
тАО05-03-2007 02:36 AM
тАО05-03-2007 02:36 AM
VMS adding bytes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 02:43 AM
тАО05-03-2007 02:43 AM
Re: VMS adding bytes
of what type is the "another system" (VMS, UNIX, ???)
How do they copy the file?
Regards
Heinz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 03:24 AM
тАО05-03-2007 03:24 AM
Re: VMS adding bytes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 03:35 AM
тАО05-03-2007 03:35 AM
Re: VMS adding bytes
'normal' VMS files are veriable length with a 2 byte record length pre-fix and optional alignment byte for odd sized records.
If one errorneously transfers such file in BLOCK = BINARY = IMAGE mode, then those bytes may appaer to be 'added bytes'. I'd like to argue they are not added, just misunderstood.
Solution?
- transfer in RECORD = ASCII mode.
or
- pre-convert to a target compatible mode.
For Unix that would typically be STREAM_LF, for Windows STREAM.
Example for OpenVMS 8.3:
$CONVERT/FDL="RECORD; FORMAT STREAM" old new
Good luck!
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 03:45 AM
тАО05-03-2007 03:45 AM
Re: VMS adding bytes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 04:09 AM
тАО05-03-2007 04:09 AM
Re: VMS adding bytes
The 'right' solution is to use an file with record format = undefined
Check the RMS manuals and HELP SET FILE/ATTR
This might NOT be easy, and will notably depend on the language used. Some languages try to 'help' too much.
If the file exists today already, but as variable length, then convert can help as indicated before.
It's about time you shared a
- $DIR/FULL for the file,
- The OpenVMS version
- The desired language
- The method used to write the file (open statement, write statemnt)
- The desired method to transfer the file. (FTP? NFS? Samba?)
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 04:28 AM
тАО05-03-2007 04:28 AM
Re: VMS adding bytes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 04:45 AM
тАО05-03-2007 04:45 AM
Re: VMS adding bytes
OpenVMS version - V7.2-2 AlphaServer GS80 6/1001
Using a write statement.
FTP to transfer the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 04:47 AM
тАО05-03-2007 04:47 AM
Re: VMS adding bytes
Using a write statement.
FTP to transfer the file.
The language is Basic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 05:12 AM
тАО05-03-2007 05:12 AM
Re: VMS adding bytes
You're very likely getting nailed by the record organization inside the file, or by the lack of implicit conversion during the transfer.
I generally use stream LF files for transfers, as these are compatible with Unix systems.
With Windows, Stream tends to be the best choice, but there are a number of Windows tools that can and do deal with Stream LF. (Notepad does not. Wordpad does.)
VFC files will get you extra bytes embedded in the file.
The easiest way is to either use Stream LF files, or to convert the VFC file into stream LF as part of the the transfer via the COPY/FTP command. (COPY/FTP is easier to use and easier to embed in a DCL procedure than is the FTP utility.) To convert, the usual approach is COPY/FDL.
Some tools will implicitly perform the conversion. See the ADF file stuff within NFS, for instance.
I've previously posted up details of the benefits of COPY /FTP at the new web site, I'll post up file conversion and file transfer details for the site and for the FAQ. For whatever reason, this question is arising with some regularity of late.
Stephen Hoffman
HoffmanLabs LLC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 07:25 AM
тАО05-03-2007 07:25 AM
Re: VMS adding bytes
Why is the person itself not communicating here? No disrespect intended but what value are you adding to this process?
>> Using a write statement.
Basic does not have a write statement.
>> FTP to transfer the file.
I would highly recommend just creating a bunch of file of various flavors using CONVERT and an FDL file (with 7.2 you can not use the FDL string), transfer them and see what works. Then create the program to write what worked.
>> The language is Basic.
Ah, that's actually tricky, because basic is picky (with respect to file types). It has an 'organization undefined' clause but somewhat confusingly that does NOT map to Record Format = Undefined. One will need a USEROPEN to force that issue if that path to a solution is chosen. Example below.
I would recommend to use the fixed length 512 byte record method....
or... use the convert.
Was the convert suggestion tested?
Why not?
$CREATE udf.FDL
RECORD; FORMAT UNDEFINED
$CONVERT/STAT/FDL=udf old.dat new.raw
$FTP...
Regards,
Hein van den Heuvel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 07:40 AM
тАО05-03-2007 07:40 AM
Re: VMS adding bytes
$ type test.bas
call lib$init_timer
map (x) string test = 1000
open "test.tmp" for input as file #1, useropen rfm_udf, &
organization undefined, recordtype any, access append, map x, extendsize 1000
test = "organization undefined, recordtype any, access append"
for i% = 1% to 10%
for j% = 1% to 1000%
put #1, count j%
next j%
next i%
call lib$show_timer
end
$ type useropen.bas
FUNCTION LONG rfm_udf (FABDEF FAB, RABDEF RAB, LONG CHANNEL)
OPTION TYPE = EXPLICIT
%INCLUDE "$FABDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"
%INCLUDE "$RABDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"
EXTERNAL LONG FUNCTION SYS$CREATE, SYS$CONNECT
DECLARE LONG stat
FAB::FAB$B_RFM = FAB$C_UDF
RAB::RAB$B_MBF = 4%
RAB::RAB$B_MBC = 120%
RAB::RAB$L_ROP = RAB$M_WBH
STAT = SYS$CREATE(FAB)
STAT = SYS$CONNECT (RAB) IF (STAT AND 1%) = 1%
rfm_udf = stat
END FUNCTION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 07:53 AM
тАО05-03-2007 07:53 AM
Re: VMS adding bytes
ASCII mode is the default, unless you are attempging to use something like Windows IE, which seems to use binary mode for everything.
If it is a windows PC that is getting the file from the VMS system, then try a different client program on the Windows PC. For example, the command line client that you run from a cmd prompt.
If this is a Win XP system, click start, click RUN, enter "CMD", ok, and you will get a command prompt window.
C:\blablabla> ftp vmshostip
username: whatever
password: whatever
ftp> ascii ! this is the default, not really needed
ftp> get VMSfile localfile
ftp> quit
ftp in ascii mode should handle the translation of records to records fine. As long as the record lengths do not exceed the limits of either end, files will be transferred a record at a time. You can even transfer an indexed file on VMS to a text file on the other end.
My point is, whether it is "stream_lf", var carr control, vfc, etc, makes NO DIFFERENCE if the ftp mode is ASCII.
That isn't true for scp, sftp, binary mode ftp, etc.
Attached is a demo going from vms to unix showing that the internal representation of "records" is automatically handled by ASCII mode ftp.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 08:01 AM
тАО05-03-2007 08:01 AM
Re: VMS adding bytes
That is my interpretation of "he is attempting to create a totally flat file in VMS. "
Like a 'byte stream' file, possibly with binary characters and possibly without a single linefeed values byte which would make RMS unhappy if it was labelled stream_lf and larger than 32KB.
I suspect they will consider every linefeed (\n) to be an added byte.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 07:05 PM
тАО05-03-2007 07:05 PM
Re: VMS adding bytes
I agree, we need more info, and the term "flat file" means different things to different people.
Without better description of what the problem is all we can do is make SWAG responses.
One other possible scenario is the use of "fixed" length files with odd byte lengths. RMS imposes word (16 bit) alignment on the start of new record for fixed length files. In other words an RMS file with fixed length 1 byte records will consume the same amount of space as a file with the same number of 2 byte records. To create odd length fixed records, write pairs of odd length fixed records into a single RMS record that is twice as large. Then transfer the file in binary mode.
Example: two 19 byte "logical" records are put end to end into a single 38 by RMS record. Then the file header has the meta data describing the records, and the data blocks of the file have only data, no record delimiters. Similar to synchronous (no start/stop bits) vs. asynch data transmissions.
I've attached a demo showing that 256 records in a 1 byte fixed format file take the same space as 256 records in a 2 byte fixed format file.
The reason for my previous response was that
I've been seeing a lot of recommendations in this and other ITRC threads to "convert to stream_lf, etc." before transferring with ASCII mode ftp, and that just isn't a requirement. It won't hurt, and it can be helpful when not using ASCII mode transfers, and it may indeed help when using a lame ftp client (like windows IE), but it should not be necessary.
FTP has many warts, but is does have some features that newer transfer protocols lack. In that respect it is similar to Kermit, which could transfer files between more types of systems than for example x, y or zmodem.