The following synopsis shows how to use bundle and unbundle. This section assumes you have to transfer encrypted source files, which are binary files.
First you have to create a "bundle" file. To do this you specify the output file (that is, the bundle) and one or more input files (the encrypted source files). For these examples, the bundle file has a .bun extension and the encrypted source files have a .x extension. The bundle is created on UNIX, copied to Windows, and unbundled in Windows.
Put a single file named foo.x in the bundle, as shown:
# bundle xcode.bun foo.x
Or, put all encrypted source files in the current directory in the bundle, as shown:
# ls *.x | bundle xcode.bun -select
Or, put some selected files (this, that, what) in the bundle, as shown:
Note that files are always appended to the bundle, so you can incrementally add files to it. Thus, the above sequence created xcode.bun with this in it: foo.x, all xcode files in the current directory, this.x, that.x, and what.x.
Now you need to copy the bundle to some destination. You can use FTP, making sure that binary mode is in effect.
To see what is in the bundle, enter this command:
C:> unbundle /toc xcode.bun
The unbundle program lists a short table of contents. To see a full table of contents, enter this command:
C:> unbundle /fulltoc xcode.bun
To unbundle everything in the bundle and put the files in the current directory, enter this command:
C:> unbundle /all xcode.bun
To unbundle selected files (this.x and that.x) and put them in specified directories, enter this command:
Once you have unbundled the files, they can be executed or compiled in OpenEdge.
Text files can also be bundled. You can specify -ascii on the command line, thereby making ascii the default file type; or you can specify ascii after the filename in the selection list, as shown:
In this example, the filename foo.p appears twice and represents two different files. When unbundling this (with -all) foo.p (ascii) is unbundled first and then foo.p (binary) is unbundled overwriting the other foo.p. To unbundle both files, use a selection list to give each file a unique name or put each in a different directory, as shown:
C:> unbundle allcode.bun -select
foo.p src/foo.p # This is the ascii foo.p
foo.p xcode/foo.p # This is the binary foo.p
^D
C:>
You can also use a selection list to skip over a file by directing it to the null device, as shown in the following UNIX example:
To help differentiate files with identical names, unbundle -full shows files' input file specifications, modify dates, and sizes in bytes; the current directory when the bundle was created; and a time stamp showing when the files were bundled, as shown:
V0 denotes version 0 of the bundle record format. It allows backward compatibility should this format have to be changed. You can use -select with -full to see information on selected file names.
Note: Binary dump and loads are dramatically faster. See the section on PROUTIL in OpenEdge Data Management: Database Administration for more information on binary dump and load.