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

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
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 Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm

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