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
 

 

Deleting all Records from CICS Online KSDS File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
roykpc

New User


Joined: 27 Nov 2009
Posts: 2
Location: Kolkata

PostPosted: Mon Feb 22, 2010 1:09 pm    Post subject: Deleting all Records from CICS Online KSDS File
Reply with quote

Hi.

I want to Delete all records present in a CICS KSDS File from a C Online program.
There are 2 scenarios.

1) File1
LRECL = 93
KEYL = 11 from Position 7
KEY type is Alphabetic.
I was trying to Use the GENERIC Option, but there is no Common part in any of the keys.

1) File2
LRECL = 93
KEYL = 01 from Position 40
KEY type is Alphabetic.
I was trying to Use the GENERIC Option, but there is no Common part in any of the keys.

Though I have to code it in C, a solution in COBOL will also be helpful. I will port the code to C.

Thanks and Regards,
Kingshuk
Back to top
View user's profile Send private message

Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Mon Feb 22, 2010 5:07 pm    Post subject:
Reply with quote

Hi Kingshuk,

Since you have not mentioned any specific requirements I hope deleting records one by one should be okay - using the CICS READNEXT UPDATE and CICS DELETE commands.... icon_razz.gif

I know this aint a good solution... icon_wink.gif ... and most probably you would be looking for a single command to do it.
I am also not aware if we can do it in a single command. Hopefully some one might provide the solution.. icon_smile.gif

As of now since you dont have a common part in any of the keys, I suggest you could add a new one byte field as the first field in the key for both the files and based on this field probably you could do the deletion.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Tue Mar 02, 2010 3:30 am    Post subject:
Reply with quote

Quote:
I was trying to Use the GENERIC Option, but there is no Common part in any of the keys.

How did you try using GENERIC option? Can you please elaborate?

Take one first byte of the key field and try delete command with all possible combinations for that byte. As your key is alphabetic, try values A through Z.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2429
Location: Netherlands, Amstelveen

PostPosted: Tue Mar 02, 2010 2:54 pm    Post subject:
Reply with quote

Define the KSDS as REUSABLE do a "fopen" with "wb(+)"

Open for writing. If the cluster is defined as reusable, the existing contents of the cluster are destroyed. If the cluster is defined as not reusable (clusters with paths are, by definition, not reusable), fopen() fails. However, if the cluster has been defined but not loaded, this mode can be used to do the initial load of both reusable and non reusable clusters.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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