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
 

 

Doubt about deleting the record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
krbabu

New User


Joined: 20 Feb 2004
Posts: 57

PostPosted: Thu Feb 26, 2004 3:05 pm    Post subject: Doubt about deleting the record
Reply with quote

hi all,
I have doubt about, which states as A record which was created before 2 years of period has to be deleteed from a database table on by checking each and every month? how u will code that JCL? while before deleting I have to take a back up copy of that table?

Can anybody explain about this
Back to top
View user's profile Send private message

mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 238
Location: USA

PostPosted: Thu Feb 26, 2004 3:44 pm    Post subject:
Reply with quote

Hello krbabu,

Below is the jcl you may require,
I have not tested it...but it should work

Code:

//UNLOAD EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
  DSN SYSTEM(DSN)
  RUN PROGRAM(DSNTIAUL) PLAN(DSNTIB71) -
  LIB('DSN710.RUNLIB.LOAD')
//*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//SYSREC00 DD DSN=DSN8UNLD.SYSREC00,
//            UNIT=SYSDA,SPACE=(32760,(1000,500)),DISP=(,CATLG)
//*
//SYSPUNCH DD DSN=DSN8UNLD.SYSPUNCH,
//            UNIT=SYSDA,SPACE=(800,(15,15)),DISP=(,CATLG),
//            RECFM=FB,LRECL=120,BLKSIZE=1200
//*
//SYSIN DD *
  DSN8710.EMP
//*
//*--------------------------------------------------------------
//DELETESTP EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
  DSN SYSTEM(DSN)
  RUN PROGRAM(DSNTIAUL) PLAN(DSNTIB71) PARMS('SQL') -
  LIB('DSN710.RUNLIB.LOAD')
//*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//SYSREC00 DD DSN=DSN8UNLD.SYSREC00,
//            UNIT=SYSDA,SPACE=(32760,(1000,500)),DISP=(,CATLG)
//*
//SYSREC01 DD DSN=DSN8UNLD.SYSREC01,
//            UNIT=SYSDA,SPACE=(32760,(1000,500)),DISP=(,CATLG)
//*
//SYSPUNCH DD DSN=DSN8UNLD.SYSPUNCH,
//            UNIT=SYSDA,SPACE=(800,(15,15)),DISP=(,CATLG)
//            RECFM=FB,LRECL=120,BLKSIZE=1200
//*
//SYSIN DD *
  LOCK TABLE DSN8710.EMP IN EXCLUSIVE MODE;
  DELETE FROM DSN8710.EMP
  WHERE EMPDATE > '2002-02-26'
//*



Hope this helps,

Regards
Mayuresh Tendulkar
Back to top
View user's profile Send private message
krbabu

New User


Joined: 20 Feb 2004
Posts: 57

PostPosted: Thu Feb 26, 2004 3:55 pm    Post subject:
Reply with quote

what is the code to back up a table?
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 238
Location: USA

PostPosted: Thu Feb 26, 2004 4:20 pm    Post subject:
Reply with quote

Hello krbabu,

Review the jcl carefully,
It has 2 steps UNLOAD & DELETESTP

In UNLOAD, the unloaded table is stored in SYSREC00

Hope this helps,

Regards
Mayuresh Tendulkar
Back to top
View user's profile Send private message
krbabu

New User


Joined: 20 Feb 2004
Posts: 57

PostPosted: Thu Feb 26, 2004 4:23 pm    Post subject:
Reply with quote

thank you mayuresh
Back to top
View user's profile Send private message
juneja_saveen

New User


Joined: 17 Jun 2005
Posts: 6

PostPosted: Sun Jun 19, 2005 3:20 pm    Post subject: Re: Doubt about deleting the record
Reply with quote

Can you please explain what is DYNAMNBR????


Thanks
Saveen.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Sun Jun 19, 2005 6:14 pm    Post subject: Re: Doubt about deleting the record
Reply with quote

Look here:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B650/16.6?DT=20040712170508
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Doubt in MFS abdulrafi IMS DB/DC 2 Fri Oct 21, 2016 3:09 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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