View previous topic :: View next topic
|
Author |
Message |
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi,
I am trying to use CROSS-LOADER feature of DB2 z/OS to load data from production to development, since i have only few rows to load. And this job failed because of table having IDENTITY COLUMN GENERATED ALWAYS.
Code: |
LOAD DATA LOG NO RESUME NO REPLACE INCURSOR NSSI
INTO TABLE ASFDDATP.SITTPNSSI
FIELD PK_ROW_NUM IS NOT ALLOWED |
So, i specified IGNOREFIELDS YES in my loadcard, again i got the same error.
Code: |
LOAD DATA LOG NO RESUME NO REPLACE INCURSOR NSSI
INTO TABLE ASFDDATP.SITTPNSSI IGNOREFIELDS YES
FIELD PK_ROW_NUM IS NOT ALLOWED |
How should i load using CROSS LOADER function if the table to be loaded has IDENTITY COLUMNS ?
So, i tried the next available option. Just an ordinary insert.
Code: |
INSERT INTO ASFDDATP.SITTPNSSI OVERRIDING USER VALUE
SELECT * FROM NLVPROD.ASFDDATP.SITTPNSSI; |
I got an
Code: |
SQLCODE = -512, ERROR: STATEMENT REFERENCE TO REMOTE OBJECT IS INVALID |
If i comment out the INSERT statment and run the SELECT query
Code: |
SELECT * FROM NLVPROD.ASFDDATP.SITTPNSSI; |
I am able to get the data.
Am i missing something in LOAD as well the INSERT query ?
Thank You,
Sushanth |
|
Back to top |
|
|
Raghu navaikulam
Active User
Joined: 27 Sep 2008 Posts: 193 Location: chennai
|
|
|
|
Hi sushanth bobby
How do you defined the cursor NSSI ?
Did you avoid the IDENTITY column while defining it?
I think you can avoid the IDENTITY column while declaring Cursor(Instead of using a SELECT * FROM..) since both tables (prod & dev)having the same structure.
If you are using Load control statement without using Cursor, then you can use the combination of IGENOREFIELDS with dummy fields (DSN_IDENTITY). This will avoid loading IDENTITY columns.
This is only a logical thinking. I never tried it. Try it. Good luck.
Regards
Raghu |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Raghu,
Your logical thinking is correct about the LOAD. Thank You RAGHU.
The INSERT statement is not working, only when i am using THREE-PART names.
Thank You Very Much,
Sushanth |
|
Back to top |
|
|
|