Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us