IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to delete records when we have partial key


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Sat Aug 01, 2009 11:02 pm
Reply with quote

How to delete records when we have partial key:
suppose the key is

NY001
NY002
NY003
'
'
'
NY099

I want to delete all the records with the partial key NY.
WHere will we get the number of records deleted??
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Aug 01, 2009 11:12 pm
Reply with quote

There is a link to the manuals at the top of the page. Click on it, find the CICS Language Reference manual, and read up on the DELETE command. You should be able to find what you need there.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Aug 01, 2009 11:15 pm
Reply with quote

In addition to the normal keywords for this API, you're going to need to specify the KEYLENGTH and GENERIC keywords for partial key DELETE's.

After issuing this API command, keyword NUMRECS will contain the number of records deleted.

Please review your version/release of the applicable CICS "Application Program Reference", where this is clearly documented.

Book Manager ===> publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/library

Bill
Back to top
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Sun Aug 02, 2009 12:04 am
Reply with quote

He He, thanks dear

following is the answer :

The following example shows how to delete a group of records in a file:

EXEC CICS DELETE
FILE('MASTFILE')
RIDFLD(ACCTNO)
KEYLENGTH(4)
GENERIC
NUMREC(NUMDEL)


NUMREC(data-area)
Specifies a 16-bit binary field that is to receive the number of records that have been deleted.

refer the following link:

publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0033.htm

NUMREC(data-area)
Specifies a 16-bit binary field that is to receive the number of records that have been deleted.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sun Aug 02, 2009 1:27 am
Reply with quote

Are you on any type of medication or lack thereof?

What's with the "He He, thanks dear"?
Back to top
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Sun Aug 02, 2009 6:42 am
Reply with quote

Hi Bill,

I apologise if you are offended.
icon_cry.gif

It was just to show my happiness for your help.

Regards,
Sajjan Jindal
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sun Aug 02, 2009 6:47 am
Reply with quote

I wasn't offended at all. It just seemed a little "kooky". icon_wink.gif

No Problem....

Bill
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sun Aug 02, 2009 8:14 am
Reply with quote

Bill,

You right, looks kooky to me also. First time I have seen someone
called Dear on a technical forum.

icon_lol.gif

Earl
Back to top
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Sun Aug 02, 2009 9:50 am
Reply with quote

If we go technical, does it mean we should loose the Human touch.
We are basically humans made of emotions, its a different issue that we are becoming more of automatons. isn't it?

Regards,
Sajjan Jindal.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to delete a user's alias from the... JCL & VSAM 11
Search our Forums:

Back to Top