Release 10.1A: OpenEdge Deployment:
Managing 4GL Applications

> ## Examples using BUNDLE

> 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:

>     # bundle xcode.bun -select
>     this.x
>     that.x
>     what.x
>     ^D

> You can also put the selections into a file, as shown:

>     # cat >xcode.sel
>     this.x
>     that.x
>     what.x
>     ^D
>     # bundle xcode.bun -select xcode.sel

> 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:

>     C:> unbundle xcode.bun /select
>     this.x   usr2:[xcode]this.x
>     that.x   usr1:[xcode]that.x
>     ^Z

> You can also put the selections into a file, as shown:

>     C:> create xcode.sel
>     this.x   usr2:[xcode]this.x
>     that.x   usr1:[xcode]that.x
>     ^Z
>     C:> unbundle xcode.bun /select xcode.sel

> 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:

>     C:> dir *.p | bundle -ascii pcode.bun
>     C:> bundle pcode.bun -select
>     foo.p ascii
>     ^D
>     C:>

> Binary and ascii can be mixed in a bundle, as shown:

>     C:> bundle allcode.bun -select
>     foo.p ascii
>     foo.x binary
>     ^D
>     C:>

> Since bundle always appends files to the end, multiple files with the same name might appear in a bundle, as shown:

>     C:> bundle allcode.bun -select
>     foo.p ascii
>     xcode/foo.p binary
>     ^D
>     C:>

> 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:

>     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:

>     $ unbundle allcode.bun -select
>     foo.p /dev/null
>     foo.p
>     ^D
>     $

> 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:

>     $ unbundle mystuff.bun -full
>     # V0 Time-stamp: Thu Apr 15 19:59:19 1993
>     # V0 Current-directory: C:\TEMP
>      mon03.txt      #ascii
>     # V0 Input-file: MON03.TXT
>     # V0 File-modify-time: Thu Apr 15 19:57:12 1993
>     # V0 File-size: 2503
>      mon03.txt      #ascii
>     # V0 Input-file: ..\WVM\DOC\MON03.TXT
>     # V0 File-modify-time: Sun Apr 04 18:17:48 1993
>     # V0 File-size: 2655
>     # V0 Time-stamp: Thu Apr 15 20:00:23 1993
>     # V0 Current-directory: C:\TEMP
>      mon03.txt      #ascii
>     # V0 Input-file: mon03.txt
>     # V0 File-modify-time: Thu Apr 15 20:00:10 1993
>     # V0 File-size: 2666
>     $

> (The 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.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095