.**********************************************************************
.* CRTCSVDTA: Help text for Create .csv Data
.* Copyright (C) 2001  Martin Rowe  <martin@dbg400.net>
.*
.* This program is free software; you can redistribute it and/or modify
.* it under the terms of the GNU General Public License as published by
.* the Free Software Foundation; either version 2 of the License, or
.* (at your option) any later version.
.*
.* This program is distributed in the hope that it will be useful,
.* but WITHOUT ANY WARRANTY; without even the implied warranty of
.* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.* GNU General Public License for more details.
.*
.* You should have received a copy of the GNU General Public License
.* along with this program; if not, write to the Free Software Foundation,
.* Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307   USA
.**********************************************************************
.* First panel
:PNLGRP.
.**********************************************************************
:HELP NAME=CRTCSVDTA.
Create .csv Data - Help.
:P.
This command creates a flat file (one field per record) with data from
your chosen file converted to comma separated value format. This can then
be copied to a stream file using the standard CPYTOSTMF command. What
makes this different to CPYTOIMPF is the ability to specify formatting
rules at the field level, using the companion EDTFLDMAP Edit Field Mapping
rules command. See the on-line help for EDTFLDMAP for more details.
:P.
Currently only the following data types are mapped to .csv format, due to
limitations in the author's understanding ;-)
:P. Character, Packed and Zoned numerics, Floating point, Binary, Date,
Time and Timestamp. Hexidecimal and Graphic data type field are silently
(ie, with no errors) dropped. Varying length character fields are supported
but *NULLS are not - if any null capable fields are set to null, then this
routine will fail :(
:EHELP.
:HELP NAME='CRTCSVDTA/FROMFILE'.
From file (FROMFILE) - Help.
:P.
:HP3. FROMFILE :EHP3.
The source file from which data is copied. A valid database file is required.
:P.
:HP2. From file Library :EHP2.
:P.
The source file's library, or *LIBL, is required.
:EHELP.
:HELP NAME='CRTCSVDTA/TOFILE'.
From file (TOFILE) - Help.
:P.
:HP3. TOFILE :EHP3.
The target file to which data is copied. If an existing file is used, it
should be one created by this command, otherwise unpredictable results may
occur.
:P.
:HP2. To file Library :EHP2.
:P.
The target file's library is required. If an existing file is used, *LIBL
may be used instead.
:EHELP.
:HELP NAME='CRTCSVDTA/FROMMBR'.
From member (FROMMBR) - Help.
:P.
:HP3. FROMMBR :EHP3.
The source database file member that contains the data to be copied.
*FIRST may be used to pick the first (or only) file member.
:EHELP.
:HELP NAME='CRTCSVDTA/TOMBR'.
To member (TOMBR) - Help.
:P.
:HP3. TOMBR :EHP3.
The target database file member to receive the copied data.
*FIRST may be used to pick the first (or only) file member.
:EHELP.
:HELP NAME='CRTCSVDTA/MBROPT'.
Member option (MBROPT) - Help.
:P.
:HP3. MBROPT :EHP3.
Specifies whether the copied data is added to the target file member
or replaces its contents. *ADD to add records, *REPLACE to clear the
file prior to adding records.
:EHELP.
:HELP NAME='CRTCSVDTA/COLHDG'.
Column Headings (COLHDG) - Help.
:P.
:HP3. COLHDG :EHP3.
Specify if the first record of the target file should contain a delimited
list of the column headings for the source file.
:P.
:HP3. *NONE :EHP3.
Column headings will not be used. The first record will contain data from
the source file.
:P.
:HP2. *COLHDG :EHP2.
The column headings from the source file (the COLHDG attribute) are
written as the first record.
:P.
:HP2. *FIELD :EHP2.
The field names from the source file (the COLHDG attribute) are
written as the first record.
:P.
:HP2. *TEXT :EHP2.
The field text from the source file (the COLHDG attribute) are
written as the first record.
:EHELP.
:HELP NAME='CRTCSVDTA/FLDDLM'.
Field delimiter (FLDDLM) - Help.
:P.
:HP3. FLDDLM :EHP3.
Select the character used to delimit fields in the target file. The default
is a comma, but any character could be used (though not necessarily understood
by the application that processes the resultant file).
:EHELP.
:HELP NAME='CRTCSVDTA/RPLFLDDLM'.
Replacement Field Delimiter (RPLFLDDLM) - Help.
:P.
:HP3. RPLFLDDLM :EHP3.
Replace occurances of the FLDDLM character in character fields with this
character. Can be used to prevent embedded characters in strings from confusing
applications that process the file. Use the same value as FLDDLM if this isn't
a problem for your applications.
:EHELP.
:HELP NAME='CRTCSVDTA/STRDLM'.
String delimiter (STRDLM) - Help.
:P.
:HP3. STRDLM :EHP3.
Select the character used to delimit character strings in the target file.
The default is the double quote character. Any character may be used.
Leave blank to prevent a string delimiter being used.
:EHELP.
:HELP NAME='CRTCSVDTA/RPLSTRDLM'.
Replacement String Delimiter (RPLSTRDLM) - Help.
:P.
:HP3. RPLSTRDLM :EHP3.
Replace occurances of the STRDLM character in character fields with this
character. Can be used to prevent embedded characters in strings from confusing
applications that process the file. Use the same value as STRDLM if this isn't
a problem for your applications. Leave blank if STRDLM is blank.
:EHELP.
:EPNLGRP.

-- MartinRowe - 24 Jun 2005


This topic: DBG400 > SourceCodeList > PnlGrpSource > PnlGrpCRTCSVDTA
Topic revision: r2 - 01 Oct 2014 - 19:37:01 - UnknownUser
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DBG/400? Send feedback