If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DSNUTILB LOAD and NEXTVAL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Jan 2013
Posts: 2
DSNUTILB LOAD and NEXTVAL

Hi,
Is it possible to code NEXTVAL to get a sequence number from a sequence object in the Load control statement while loading using DSNUTILB?

The fol. does not work

LOAD DATA RESUME YES LOG YES INDDN SYSREC00 INTO TABLE
SCHEMA.TABLE
(
USER_UID (NEXTVAL for SCHEMA.SEQOBJECT), PIN POSITION( 1 )
CHAR( 6)
NULLIF( 7)='?',

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Apr 2012
Posts: 121
Try using an import, I am pretty sure load bypasses that sort of thing.
IBM DB2 9.7 Information Center for Linux, UNIX, and Windows
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 2,153
sorry azready : DSNUTILB sounds like Z/OS
that is what you get when people do not indicate platform and db2 version...
__________________
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Jan 2013
Posts: 2
We are on z/OS platform and DB2 version 10. One of the tables is going to be dropped and recreated with USER_UID as the primary key and a sequence object is being built to get the UIDs. The problem is when I unload data from the old database, the sequence object does not exists. I need to somehow get the UIDs from the seq object during load. Don't know if it is possible. Tried the fol. during load and I get INVALID syntax error.

LOAD DATA RESUME YES LOG YES INDDN SYSREC00 INTO TABLE
SCHEMA.TABLE
(
USER_UID (NEXTVAL FOR SCHEMA.SEQOBJECT),
INVALID KEYWORD - NEXTVAL PIN POSITION( 1 )
CHAR( 6)
NULLIF( 7)='?',

LOAD DATA RESUME YES LOG YES INDDN SYSREC00 INTO TABLE
SCHEMA.TABLE (
USER_UID (SELECT NEXT VALUE FOR SCHEMA.SEQOBJECT),
INVALID KEYWORD - SELECT
PIN POSITION( 1 )
CHAR( 6)
NULLIF( 7)='?',
Reply With Quote
  #5 (permalink)  
Old
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,649
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On