Using Control-G
Posted in 2003
Topics: General Discussion
I am
trying to load data files using the dbload command, when the files are
limited by "|" it works ok, but if the delimiter is control-g (^G) the load
does not work, there is any one who can help me with the syntax of the
dbload to use control-g as delimiter
I crated the command file as :
file "adm_assist_mode.dat" delimiter "|" 6;
insert into DBO.adm_assist_mode;
To use pipe delimiter, what needs to be modified in the system that will
allows me to use the Ctrl-g as field separator.
Reg,
Henry Ardila
Henry
It is my belief that you cannot use an unprintable character as the
delimiter in a dbload file therefore you must either change your delimiter
to a pipe (or other printable that is not used in your load file) or define
your fields by position rather than delimited. Check the Migration Guide for
position loads.
To change your CTRL + G (Bel) to pipe (assuming unix) use:-
tr '\\\\007' '|' < infile > outfile
where infile is your original load file and outfile is the file with pipes.
Incidently the '6' in the command file is the number of fields to be loaded
per record (in case you made a straight copy from the manual :-) )
Keith
-----Original Message-----
From: Ardila, Hen.... [mailto:henry.ardila-eds@eds.com]
Sent: Tuesday, October 28, 2003 09:25
To: ids@iiug.org
Subject: Using Control-G [2085]
I am trying to load data files using the dbload command, when the files are
limited by "|" it works ok, but if the delimiter is control-g (^G) the load
does not work, there is any one who can help me with the syntax of the
dbload to use control-g as delimiter
I crated the command file as :
file "adm_assist_mode.dat" delimiter "|" 6;
insert into DBO.adm_assist_mode;
To use pipe delimiter, what needs to be modified in the system that will
allows me to use the Ctrl-g as field separator.
Reg,
Henry Ardila
********************************************************************************
**
This message is sent in strict confidence for the addressee only. It may
contain legally privileged information. The contents are not to be disclosed
to anyone other than the addressee. Unauthorised recipients are requested
to preserve this confidentiality and to advise the sender immediately of any
error in transmission.
This footnote also confirms that this email message has been swept for the
presence of computer viruses, however we cannot guarantee that this message
is free from such problems.
********************************************************************************
**
Ardila,
Hen.... wrote:
> I am trying to load data files using the dbload command, when the files are
> limited by "|" it works ok, but if the delimiter is control-g (^G) the load
> does not work, there is any one who can help me with the syntax of the
> dbload to use control-g as delimiter
>
> I crated the command file as :
>
> file "adm_assist_mode.dat" delimiter "|" 6;
> insert into DBO.adm_assist_mode;>
> To use pipe delimiter, what needs to be modified in the system that will
> allows me to use the Ctrl-g as field separator.
You obviously need to change the pipe character inside the double quotes.
However, DON'T put a REAL CONTROL-G in there. You have to use the two
characters "^" and "G", as in:
FILE "adm_assist_mode.dat" DELIMITER "^G" 6;
INSERT INTO DBO.adm_assist_mode;
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| Mydas Solutions Ltd http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+