473,320 Members | 1,691 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,320 software developers and data experts.

Problem with multiple rows insert on MVS OS 390

fip
Hi,

On DB2 7.1.2 on MVS OS 390, when I tried to do an insert with
multiple row contents in the values clause:

insert into table11 values('aaaa', 'fa'), ('bbbb', 'fb')

I got the error:

DB21034E The command was processed as an SQL statement because it
was not a valid Command Line Processor command. During SQL
processing it returned: SQL0104N An unexpected token "," was
found following "". Expected tokens may include:
"<END-OF-STATEMENT> ". SQLSTATE=42601

I tried the same statement windows DB2 7.2.7 and unix DB2 7.2.8 and
it worked.

What needs to be done to make it work on the mainframe?

Thanks a lot.

Nov 12 '05 #1
4 5113

<fi*@ip8.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hi,

On DB2 7.1.2 on MVS OS 390, when I tried to do an insert with
multiple row contents in the values clause:

insert into table11 values('aaaa', 'fa'), ('bbbb', 'fb')

I got the error:

DB21034E The command was processed as an SQL statement because it
was not a valid Command Line Processor command. During SQL
processing it returned: SQL0104N An unexpected token "," was
found following "". Expected tokens may include:
"<END-OF-STATEMENT> ". SQLSTATE=42601

I tried the same statement windows DB2 7.2.7 and unix DB2 7.2.8 and
it worked.

What needs to be done to make it work on the mainframe?

Thanks a lot.

Sorry, but you're not going to be able to do that on the mainframe at all. I
just checked the OS/390 Version 7 and 8 SQL References and neither one
supports multiple rows being given in an INSERT statement.

I know that seems odd - DB2 for Windows/Unix/Linux has supported the
multiple row insert for quite a while - but the mainframe doesn't support it
even in Version 8, which is the latest and greatest version. Maybe they'll
support it eventually, I don't know.

In the meantime, you'll have to write a separate INSERT for each row you're
adding to the table. Or maybe you could set up communications so that your
workstation client does the inserts instead of doing them directly on the
mainframe.

Rhino

Nov 12 '05 #2

fi*@ip8.com wrote:
Hi,

On DB2 7.1.2 on MVS OS 390, when I tried to do an insert with
multiple row contents in the values clause:

insert into table11 values('aaaa', 'fa'), ('bbbb', 'fb')

I got the error:

DB21034E The command was processed as an SQL statement because it
was not a valid Command Line Processor command. During SQL
processing it returned: SQL0104N An unexpected token "," was
found following "". Expected tokens may include:
"<END-OF-STATEMENT> ". SQLSTATE=42601

I tried the same statement windows DB2 7.2.7 and unix DB2 7.2.8 and
it worked.

What needs to be done to make it work on the mainframe?

Thanks a lot.


there are lots of differences, z/OS <> LUW. there is a RedBook on
cross-platform development which goes over both DDL and DML
mismatches. not in cubeland, so i don't have the title. search
DB2 RedBooks. (the specific issue is likely due to the nature
of services supported by VSAM; z/OS DB2 is just a wrapper.)

btdb

Nov 12 '05 #3
"BobTheDatabaseBoy" <gn*****@rcn.com> wrote in message
there are lots of differences, z/OS <> LUW. there is a RedBook on
cross-platform development which goes over both DDL and DML
mismatches. not in cubeland, so i don't have the title. search
DB2 RedBooks. (the specific issue is likely due to the nature
of services supported by VSAM; z/OS DB2 is just a wrapper.)

btdb

It's actually called "SQL Reference for Cross-Platform Development Version
2" and not a redbook. It is on the DB2 site for z/OS manuals, but right now
the IBM ftp site is fubar'ed, so I cannot bring up the link for that manual.
Nov 12 '05 #4
In article <Ud********************@comcast.com>, Mark A
(no****@nowhere.com) says...
"BobTheDatabaseBoy" <gn*****@rcn.com> wrote in message
there are lots of differences, z/OS <> LUW. there is a RedBook on
cross-platform development which goes over both DDL and DML
mismatches. not in cubeland, so i don't have the title. search
DB2 RedBooks. (the specific issue is likely due to the nature
of services supported by VSAM; z/OS DB2 is just a wrapper.)

btdb

It's actually called "SQL Reference for Cross-Platform Development Version
2" and not a redbook. It is on the DB2 site for z/OS manuals, but right now
the IBM ftp site is fubar'ed, so I cannot bring up the link for that manual.

It's at ftp.software.ibm.com/ps/products/db2/info/xplatsql/pdf/en_US/
cpsqlrv2.pdf
Nov 12 '05 #5

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

Similar topics

7
by: RotterdamStudents | last post by:
Hello there, i have a strange problem. I can't get php to insert multiple rows at once in a MySQL database. I use the $sql = "INSERT INTO database (a,b,c,d,e) VALUES ('$a', '$b' ,'$c', '$d',...
1
by: Tuhin Kumar | last post by:
Hi, I would like to know how to insert multiple rows into a table, using a single INSERT statement. My requirement is like this I have a table ABC which contains multiple employees entries with...
4
by: Raj Kotaru | last post by:
Hi, In sqlplus, I can insert a single row using: insert into employee (name, salary, hiredate) values ('xyz', '86378', sysdate); Is there a modification of the insert command that will...
3
by: DarthMacgyver | last post by:
Hello, I recently wrote a survey application. Each question is very similar. The first questions gives me a problem when there are multiple people taking the survey (The Database connection...
3
by: gregory.sharrow | last post by:
I need to secure a datawarehouse table at the row level based on 1 to many keys on that table. A user should only see the rows they have access to. I need to be able to figure out which rows they...
5
by: Arsen V. | last post by:
Hello, What is the optimal way to insert multiple rows (around 1000) from a web application into a table? The user enters multiple lines into a text box (up to 10,000). The ASP.NET...
20
by: talktozee | last post by:
Hey, everyone! Basically, I need to insert *multiple rows* into table A from table B based upon some criteria, and I need to insert some static values along with each row from table A. For...
1
by: dhyder | last post by:
OK, like the title says my error is Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. I have looked into this a lot, but have not...
58
by: bonneylake | last post by:
Hey Everyone, Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.