|
I don't think the premise is incorrect at all. In general, SQL on i5/OS has been pretty good about playing well with DDS. And format level is something that, while it's a "DDS thing", there's no reason SQL shouldn't honor it. Over the years I think we've all been under the assumption that some sort of hash of the field names and attributes has been used to generate the file format level, in such a way that if you compile two files with the exact same record formats that they would get the same format level (and this in fact is borne out by empirical testing). So IMHO it's natural to assume that creating a file with SQL would use the same hash technique to create the format level ID. However, that's not happening. One of two things is happening: either SQL is calculating the hash differently, or we're missing something that's included in the hash. I think it's the latter, and I think I know why, though: the format NAME is probably different for the two files. In an SQL generated file, the format name is always the name of the file. I'll bet the format name is not being set to the name you specify on the CREATE, and I'll additionally bet that the format name plays an integral part in the format level ID hash. Joe
From: R Bruce Hoffman well, the premise seems wrong. The WITH DATA clause is not a part of the LIKE syntax on CREATE TABLE. It's part of the as-subselect only. The CREATE TABLE LIKE does create an empty table. Second, the level wouldn't matter in an SQL environment. So... the issue seems to be that you are mixing SQL and native RPG I/O that would be dependant upon the record format level id's being the same.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.