View previous topic :: View next topic
|
Author |
Message |
snehal
New User
Joined: 12 Dec 2006 Posts: 14 Location: pune
|
|
|
|
how to delete the records from table through JCL
i.e. In my program I have to do JCL by which I have to delete the data older than 6 months from table . |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
as said many times JCL will do nothing in itself..
please clarify better what You want to do..
if... your environment is db2, an/or You are misnaming a file for a table
if .. You have a program and You want to write some code to delete data based on some criteria
if .. You want to run some other program/utility to achieve the result
if...
a good idea would be to lurk and/or search the forum forr similar problems
in order to better explain You requirements |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
"how to delete the records from table through JCL"
==> by using DSNTEP2
//STEP0100 EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2R)
RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2)
//SYSIN DD DATA
DELETE * FROM
S307.IFRS_APE_GKTO_BTAG
WHERE KONTO_ID = '9449-11-14-11.42.49.900705'
;
Regards, UmeySan |
|
Back to top |
|
|
RamsIBM
New User
Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
Hi Umeysan
Can you please expain about KONTO_ID |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
...just a name of a column in a table, used in this where-clause.
...just the german word for account-number
(...means the number of your bank-account) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
In my program I have to do JCL by which I have to delete the data older than 6 months from table . |
How are you "doing jcl" "in my program"? If you have a program, why not simply issue the DELETE sql from within the program?
There is obviously something i am misunderstandng. . . |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I think the problem is that he needs the SQL to do the delete for data that is older than 6 months but he doesn't know enought about what he is trying to do to ask the question. Without more information nobody can give him the answer. |
|
Back to top |
|
|
snehal
New User
Joined: 12 Dec 2006 Posts: 14 Location: pune
|
|
|
|
Thanks a lot Umeysan... ur suggested JCL working fine... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
ur suggested JCL working fine |
What in that jcl has anything to do with "In my program. . ."?
Good to hear that what you want is happenng |
|
Back to top |
|
|
|