MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A question about TSQ ?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Sun Feb 22, 2004 9:20 pm    Post subject: A question about TSQ ? Reply with quote

Hi :

If TSQ has 5 records, I readq one times, TSQ has 4 or 5 records ?
If 5 left, how can I delete one record from TSQ ?

Thanks

Andy
Back to top
View user's profile Send private message
Himesh
CICS Forum Moderator
CICS Forum Moderator


Joined: 20 Dec 2002
Posts: 80
Topics: 21
Location: Chicago

PostPosted: Sun Feb 22, 2004 11:55 pm    Post subject: Reply with quote

Hi Andy,

Quote:
Temporary storage queues remain intact until they are deleted by the originating
task, by any other task, or by an initial or cold start; before deletion, they can be
accessed any number of times.


Quote:

You can:
- Write data to a temporary storage queue (WRITEQ TS command).
- Update data in a temporary storage queue (WRITEQ TS REWRITE command).
- Read data from a temporary storage queue (READQ TS command).
- Read the next data from a temporary storage queue (READQ TS NEXT command).
- Delete a temporary storage queue (DELETEQ TS command).


The TSQ records will not get deleted, if u issue a READQ TS command.
To delete one record, you will have to make use of application logic.

A simple one could be as below:
1. Read the records and store it (in a Working Storage array). The Read will have to be performed in a loop till ITEMERR is encountered.
2. Delete the TSQ using the DELETEQ TS command
3. Write the TSQ with the records read previously (from the array), but this time ignore the record which you intended to delete). The Write will have to be performed in a loop for each record in the array.
for eg:-
If there are 4 records then the WRITEQ needs to be executed 4 times, and if you intended to delete the 3rd record/item, then skip the WRITEQ if record number is 3 inside the loop.

Pls refer to the following links for more details
CICS Application Programming Guide

CICS Application Programming Reference

regards,
himesh
Back to top
View user's profile Send private message Yahoo Messenger
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Mon Feb 23, 2004 11:34 am    Post subject: Reply with quote

Hi himesh:

Thank you.

Regards,

Andy
_________________
cheers,
Andy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group