View previous topic :: View next topic
|
Author |
Message |
roykpc
New User
Joined: 27 Nov 2009 Posts: 2 Location: Kolkata
|
|
|
|
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 |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
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....
I know this aint a good solution... ... 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..
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
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 |
|
|
|