Joined: 20 Dec 2002 Posts: 80 Topics: 21 Location: Chicago
Posted: Sun Feb 22, 2004 11:55 pm Post subject:
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.
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