MH HomeMH Home
Last Modified: Thursday, January 6, 2000 Home > Uniface Tools > CSV/Excel Driver > Report Writing  
[skip navigation links]

  Services
  Tools
  Support
  Consultants
  Uniface
  Java

  Uniface Tools
  CSV/Excel Driver
  CMtool Driver
  XML/IE5 Driver
  FormToolKit
  WebToolKit
  HTML Printer
  Remote Execute
  Downloads

  Java Tools
  Downloads

  Applications

  Online Services
  Newsletters
  - Jobs
  - Announcements
  Feedback
  - Online
  - e-mail
  Advertise
  - Jobs

  About Us
  Contact Us
  Our Mission
  Privacy Policy

  Web Sites
  Worldwide
  UK
  Australia
  US
  NZ


 -    march-hare.com  

Writing Report files with UD8/CSV

Without a doubt, the most commonly needed feature in Uniface is the ability to read comma separated files. However, CSV files (or tab delimited etc) can also be very useful for writing data in, even for reports.

Download UD8/CSV driver and try it today.

The UD8/CSV Driver acts like a database to Uniface, though it is actually reading and writing delimited text files (eg: CSV files). This feature in combination with the dynamic table names feature allows you to read and write CSV files with the greatest of simplicity from within UNIFACE.

How you set filenames / tablenames

Uniface developer may communicate with the driver at run-time using the SQL proc instruction. Any 'parameter' specified in in the help file for USYS$UD8_PARAMS may be sent to the driver, or a 'tablename' string may be sent. eg:

sql ":logical_table:obsolete:new_table","$ud8"

The 3 fields are:

  • logical table being redefined
  • create parameter, if this field is "create" then a new file will be created (any existing file of that name will be destroyed).
  • physical filename, including .CSV extension

This command will have NO EFFECT on tables that are already opened. So it is best to use this command BEFORE the first retrieve or store on the table, or alternatively, close the path first, eg:

close "$ud8"
sql ":person:obsolete:client","$ud8"

How to write a CSV report

In this example we are reading all of the records where balance > 0 from the CSV fiel called customers.csv, and then writing the report to a CSV file called debtors.csv. The file customers.csv has a 1 line heading at the beginning of the file.

The assignment file setting is, eg:

[DRIVER_SETTINGS]
USYS$UD8_PARAMS=heading

An example

balance.customers= ">0"
retrieve/e "customers"
if ($status != 0) return -1

setocc "customers",-1
release/e/mod "customers"

close "$ud8"
sql ":customers:create:debtors.csv","$ud8"
sql "heading disable","$ud8"

store
commit

 

- UD8/CSV driver is available for all Uniface supported platforms


  Other tools
Version Control Solutions for Uniface

CSV Driver allows dynamic tablenames

FormToolKit brings complete proc listings to Uniface

Stop searching for Uniface personnel

UD7/XML interfaces Uniface to IE5

FREE HTML Printer Driver for Uniface

Simplify your Uniface Web Deployment

Execute software on a remote server



About Us | | Customer Area| Press Releases | Contact us | Prices & Ordering | Feedback | Privacy Policy

Copyright © 2000. March Hare Pty Ltd
All rights reserved.