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
 
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: 4650
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am

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