× 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.



I am trying to recreate a file.  First I do a 
DSPOBJD OBJ(SAFETYF/AUDINCRS) OBJTYPE(*FILE) DETAIL(*SERVICE)
and there is no DDS.

Then I figure that maybe it was created using SQL.  So I run iSeries 
Navigator to "generate SQL script" which is supposed to create the SQL 
necessary to rebuild a file.  Notice the errors in the script?

--  Generate SQL 

--  Version:                    V5R2M0 020719 

--  Generated on:               02/05/03 15:59:47 

--  Relational Database:        GDISYS 

--  Standards Option:           DB2 UDB AS/400 

 

DROP TABLE SAFETYXXX.AUDINCRS ; 

 

CREATE TABLE SAFETYXXX.AUDINCRS ( 

--  SQL1509   10   Format name AUDITINCR for AUDINCRS in SAFETYF ignored. 

--  SQL1506   30   Key or attribute for AUDINCRS in SAFETYF ignored. 

        AUDIT# DECIMAL(7, 0) DEFAULT NULL , 

        SEQUENCE# DECIMAL(7, 0) DEFAULT NULL , 

        RESPONSE VARCHAR(32700) ALLOCATE(30) CCSID 37 DEFAULT NULL ) ; 

 

ALTER TABLE SAFETYXXX.AUDINCRS 

        ADD CONSTRAINT SAFETYXXX.QSYS_AUDIT#_00001 

        FOREIGN KEY( AUDIT# , SEQUENCE# ) 

        REFERENCES SAFETYXXX.AUDITINCID ( AUDIT# , SEQUENCE# ) 

        ON DELETE RESTRICT 

        ON UPDATE RESTRICT ; 

 

ALTER TABLE SAFETYXXX.AUDINCRS 

        ADD CONSTRAINT SAFETYXXX.QSYS_AUDINCRS_00001 

        CHECK( AUDIT# IS NOT NULL AND SEQUENCE# IS NOT NULL ) ; 

 

LABEL ON TABLE SAFETYXXX.AUDINCRS 

        IS 'Responses to audit incidents' ; 

 

LABEL ON COLUMN SAFETYXXX.AUDINCRS 

( AUDIT# IS 'Audit               Number' , 

        SEQUENCE# IS 'Incident            Sequence#' ) ; 

 

LABEL ON COLUMN SAFETYXXX.AUDINCRS 

( AUDIT# TEXT IS 'Audit Number' , 

        SEQUENCE# TEXT IS 'Incident Sequence #' ) ; 

Am I wrong to figure that you cannot have a file generated by SQL with a 
record format name different from the file name?


Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.