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 delete the records from table through JCL

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

New User


Joined: 12 Dec 2006
Posts: 14
Location: pune

PostPosted: Wed Mar 19, 2008 2:24 pm    Post subject: how to delete the records from table through JCL
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Wed Mar 19, 2008 2:32 pm    Post subject: Reply to: how to delete the records from table through JCL
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Wed Mar 19, 2008 4:36 pm    Post subject:
Reply with quote

"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
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Wed Mar 19, 2008 6:00 pm    Post subject:
Reply with quote

Hi Umeysan

Can you please expain about KONTO_ID
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Wed Mar 19, 2008 6:18 pm    Post subject:
Reply with quote

...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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 19, 2008 9:44 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Mar 19, 2008 9:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
snehal

New User


Joined: 12 Dec 2006
Posts: 14
Location: pune

PostPosted: Thu Mar 20, 2008 3:55 pm    Post subject:
Reply with quote

Thanks a lot Umeysan... ur suggested JCL working fine...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 20, 2008 9:24 pm    Post subject:
Reply with quote

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 icon_smile.gif
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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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