View previous topic :: View next topic |
Author |
Message |
shiva r Beginner
Joined: 09 May 2003 Posts: 7 Topics: 3
|
Posted: Fri May 30, 2003 10:14 am Post subject: CICS query |
|
|
Hi,
I have a reqmt where the data extracted from an online CICS pgm need to be deleted from a flat file which is used in a batch program.Is there any way other than TDQ to access the data generated by CICS and delete it from the flat file.
Thanks
Shiva |
|
Back to top |
|
 |
Himesh CICS Forum Moderator

Joined: 20 Dec 2002 Posts: 80 Topics: 21 Location: Chicago
|
Posted: Mon Jun 02, 2003 12:16 am Post subject: |
|
|
Hi Shiva,
Could you care to explain further, what exactly is it that you need to do.....
1. The online program writes data(details?) somewhere(?).
2. You want to delete records from a flat file (using a batch program?) based on the data extracted by the online program?
If you could elaborate on your exact requirement, it would be easier for us to help you out.
regards,
Himesh |
|
Back to top |
|
 |
shiva r Beginner
Joined: 09 May 2003 Posts: 7 Topics: 3
|
Posted: Tue Jun 03, 2003 10:45 am Post subject: |
|
|
Hi Himesh,
Sorry for not being clear.
There is a CICS screen through which user can delete certian data(generally low volume of data < 50 records in a week ).
This data i need to collect and then use this data as a transaction file against a master file to delete similar data in the master file.The master file is a flat file.This logic i am thinking to put in a batch program.
How do i collect the deleted data from the online program and pass it back
to the batch program as input or is there a way where i can directly delete the data from the master file in the CICS program.
I do not want to create a CICS table entry.
One more doubt is can i use flat files in CICS
Thanks
Shiva |
|
Back to top |
|
 |
Himesh CICS Forum Moderator

Joined: 20 Dec 2002 Posts: 80 Topics: 21 Location: Chicago
|
Posted: Tue Jun 03, 2003 11:43 am Post subject: |
|
|
Shiva,
CICS only supports files that are of type VSAM or BDAM.
If the data that is to be deleted is indeed stored in a VSAM file, then you can issue DELETE commands from the same online CICS program, resulting in deletion of records from the master VSAM file (based on the record values).
You can refer to the following link for an explanation of the same command.
DELETE
If your master file is a sequential flat file, then you could log the key values of the deleted records into a DB2 table, and then have a batch program which deletes records from the master file by selecting data from the DB2 table. (This could be the ideal approach in your case)
One other way, is to submit the batch program everytime a record is deleted from CICS (with the deleted record as input to the batch program), but i would like to add that, it is not a "clean" way of coding.
You can refer to the below post which had been discussed previously for more details on submitting batch program from CICS.
Internal Reader
regards,
Himesh |
|
Back to top |
|
 |
shiva r Beginner
Joined: 09 May 2003 Posts: 7 Topics: 3
|
Posted: Tue Jun 03, 2003 12:21 pm Post subject: |
|
|
Hi Himesh,
Thanks for your suggestions.I was looking for the INTRDR option,i used it in batch program to dynamically generate JCl but i wonder that it can be used in CICS also.Can you let me know if there are any side effects in taking this approach
The volume of data is less that has to be deleted.Can you please let me know why it is not a Clean way of coding.
Shiva |
|
Back to top |
|
 |
Himesh CICS Forum Moderator

Joined: 20 Dec 2002 Posts: 80 Topics: 21 Location: Chicago
|
Posted: Tue Jun 03, 2003 1:22 pm Post subject: |
|
|
Hi Shiva,
I am not sure though if you can delete from sequential files.
If it is a Physical Sequential (PS) QSAM dataset, then you might consider alternate methods to "delete" the record like updating the record with values (say SPACES).
Others could pitch in with their opinion.
regards,
Himesh |
|
Back to top |
|
 |
|
|