By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,285 Members | 2,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,285 IT Pros & Developers. It's quick & easy.

Problem with multiple rows insert on MVS OS 390

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a

<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

P: n/a

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

P: n/a
"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.