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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm


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