LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-13-2017, 12:40 PM   #1
n.meyer
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Rep: Reputation: Disabled
Decnet LINUX / dncopy : binary filesize becomes multiples of 512 bytes


Expected :
-----------
dncopy -mblock -b512 FromLINUX_file1 ToVMS_file1
dncopy -mblock -b512 FromVMS_file1 ToLinux_file2

should give EXACTLY the same files (FromLINUX_file1 and ToLinux_file2) .....

What happen :
-------------
ToLinux_file2 is greater than FromLINUX_file1.
ToVMS_file1 and ToLinux_file2 become multiples of 512 bytes !

---------------------------------------

We need to copy binary files exactly to its size, in both direction (Linux->VMS) or (VMS->Linux).
From VMS to Linux is OK, but,
From Linux to VMS is wrong !
From Linux to VMS is wrong, we found that the transferred files are a little bigger (they become multiples of 512 bytes).

The problem is the same with the “Linux fal service” as with the “dncopy” command.

dndir command example :
- dndir -mblock -b512 ‘nodename”user password”::[]file2.bin .
- dndir -mblock -b512 linuxbinaryfile.bin ‘nodename”user password”::[]file1.bin

fal parameters
/etc/dnetd.conf :
FAL 17 Y none fal -ae –f /etc/dnetd.conf.fal
/etc/dnetd.conf.fal
.bin b 512
.exe b 512
.txt r
etc…
-----------------------------------
Example with a test file that contains 43251 characters = “84 sectors + 243 bytes” : zi_43215.bin
(On VMS hardware) dump /header zi_43215.bin

Structure level and version 2, 1

Record type : Fixed
File organization : Sequential
Record attributes : <none spefified>
Record size : 512
Highest block : 90
End of file block : 85
End of file byte : 243
Bucket size : 0
Fixed control area size : 0
Etc…

dncopy -mblock -b512 ‘nodename”user password”::ZI_43251.BIN .
ls –l
-rw-r—r-- 1 user user zi_43251 2017-11-13 17:54 zi_43251.bin
(It is OK)

// I delete the file on VMS, than I do :
dncopy -mblock -b512 zi_43251.bin ‘nodename”user password”::ZI_43251.BIN

(On VMS hardware) dump/header zi_43215.bin

Structure level and version 2, 1

Record type : Fixed
File organization : Sequential
Record attributes : <none spefified>
Record size : 512
Highest block : 90
End of file block : 86
End of file byte : 0
Bucket size : 0
Fixed control area size : 0
Etc…
(It is WRONG)
--------------------------------------------------------------

We tried to understand and correct the problem, but without success !

Is it a bug or a limitation ?
Perhaps we make mistakes in parameters usage ?

Do you know if there is a workaround or fix ?
 
Old 11-14-2017, 08:08 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Why are you using block mode and not record mode?
 
Old 11-14-2017, 02:40 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Hello and welcome to LQ.


http://www.decuslib.com/decus/vmslt0...aq-single.html Streamlf issue??
 
Old 11-15-2017, 02:28 AM   #4
n.meyer
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Unhappy

Thank's "smallpond" and "jefro"

//---

It's a good idea to re-read the web page http://www.decuslib.com/decus/vmslt0...aq-single.html
But I didn't find any other good idea !

I use VMS systems and dnprogs for a long time (15 years !).
I'm pretty familiar with file format issues.
I think that the best way (for us) is really the binary mode "block".
But today, we have a new need : the exact binary filesize with the "dnprogs package" !.

//---

Why are you using block mode and not record mode?
-----
The "block mode" works fine from VMS to Linux.
From Linux to VMS, it also works good, except the wrong "End Of File" (the file is a little bigger : the filesize becomes multiples of 512 bytes).
-----

We use block mode because we move binary files, which can be used on both side (VMS and Linux).
With StreamLF we have additionnal extra data in the VMS File (Linux->VMS).

//---

We will continue to seek a solution.
Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] alignment is offset by 512 bytes. This may result in very poor performance mfoley Slackware 10 12-29-2017 06:53 PM
Is it okay if my sector size is "512 bytes / 4096 bytes" Altiris Slackware 5 07-31-2015 03:19 AM
Set custom block sizes (512-4096 bytes) in Gparted? permissive Linux - General 5 08-23-2013 04:27 AM
Why MBR is limited to 512 bytes? RaviTezu Linux - Newbie 8 11-21-2012 07:47 AM
How can I convert MATE-Desktop to display bytes correctly (as multiples of 1024)? nokangaroo Linux - Desktop 1 04-14-2012 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration