Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to REMOVE orphan records using CHECK DATA utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Tue Dec 30, 2008 6:31 pm    Post subject: how to REMOVE orphan records using CHECK DATA utility
Reply with quote

Hi,

I have a parent & child table. Child table has orphan records which are not in the parent table. how to delete these records from the child table.

This is the CHECK DATA job
Code:
//HXSULLCH JOB (T,TEST),'CHECK DATA',CLASS=C,MSGCLASS=X,               
//         NOTIFY=&SYSUID                                             
//*....................................................................
//UTIL0001  EXEC PGM=DSNUTILB,COND=(4,LT),         * CD      (MJUTLCD)
//         PARM='DB2D'                                                 
//STEPLIB  DD  DISP=SHR,DSN=DB2.DB2D.DSNEXIT                           
//         DD  DISP=SHR,DSN=DB2.DB2D.DSNLOAD                           
//SYSPRINT DD  SYSOUT=*                                               
//UTPRINT  DD  SYSOUT=*                                               
//SYSERR   DD  UNIT=SYSDA,DISP=(,PASS),                               
//             SPACE=(CYL,(676,1))                                     
//SYSPUNCH DD  UNIT=SYSDA,DISP=(,PASS),                               
//             SPACE=(CYL,(676,1))                                     
//SYSUT1   DD  UNIT=SYSDA,DISP=(,PASS),                               
//             SPACE=(CYL,(676,1))                                     
//SORTOUT  DD  UNIT=SYSDA,DISP=(,PASS),                               
//             SPACE=(CYL,(676,1))                                     
 CHECK DATA     TABLESPACE SHANDB.SIMPLETS                             
      SCOPE ALL                               
      SORTDEVT SYSDA SORTNUM 03               


Thank You,
Sushanth Bobby
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Wed Dec 31, 2008 3:53 pm    Post subject:
Reply with quote

Got it. I used EXCEPTION TABLE

Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us