MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Load DB2 table using GDG

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Tue Aug 24, 2010 2:14 pm    Post subject: Load DB2 table using GDG Reply with quote

Hi all,

I have a question regarding how to load from GDG?

I have taken a image copy to GDG.
Then I have unloaded it to a dataset.
Then when i tried to load into table i got all junk values in the table.

UNLOAD FROM IMAGE COPY JCL:
Code:

 //UTIL    EXEC DSNUPROC,SYSTEM=N6Q1,                                   
 //             UID='FROMIC'                                             
 //ULDDDN    DD DSN=SMUR540.UNLOAD.DATASET,DISP=SHR                     
 //*            UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)                       
 //PNHDDN    DD DSN=SMUR540.PUNCHDSN.NGTSDB.TPARTS.@100525,DISP=SHR     
 //*            UNIT=SYSDA,SPACE=(TRK,(5,5),RLSE),                       
 //SYSIN     DD *                                                       
 UNLOAD TABLESPACE NGTSDB.TPARTS                                         
 FROMCOPY SMUR540.NGTSDB.ICOPY.TPARTS.G0001V00                           
 PUNCHDDN PNHDDN UNLDDN ULDDDN                                           
 EBCDIC CCSID(37,37,37)       

LOAD JCL SYSIN:
Code:

//DSNUPROC.SYSIN DD *                                 
LOAD DATA REPLACE INDDN SYSREC   LOG NO   NOCOPYPEND   
 EBCDIC CCSID(37,37,37)                               
 INTO TABLE                                           
 "$SMUR540".                                           
 "TBL_PARTY_PAR_TEST"                                 
 ( "PAR_ID"                                           
  BIGINT                                               
 , "REF_ID_PARTY_TYPE"                                 
   BIGINT                                             
 )                                                     


RESULT:
Code:

 UNLOAD TABLESPACE NGTSDB.TPARTS                                         
S -   FROMCOPY SMUR540.NGTSDB.ICOPY.TPARTS.G0001V00 PUNCHDDN PNHDDN UNLDDN
                                                                         
UNLOAD PHASE STATISTICS - NUMBER OF RECORDS UNLOADED=19307 FOR TABLE     
                                                                         
UNLOAD PHASE STATISTICS - NUMBER OF RECORDS UNLOADED=19307 FOR TABLESPACE
                                                                         
UNLOAD PHASE COMPLETE, ELAPSED TIME=00:00:06                             
UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0                         



Code:

SELECT * FROM $SMUR540."TBL_PARTY_PAR_TEST"

PAR_ID               REF_ID_PARTY_TYPE   
-------------------- --------------------
  427841964600197120      281474976710656
  427841964600197120      562949953421312
  427841964600197120      844424930131968
  427841964600197120     1125899906842624
  427841964600197120     1407374883553280
  427841964600197120     1688849860263936
  427841964600197120     1970324836974592
  427841964600197120     2251799813685248
  427841964600197120     2533274790395904
  427841964600197120     2814749767106560
.
.
.

19307 record(s) selected.


Could anyone of you please correct me where i am going wrong?

Sad
_________________
Satya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Tue Aug 24, 2010 5:29 pm    Post subject: Reply with quote

satyenderd,

You need to use the output load card from SYSPUNCH and NOT your own load card.

PUNCHDDN SYSPUNCH specifies that the UNLOAD utility is to generate LOAD utility control statements and write them to the data set that is defined by the SYSPUNCH DD statement; SYSPUNCH is the default.

Unloading data from image copy data sets

Example 3: Unloading data from an image copy

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Wed Aug 25, 2010 1:50 pm    Post subject: Reply with quote

It worked.
Thanks a lot Kolusu for your time.

Smile
_________________
Satya
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group