Novell Home

GW System Data Extraction to CSV

Novell Cool Solutions: Trench
By Bob Jonkman, William Hong

Digg This - Slashdot This

Posted: 19 Apr 2001
 

Current versions: GroupWise 5.5 EP, GroupWise 6

Bob and William work for the City of Toronto, which after their 7-municipality amalgamation, has been all GroupWise since December 1999. Go Canada!

Ever wanted to get everything in your GroupWise system out to a spreadsheet, database, or other application? This utility does that by converting the output from the API Gateway's "list" command to Comma Separated Values format (also known as "Comma-Quote" format).

This can then be imported into most other applications. The whole GroupWise system can be exported in this fashion, or just specific domains or post offices.

The GroupWise API gateway produces output in tagged-field format -- each item of information extracted from the GroupWise system is tagged with the name of the field. This is useful if the data will be used as input to the GW API gateway, but most other applications (databases, spreadsheets) don't import tagged-field files.

GWCONV will parse a GW API Gateway output file to produce a file with the same data in Comma Separated Values format (also known as "Comma-Quote" format), which most other applications can import. The first line of output consists of the field names for all the fields contained in the output file.

License: This program is distributed as "OJ-Ware" (buy the author an Orange Juice if you find it useful)

Support: None, but you can send e-mail to Bob Jonkman to be the happy recipient of an e-mail with encouraging words. Send compliments to William Hong if you found this program useful.

Reference: GW API Gateway for DOS documentation

Version History:

  • v1.5 Dated 19 Apr 2001
    • Added ability to handle composite constructs ("Group=", "GW-ALIAS=" and "X400-NAME") in the inputfile.
    • Create separate output files for each composite constructs.
    • Fixed line number counter to go beyond number 32767.
  • v1.0 Dated 11 Mar 1999
    • Does not support composite constructs ("Group=", "GW-ALIAS=" and "X400-NAME") in the inputfile.

Usage: GWCONV inputfile(s) outputfile [out_dist_grp] [out_alias] [out_x400]

  • The "inputfile" parameter can include wildcards; all files matching the wildcard pattern will be processed.
  • If "outputfile" already exists then new records will be appended to the existing file.
  • Optional filenames:
    • [out_dist_grp] - filename for GroupWise Distribution Group output file.
      If it already exists then new records will be appended to the existing file.
      Default output filename: GWDstGrp.csv
    • [out_alias] - filename for GroupWise Alias output file.
      If it already exists then new records will be appended to the existing file.
      Default output filename: GW_Alias.csv
    • [out_x400] - filename for GroupWise X400 output file.
      If it already exists then new records will be appended to the existing file.
      Default output filename: GW_X400.csv

Description:

The GroupWise API gateway produces output in tagged-field format -- each item of information extracted from the GroupWise system is tagged with the name of the field (see Example 1). This is useful if the data will be used as input to the GW API gateway, but most other applications (databases, spreadsheets) don't import tagged-field files. GWCONV will parse a GW API Gateway output file to produce a file with the same data in Comma Separated Values format (also known as "Comma-Quote" format), which most other applications can import (see Example 2). The first line of output consists of the the field names for all the fields contained in the output file. Each field is delimited by a double-quote character, so that a field can include the comma (,) character. Input data containing the double-quote character (") causes undefined results.

The following fields are parsed and output by GWCONV:

Domain
Post-Office
Object
Last-Name
First-Name
Phone
Fax
Department
Title
Visibility
Network-ID
Account-ID
User-Def-1
User-Def-2
User-Def-3
User-Def-4
User-Def-5
User-Def-6
User-Def-7 B User-Def-8 B User-Def-9
User-Def-10

Group=
Group-Domain=
Group-Name=
Group-Post-Office=
Participation=

GW-Alias=
Description=
External-Name=
Type=

X400-Name=
ADMD=
Country=
DDA-Type1=
DDA-Type2=
DDA-Type3=
DDA-Type4=
DDA-Value1=
DDA-Value2=
DDA-Value3=
DDA-Value4=
Generation=
Given-Name=
Initials=
Last-Name=
Org=
PRMD=
OU1=
OU2=
OU3=
OU4=

GWCONV was written to emulate output from the GW v4.1a AD.EXE export function, and so does not recognize fields from GW v5.x NDS integration, such as "Description". Unrecognized fieldnames in the inputfile will be ignored.

NOTE: Composite constructs (such as "Group=", "GW-ALIAS=" and "X400-NAME") in the inputfile are now supported by GWCONV v1.5. An earlier version of GWCONV v1.0 dated March 11, 1999 did not support composite constructs in the inputfile.

If multiple inputfiles (with wildcards) are specified on the command line all files will be processed, and the data from each input file will be concatenated. The field header record is created only once, at the start of a new output file. Field headers are not written when appending to an existing file.

As GWCONV runs it displays a running total of lines parsed in the current input file.

Use the GW API Gateway input file from Example 3 to create an inputfile suitable for GWCONV. Include a DS-USER section for every domain to be included in the generated files. The GW API Gateway will produce one output file for each of the DS-USER sections. GWCONV can read all these files in one operation through the use of a wildcard for the inputfile.

See the Helpfile included in the zipfile for examples.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell