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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm


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