MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CREATE TABLE AS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Mon Jul 14, 2008 11:51 am    Post subject: CREATE TABLE AS Reply with quote

Hi
I am getting the following error while creating a table as an existing table, Could anyone of you pls help me. Thanks in Advance.

CREATE TABLE TABLE02 00010023
AS (SELECT * FROM creator.tablename);
---------+---------+---------+---------+---------+---------+---------+---------+
DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL "<END-OF-STATEMENT>". SOME
SYMBOLS THAT MIGHT BE LEGAL ARE: DATA WITH <IDENTIFIER>
DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 502 0 0 -1 104 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'000001F6' X'00000000' X'00000000' X'FFFFFFFF'
X'00000068' X'00000000' SQL DIAGNOSTIC INFORMATION
_________________
Satya
Back to top
View user's profile Send private message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Mon Jul 14, 2008 11:59 am    Post subject: correction ... Reply with quote

CREATE TABLE TABLE02
AS (SELECT * FROM CREATOR.TABLE);
_________________
Satya
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Mon Jul 14, 2008 12:46 pm    Post subject: Reply with quote

What tool are you using? SPUFI? QMF? CLP? Did you try this with the entire CREATE statement on one line?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Jul 14, 2008 1:01 pm    Post subject: Reply with quote

Quote:
CREATE TABLE TABLE02 00010023
AS (SELECT * FROM creator.tablename);


You have garbage values(line numbers with num on) in col 72 thru 80. get rid of them and re run your query

type
Code:
 NUM OFF
at the command prompt and then press enter. Then type

[code:1:40876ef44c]
C P'
Back to top
View user's profile Send private message Send e-mail Visit poster's website
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Mon Jul 14, 2008 1:15 pm    Post subject: Here is the corrected one Reply with quote

Thanks for your response.

sorry for the above statement....



here is the correct one which i am using:


CREATE TABLE TABLE02
AS (SELECT * FROM CREATOR.TABLE);
_________________
Satya
Back to top
View user's profile Send private message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Mon Jul 14, 2008 1:23 pm    Post subject: Reply with quote

jsharon1248 wrote:
What tool are you using? SPUFI? QMF? CLP? Did you try this with the entire CREATE statement on one line?



Thanks Sharon for your response.

I am using SPUFI.
Yeah, I have tried even in single line.

Error::::::
CREATE TABLE TABLE02 AS (SELECT * FROM LEXUS.TLCS002); 000100
---------+---------+---------+---------+---------+---------+---------+--------
DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL "<END-OF-STATEMENT>". SOME
SYMBOLS THAT MIGHT BE LEGAL ARE: DATA WITH <IDENTIFIER>
DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 502 0 0 -1 53 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'000001F6' X'00000000' X'00000000' X'FFFFFFFF'
X'00000035' X'00000000' SQL DIAGNOSTIC INFORMATION
_________________
Satya
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Jul 14, 2008 1:26 pm    Post subject: Reply with quote

You still appear to have numbering on. Turn numbers off. (Make sure cols 73-80 are blank)
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Mon Jul 14, 2008 1:31 pm    Post subject: Reply with quote

Satyender,
Please use BBCode to make your code more readable.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Mon Jul 14, 2008 1:38 pm    Post subject: CREATE TABLE AS error Reply with quote

Nic Clouston wrote:
You still appear to have numbering on. Turn numbers off. (Make sure cols 73-80 are blank)



I am really sorry for not able to paste the code in the correct form.

The question is i am unbale to create a table using CREATE TABLE AS statement.


Code:


CREATE TABLE TABLE02 AS (SELECT * FROM creator.tablename);                 
---------+---------+---------+---------+---------+---------+---------+---------+
DSNT408I SQLCODE = -104, ERROR:  ILLEGAL SYMBOL "<END-OF-STATEMENT>". SOME     
         SYMBOLS THAT MIGHT BE LEGAL ARE: DATA WITH <IDENTIFIER>               
DSNT418I SQLSTATE   = 42601 SQLSTATE RETURN CODE                               
DSNT415I SQLERRP    = DSNHPARS SQL PROCEDURE DETECTING ERROR                   
DSNT416I SQLERRD    = 502 0  0  -1  53  0 SQL DIAGNOSTIC INFORMATION           
DSNT416I SQLERRD    = X'000001F6'  X'00000000'  X'00000000'  X'FFFFFFFF'       
         X'00000035'  X'00000000' SQL DIAGNOSTIC INFORMATION                   

_________________
Satya
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group