Step 1: Create a csvutil.ctl File for Exporting

You create a CSVUtil control file containing commands, and then place it in a zip file whose name ends with .bg.zip; for example: exp_rate_offering.bg.zip. When the zip file name ends with “bg.zip”, it knows to run the export job in the background. Here are the contents of the csvutil.ctl file to export an entire rate offering:

-dataFileName rate_geo_out.csv -command xcsvwpcd -tableName RATE_GEO -whereClause "rate_offering_gid = 'MDIETL.ASDF'" -excludePublic N
-mailTo customername@example.com -mailFrom customername@example.com -subject zipFileProcessDone -message hello -smtpHost mail.example.com
Note: There may only be two lines of text in the above example.
  • Place the csvutil.ctl file in a zip file called name.bg.zip, where name can be anything.
  • The xcsvwpcd (export CSV with parent and child data) command will export the rate_geo records, and will recursively export all parent and child records. This can take a while (up to 8 hours).
  • The -excludePublic N option means that referenced PUBLIC data will also be exported. If you are sure that your target database has all the required public data, then you can change this to Y, which will save some time on the export.