× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rob,

I'm curious, did you see anything that would cause the formats to be
different?  Was the MYCHAR column VARCHAR in the duplicate or anything?

Seems like a bug to me...

Charles Wilt
--
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
  

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx 
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Wednesday, September 27, 2006 10:25 AM
To: Midrange Systems Technical Discussion
Subject: Re: CRTDUPOBJ vs SQL CREATE TABLE LIKE

I even tried it with
CREATE TABLE workfile as (Select * from ARLEEN) WITH DATA 
RCDFMT ARLEENR   
 
to even get the same record format name.  File level ID I 
wouldn't be so 
concerned with.  It's that record format id that would 
concern me more. 
However they were still different.
I even tried this:

CREATE TABLE ROB/JEFF1 (MYCHAR CHAR (15 ) NOT NULL WITH DEFAULT,
MYDEC DECIMAL (9 , 2) NOT NULL WITH DEFAULT) 

CREATE TABLE JEFF2    as (Select * from JEFF1) WITH DATA RCDFMT JEFF1

And their record formats were different.

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Jeff Crosby" <jlcrosby@xxxxxxxxxxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
09/27/2006 08:48 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc

Subject
CRTDUPOBJ vs SQL CREATE TABLE LIKE






At a COMMON session I learned I could do:

CREATE TABLE workfile LIKE referencefile WITH DATA

I thought this was great for a project I'm working on.  No joy though.
First off I can't say 'WITH DATA' because SQL balks at it.  I 
can leave 
off
the WITH DATA, but then it's an empty file.  So I did it with 
a subselect,
like this:

CREATE TABLE workfile as (Select * from referencefile) WITH DATA

Which worked, and brought the data over, but still no joy.  
The file level
ID is totally different.

If I use the first method, creating an empty file and try 
CPYF, it tells 
me
I must use FMTOPT(*MAP) because 3 fields have a different 
definition.  I
assume this is because 'referencefile' was created with DDS 
and 'workfile'
is being created with SQL.  'referencefile' has some fields 
with EDTCDE 
and
itself was created using a field reference file.

My ultimate goal was to do the CREATE TABLE embedded in RPG 
instead of a
CRTDUPOBJ in CL, because this seemed clearer to me: all the 
'logic' is 
then
in the RPG.  I ended up using CRTDUPOBJ in the RPG.

I suppose as long as one of the files was created with DDS 
and the other
with SQL, it's never going to work because of the file level 
issue, right?

Thanks.

-- 
Jeff Crosby
Dilgard Frozen Foods, Inc.
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531

The opinions expressed are my own and not necessarily the 
opinion of my
company.  Unless I say so.


-- 
This is the Midrange Systems Technical Discussion 
(MIDRANGE-L) mailing 
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


-- 
This is the Midrange Systems Technical Discussion 
(MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.