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
 

 

Need help on DB2 Reorg with DISCARD option

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
honeykun

New User


Joined: 16 Apr 2007
Posts: 3
Location: philippines

PostPosted: Thu Jun 18, 2009 11:20 am    Post subject: Need help on DB2 Reorg with DISCARD option
Reply with quote

Hi folks,

I am having problems with my JCL that runs a DB2 Reorg with Discard option. Below is the code:

//STEP010 EXEC PGM=DSNUTILB,
// PARM=(TDB2,'REORG'),
// REGION=0M
//STEPLIB DD DISP=SHR,DSN=SYS3.DB2.BMCTOOLS.SY2.LOAD
// DD DISP=SHR,DSN=TDB2.DSNEXIT
// DD DISP=SHR,DSN=TDB2.DSNLOAD
//ABNLIGNR DD DUMMY
//DSSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//UTPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
REORG TABLESPACE TSG.TSSAMP
LOG NO
SORTDATA
SORTKEYS
SORTDEVT WORK
SORTNUM 12
COPYDDN (SYSCOPY)
DISCARDDN (SYSDISC)
SHRLEVEL REFERENCE
UNLOAD CONTINUE
DISCARD FROM TABLE TSG.TBSAMP
WHEN TB_DATE < CURRENT_DATE - 2 YEAR
STATISTICS
TABLE (ALL)
INDEX (ALL)
KEYCARD
FREQVAL
NUMCOLS 4
COUNT 10
//*

I tried using
DISCARD FROM TABLE TSG.TBSAMP
WHEN TB_DATE < CURRENT_DATE - 2 YEAR

and

DISCARD FROM TABLE TSG.TBSAMP
WHEN TB_DATE < CURRENT DATE - 2 YEAR

But I am getting an error:
DSNU049I DSNUGPRS - INVALID OPERAND 'CURRENT_DATE' FOR KEYWORD 'FROM'

and
DSNU049I DSNUGPRS - INVALID OPERAND 'CURRENT' FOR KEYWORD 'FROM'

Hope you could help me sort this out! Thanks in advance!
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jun 18, 2009 10:08 pm    Post subject:
Reply with quote

HoneyHun,

Where is DD statement for SYSDISC.
Check out DB2 V9.1 utility guide & Reference there is an example in PG 530.

Thank You,
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 BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Compiler option for override the exte... muralikrishnan_new COBOL Programming 9 Fri Jul 08, 2016 12:09 pm
No new posts ICETOOL higher option Anshul Das DFSORT/ICETOOL 14 Thu Apr 14, 2016 8:00 am
No new posts CEXEC not able to execute if no SLINE... boyti ko CLIST & REXX 2 Wed Apr 13, 2016 4:31 pm


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