🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #41044

Re: "comma-delimited" format for data files

#41044
From: Clayton Cramer
Date: Mon, 08 Jan 1990 23:10
46 lines
2545 bytes
In article <3008@infmx.UUCP>, aland@infmx.UUCP (Dr. Scump) writes:
> I have heard the above term thrown around but can't find any hard info
> on it.  I gather that the protocol is that all fields are delimited by
> commas and that all character fields are enclosed in (double) quotes.

Character fields only need to be enclosed in double quotes if they
contains commas themselves.

> My questions:
>    1) is the premise correct?  if not, what is the truth?

Yes.  What is truth? :-)

>    2) what is the origin for the format, and how widely is it used?
>       what product(s) use this format as their primary/only format
>       for data unloaded to flat files?

I believe it derives from CP/M BASIC programs, since the strings
enclosed in double quotes are a traditional BASIC way of passing in
fields containing commas.

I know of at least one word processor (Volkswriter) that uses this
format for fill in the blanks type form letters.  PC-File III
(or whatever it is calling itself these days) both reads and write
comma-delimited files, as does Microsoft Excel.

>    3) what is the protocol for embedding a double quote within a 
>       character field to keep it from being taken as a delimiter?

Two double quotes in a row.  I don't know if anyone recognizes
the use of back slash as an escape.  The two double quotes rule
derives from ancient history -- it was standard when I learned
to program on an IBM 1401.

>    4) are DATE-type fields enclosed in quotes, for those products
>       which support a DATE datatype and use comma-delimited format?

I've never seen commas in DATE fields, so I would assume that DATE
fields wouldn't need quotes around them.

>   Alan S. Denney  @  Informix Software, Inc.    "We're homeward bound
-- 
Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer
"Power still comes from guns" -- Newsweek, 01/08/90, p. 25.
===============================================================================
Disclaimer?  You must be kidding!  No company would hold opinions like mine!
Technical Details
Message-ID: <2926@optilink.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!sun-barr!lll-winken!tekbspa!optilink!cramer
References: <3008@infmx.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!sun-barr!lll-winken!tekbspa!optilink!cramer
From: cramer@optilink.UUCP (Clayton Cramer)
Newsgroups: comp.sys.ibm.pc
Subject: Re: "comma-delimited" format for data files
Keywords: comma comma down doobie do down down, comma comma
Message-ID: <2926@optilink.UUCP>
Date: 8 Jan 90 23:10:39 GMT
References: <3008@infmx.UUCP>
Distribution: usa
Organization: Optilink Corporation, Petaluma, CA
Lines: 46