473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

db2 command line help for UDB v8.2 Linux

I am trying to script a manual operation using DB2's command line.
Simple commands are working, but the command entered below displays a
"db2 (cont.) =>" prompt, then fails on any input? I'm missing something
obvious, but I don't see it.

P.S. There are no trailing spaces.

db2 'load \
from AAA_Auto.TAB of del \
modified by dateformat=\"m/d/yyyy\" coldel0x09 \
method p ( 1, 2, 3, 4, 5, 6, 7, 8, 9, \
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
110, 111, 112, 113, 114, 115, 116, 117, 118 \
) \
messages AAA_Auto.messages \
replace \
into nullid.AAA_Auto_in \
nonrecoverable \
without prompting '
Apr 6 '07 #1
3 2130
Bob Stearns wrote:
I am trying to script a manual operation using DB2's command line.
Simple commands are working, but the command entered below displays a
"db2 (cont.) =>" prompt, then fails on any input? I'm missing
something obvious, but I don't see it.

P.S. There are no trailing spaces.

db2 'load \
from AAA_Auto.TAB of del \
modified by dateformat=\"m/d/yyyy\" coldel0x09 \
method p ( 1, 2, 3, 4, 5, 6, 7, 8, 9, \
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
110, 111, 112, 113, 114, 115, 116, 117, 118 \
) \
messages AAA_Auto.messages \
replace \
into nullid.AAA_Auto_in \
nonrecoverable \
without prompting '
I guess it has to do with the use of single and double quotes.
Try this:
1) Replace the single quotes surrounding the load statement by double quotes
and
2) Add surrounding single quotes to the value part of dateformat=... like
this:
dateformat='\"m/d/yyyy\"'

HTH.

--
Jeroen
Apr 6 '07 #2
The Boss wrote:
Bob Stearns wrote:
>>I am trying to script a manual operation using DB2's command line.
Simple commands are working, but the command entered below displays a
"db2 (cont.) =>" prompt, then fails on any input? I'm missing
something obvious, but I don't see it.

P.S. There are no trailing spaces.

db2 'load \
from AAA_Auto.TAB of del \
modified by dateformat=\"m/d/yyyy\" coldel0x09 \
method p ( 1, 2, 3, 4, 5, 6, 7, 8, 9, \
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
110, 111, 112, 113, 114, 115, 116, 117, 118 \
) \
messages AAA_Auto.messages \
replace \
into nullid.AAA_Auto_in \
nonrecoverable \
without prompting '


I guess it has to do with the use of single and double quotes.
Try this:
1) Replace the single quotes surrounding the load statement by double quotes
and
2) Add surrounding single quotes to the value part of dateformat=... like
this:
dateformat='\"m/d/yyyy\"'

HTH.
That fixed it. Apparently I don't understand *IX command quoting rules
as well as I thought!
Apr 6 '07 #3
Bob Stearns wrote:
The Boss wrote:
>Bob Stearns wrote:
>>I am trying to script a manual operation using DB2's command line.
Simple commands are working, but the command entered below displays
a "db2 (cont.) =>" prompt, then fails on any input? I'm missing
something obvious, but I don't see it.

P.S. There are no trailing spaces.

db2 'load \
from AAA_Auto.TAB of del \
modified by dateformat=\"m/d/yyyy\" coldel0x09 \
method p ( 1, 2, 3, 4, 5, 6, 7, 8, 9, \
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
110, 111, 112, 113, 114, 115, 116, 117, 118 \
) \
messages AAA_Auto.messages \
replace \
into nullid.AAA_Auto_in \
nonrecoverable \
without prompting '


I guess it has to do with the use of single and double quotes.
Try this:
1) Replace the single quotes surrounding the load statement by
double quotes and
2) Add surrounding single quotes to the value part of dateformat=...
like this:
dateformat='\"m/d/yyyy\"'

HTH.
That fixed it. Apparently I don't understand *IX command quoting rules
as well as I thought!
It's not my favourite topic either, so I am glad it did work :-)
Thanks for the feedback.

--
Jeroen
Apr 6 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Robert | last post by:
I am using the php4-cgi Debian package which is based on PHP 4.3.4. I have problems when running php4 on the command line. If I say something like $ php4 index.cgi a number of variables...
1
by: me | last post by:
I have been looking online for a year, and cant find one. I used to use the int86() command in dos command-line mode, but it can't work in linux. I am using Allegro to make my program work, but I...
0
by: Fraser Campbell | last post by:
Hi, We're trying enter polish language into mysql. My understanding is that polish language uses iso-8859-2 character set. I am cutting and pasting polish text from a web browser (Konqueror)...
4
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the...
9
by: Toralf Kirsten | last post by:
Hi, we installed db2 v8.1 on red hat linux 9. Unfortunately, the backspace and the delete button doesn't work in the right way. Instead of deleting chars, control characters are inputed. That...
3
by: Double Echo | last post by:
Hi all, I'm using PHP 4.4.2, and use PHP on both the command-line and the web. I am running PHP on SuSE 10 Linux , in a VMware 5.5 workstation, using Apache 2.0.55 , on my Dell laptop. ...
6
by: 31337one | last post by:
Hello all, I was wondering if there is a C/C++ command line parser that works for linux AND windows. . Anyways, the ideal parser im looking for should be able to support multiple arguments...
16
by: John Salerno | last post by:
Here's my new project: I want to write a little script that I can type at the terminal like this: $ scriptname package1 where scriptname is my module name and any subsequent arguments are the...
11
by: Michele Simionato | last post by:
The subject says it all, I would like a script to act differently when called as $ python script.py and when called as $ python -i script.py. I looked at the sys module but I don't see a way to...
10
by: Justin | last post by:
We have a simple shell script called testsp.sh (located at /home/ userid) Within the shell script, the following command is called: db2 -tvf callsp.sql When the shell script is run in command...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.