File: dncopy.1

package info (click to toggle)
dnprogs 2.43.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,936 kB
  • ctags: 3,872
  • sloc: ansic: 24,686; cpp: 10,608; makefile: 769; sh: 551; awk: 13
file content (276 lines) | stat: -rw-r--r-- 8,808 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
.TH DNCOPY 1 "January 26 2005" "DECnet utilities"

.SH NAME
dncopy \- Copy files to/from a VMS system

.SH SYNOPSIS
.B dncopy
[options] source dest
.br
.B dncopy
[options] source... directory
.br
.B dntype
source...
.br
Options:
.br
[\-vdisklEVh] [\-m mode] [\-a record attributes] [\-r record format]
[\-b block size] [\-p VMS protection]
.SH DESCRIPTION
.PP
dncopy copies files to and from VMS systems.
.br

.br
Files on VMS systems should be specified in the usual transparent DECnet format
of node"username password"::[directory]file. To protect quotes and dollar signs
from shell expansion I recommend that all VMS file specifications be enclosed
in single quotes (see
.B EXAMPLES
below). If you don't want to type the password on the command-line then
put a hyphen ("-") in its place and you will be prompted for it.
.br

.br
.B dncopy
can copy single files and multiple files. If mutiple files are copied the
destination must be a directory but it may be on the local Linux system
or a VMS system. The files to be copied can be a mixture of VMS files and
local files (yes, you can copy from VMS to VMS with this program, though
quite why you would want to I'm not sure)
.br

.br
Wildcards are supported for local and VMS files (of course local wildcards are
expanded by the shell). Remember to use VMS wildcards (*%) on VMS filesystems
and Unix wildcards (*? etc) on Unix files.
.br

.br
The pseudo-filename '-' may be used to represent standard input or standard
output to enable dncopy to be used in a pipeline.
Filenames are changed to lower case when copied from VMS to Linux.
.br

.br
The environment DNCOPY_OPTIONS may be used to provide a default set of
options for copying files. If (for example) you wanted to normally send
files as blocks rather than records you could set DNCOPY_OPTIONS="-mblock".
Then, to send a file as records you would need to type
.B dncopy -mrecord myfile.txt vmsbox::
instead.
.br
Options in DNCOPY_OPTIONS may be overridden by options typed on the
command-line except where there is no negating option available (see
.B -k -d -i
). If you put these options in DNCOPY_OPTIONS then to remove them you will
have to override the whole environment variable eg:
.br
$ DNCOPY_OPTIONS="" dncopy myfile.txt vmsbox::
.br

.B dntype
is simply a version of dncopy where the output file is forced to "-". Thus
it takes all the same options as dncopy. It is merely a convenience.

.SH OPTIONS
.TP
.I "\-v"
Verbose operation. The more -v options are present the more verbose dncopy
will become. One -v is roughly equivalent to the /LOG qualifier on the DCL
copy command. More than one is really just useful for debugging.
.TP
.I "\-i"
Interactive operation. Prompts before copying a file. This option is roughly
equivalent to the /CONFIRM qualifier on the DCL copy command.
.TP
.I "\-l"
Ignore interlocks on files copied from VMS. This will do its best to read the
data regardless of record or file locking, but it won't always succeed.
.TP
.I "\-s"
Show transfer statistics. This shows the throughput of all copies (in the case
of wildcard transfers) undertaken in K bytes/second. This time does not include
that to establish the connection. eg when sending to VMS the overhead of
creating a NETSERVER process is not included.
.TP
.I "\-k"
Keep version numbers on files copied from VMS systems. By default dncopy will
strip the version number from files because they have no meaning in Linux.
if you specify -k on the command line then the VMS file will be created with
exactly the same name as it had on the VMS system. To access these files under
Linux you will need to enclose them in quotes. eg less "vmsfile.txt;1".
.TP
.I "\-m {record|block}"
Sets the transfer mode to block or record.
.B record
is the default. Normally
.B record
is what you want but
.B block
is used for sending binary files to the VMS system. Note that if you
use -mblock to pull files from VMS you may not be able to make sense of
the file on Linux because dncopy will also pull all the VMS internal
structuring of the file as well as the data. Unless you really know what
you are doing -mblock is only really useful for sending files.
.TP
.I "\-a {none|ftn|cr|prn}"
Sets the carriage control attributes for files copied to a VMS system. The
default is
.B cr.
.TP
.I "\-r {fix|var|vfc|stm}"
Sets the record format for files copied to a VMS system. The default is
.B stm.
In fact the default is STREAMLF as this corresponds to the format of files
on Unix systems and so is the least likely to result in file corruption.
If you are sending a pure text file then
.B var
or
.B vfc
may be more appropriate for your application.
.B fix
may be useful for block-structures files and data files.
.TP
.I \-b N
Set the block size for transfers. The default is high enough for all record
structured files. if you are sending a file with
.B -mblock
then you should use this to set the block size of the file to be created at
the VMS end. When sending block files the default changes to 512 as this is
typically what you would want (I hope).
.TP
.I "\-d"
Remove any trailing CR characters at the end of a line. This is useful for
sending DOS files to VMS. Only works when transferring in record mode.
.TP
.I "\-p 'protection'"
When sending files to VMS, sets the protection of the newly created remote file.
Without this option, VMS will set the protection to be the default for the remote user.  The protection should be in VMS-style format and enclosed in single 
quotes to protect it from the shell (see example). 
.br
This option is ignored when copying from VMS.
.TP
.I "\-P"
Queue the file for printing to SYS$PRINT when it arrives at the VMS end.
.TP
.I "\-D"
Delete the file when it is closed. This is only really useful in conjunction
with 
.I -P.
.TP
.I \-E
Ignore errors opening output files. This is handy if you are sending a lot
of Unix files to VMS, some of which have illegal filenames (eg ~ backup files).
dncopy will report an error for each file but continue sending.
.TP
.I \-h \-?
Displays help for using the command.
.TP
.I \-V
Show the version of the tools package that dncopy comes from.
.br
.SH ENVIRONMENT VARIABLE
You can put your most commonly used defaults in the environment variable
.B DNCOPY_OPTIONS
eg:
.br

.br
bash or ksh:
.br
$ DNCOPY_OPTIONS="-mblock -anone -b1024" ; export DNCOPY_OPTIONS
.br

.br
csh or tcsh:
.br
$ setenv DNCOPY_OPTIONS "-mblock -anone -b1024"
.br

.br
makes dncopy send files as 1024 byte blocks with no carriage control. You can
override these options by specifying replacements on the command-line as usual.
Be aware that some options have no converse (eg -i -k -d -v) so if you put
these in DNCOPY_OPTIONS you cannot disable them without deassigning the
variable.
.br

.SH EXAMPLES
.br
.br
Copy LOGIN.COM from the VMS system "tramp" to Linux as mylogin.com
.nf
.br
.PP
    dncopy 'tramp"patrick pjc123"::login.com' mylogin.com
.br

.br
Copy all .TXT files from the VMS directory SYS$SYSDEVICE:[WP] to /tmp:
.br
.PP
    dncopy 'tramp"patrick pjc123"::sys$sysdevice:[wp]*.txt' /tmp
.br

.br
Copy an executable to VMS:
.br
.PP
    dncopy -mblock test.exe 'tramp"patrick pjc123"::[.BIN]'
.br

.PP
.br
Copy a file to VMS and set its protection
.br
.PP
    dncopy secret.dat  marsha:: -p (s:, o:rwed, g:re, w:)'
.br
.br
.PP
.br
Display the contents of LOGIN.COM:
.br
.PP
    dtype 'trisha"patrick -"::login.com'
.br
    You will then be prompted for a password


.SH HELPFUL HINTS
For fetching files the defaults should serve for most purposes. Most VMS files
are record orientated and
.B -mrecord
is the default transfer mode. It is rare you will need to fetch files using
.B -mblock
because you will get all the record control information downloaded too and
that probably isn't any use to you.
.br

.br
Sending files is more complex because VMS supports far more attributes
than Linux so you will need to know something about the file you are
sending. Text files should be OK with the defaults unless you need to change
the format from the default
.B STREAMLF
to
.B VFC
or
.B VAR.
Carriage control can also be specified if you want to be that picky.

Binary files may often need to be sent -mblock to be useful at the VMS end,
You will probably want to specify a block size with the
.B -b
option. The default is 512 which is fairly useful but if you are sending
(say) a saveset 8192 or 32256 may be required. Trial-and-error may
be the only way in some cases unless you know the file contents very well.
If you really don't know what to do, just send it
.B -mblock
and use the set file/attr command to massage it on the VMS end until you are
happy with it. (If you are using VMS earlier than 6.1 then you will need
the freeware FILE utility to do this)
.SH SEE ALSO
.BR dntype "(1), " dndir "(1), " dndel "(1), " dntask "(1), " dnsubmit "(1), " dnprint "(1)"