RATE THIS ANSWER
0
Click to Vote:
0
0
Last Answered:
Feb 15 2006 2:01 PM GMT
by BlueKnight
In order to delete a record from a temporary storage queue, you need to know what the key of the temp storage record is as well as the value of the key for the record you want to delete.
Generally you want to issue a handle condition to take charge if the queue ID you attempt to read/delete from is invalid. Then you need to set the values in the working storage fields associated with the action. Next you do a READQ TS followed by a DELETEQ TS. See the example below...
EXEC CICS HANDLE CONDITION
QIDERR (Z300-ERROR)
END-EXEC.
*** We use the terminal id and trans id as the key ***
MOVE WD-COMM-TERM-ID TO TS-TEMP-STOR-TRM-ID.
MOVE '12AA' TO TS-TEMP-STOR-TRN-ID.
EXEC CICS READQ TS
QUEUE (TS-TEMP-STOR-QUEUE)
INTO (TS-TEMP-STORAGE-RECORD)
LENGTH (WS-TEMP-LENGTH)
END-EXEC.
EXEC CICS DELETEQ TS
QUEUE (TS-TEMP-STOR-QUEUE)
END-EXEC.
Storage queue record area in working storage looks like this:
01 TS-TEMP-STORAGE-RECORD.
05 TS-TEMP-STOR-QUEUE.
10 TS-TEMP-STOR-TRM-ID PIC X(04).
10 TS-TEMP-STOR-TRN-ID PIC X(04).
05 TS-PROG-ID-FROM PIC X(08).
05 TS-SAVE-RQ-PAGE-FRWD PIC X(91).
05 TS-SAVE-RQ-PAGE-FRST PIC X(91).
05 TS-SAVE-RQ-PAGE-SCROLL PIC X(91).
05 TS-SCROLL-TO PIC X(01).
05 TS-END-OF-DATA PIC X(01).
05 TS-NO-DATA-AVAIL PIC X(01).
05 TS-SAVE-PG-NO PIC 9(03).
05 TS-OPEN-SCREEN-SW PIC X(01).
88 TS-OPEN-SCREEN VALUE 'Y'.
05 TS-DATA.
10 TS-DATA-TABLE OCCURS 8 TIMES.
15 TS-DATA-AREA OCCURS 2 TIMES.
20 TS-PROP-BRAND-CD PIC X(06).
20 TS-PROP-BRAND-DS PIC X(25).
05 TS-SWITCH-TABLE.
10 TS-UPDATE-SWITCHES-TABLE OCCURS 8 TIMES.
15 TS-UPDATE-SWITCHES OCCURS 2 TIMES.
20 TS-UPDATE-SW PIC X(01).
Hope this help you out.
Regards,
Jim