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
 
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

Senior Member


Joined: 14 Mar 2007
Posts: 10478
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: 757
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: 757
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 How to delete large data. Mounika Nemani DB2 1 Wed Jun 13, 2018 1:58 pm
No new posts Extracting DDL for all list of intere... Ashishpanpaliya DB2 5 Mon May 21, 2018 4:08 pm
No new posts MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am

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