home *** CD-ROM | disk | FTP | other *** search
- $!---------------------------------------------------------------------------
- $!
- $! wr - procedure to download files from the vax to
- $! a pc running Reflection.
- $!
- $! input: p1 - transfer type,
- $! p2 - VAX file specification, wild cards permitted. PC
- $! file names and extensions are formed by truncating
- $! the vax filenames and extensions.
- $! p3 - pc device and directory specification
- $! p4 - value to reset disable-comp-code in Reflection
- $! p5 - delete?
- $!
- $!----------------------------------------------------------------------------
- $!
- $ set noon
- $!
- $ if p2.eqs."" then goto no_file_spec
- $!
- $ esc[0,8] = %X1B
- $ esc_seq = esc + "&oCRECEIVE "
- $ switch = ""
- $ if p1.nes."IMAGE" then goto loop
- $ switch = "/i"
- $ p1 = "BINARY"
- $!
- $ loop:
- $ vax_file = f$search(p2)
- $ if vax_file.eqs."" then goto no_files
- $ f_name = f$extract(0,8,f$parse(vax_file,,,"name"))
- $ f_type = f$extract(0,4,f$parse(vax_file,,,"type"))
- $ pc_file = p3 + f_name + f_type
- $ define $file 'vax_file
- $ r2_command = esc_seq+pc_file+" from $file"+switch+" "+ p1 + " " + p5
- $ define sys$input sys$command
- $ write sys$output r2_command
- $ read/prompt="" sys$input host_startup_seq
- $ if host_startup_seq.eqs."F" then goto abort
- $ 'host_startup_seq
- $ deassign sys$input
- $ read/prompt="" sys$command completion_code
- $ deassign $file
- $ if completion_code.nes."S" then goto abort
- $ goto loop
- $!
- $ no_files:
- $ goto exit
- $!
- $ no_file_spec:
- $ write sys$output "%ERROR - file specification parameter required!"
- $ goto exit
- $!
- $ abort:
- $ write sys$output "%ERROR - file transfer aborted in file " + vax_file
- $ goto exit
- $!
- $ exit:
- $ quote = """
- $ write sys$output esc + "&oCSET DISABLE-COMP-CODES " + p4
- $ if p4.eqs."YES" then goto done
- $ read /prompt="" sys$command completion_code
- $ done:
- $ exit