CICS task life time storage
Posted: Wed 19 Jun 2013, 05:58
I have a problem with the working storage variables in my CICS program.
As I know working storage is task life time, it's aquired when task starts, and released when task terminates.
Why in the 2nd task, I'm still getting the value when 1st task ends.
I think WS-CODE-VALUE in TRACENUM(1) should be empty, but it's not. It seems that the value from previous task is kept, unless I initialize them.
As I know working storage is task life time, it's aquired when task starts, and released when task terminates.
Why in the 2nd task, I'm still getting the value when 1st task ends.
- Code: Select all
WORKING-STORAGE SECTION.
01 WS-MIN-MAX.
05 MIN-VALUE PIC X(14) VALUE 'ABCDEFGH'.
05 MAX-VALUE PIC X(14) VALUE 'XXXXXXX '.
01 WS-POS PIC S9(04) COMP VALUE 0.
01 WS-OUTPUT.
05 WS-CODE-VALUE PIC X(14).
05 WS-CODE-DESC PIC X(16).
LINKAGE SECTION.
01 DFHCOMMAREA PIC X(32000).
*
*---------------------------------------------------------------*
PROCEDURE DIVISION.
*---------------------------------------------------------------*
EXEC CICS ENTER TRACENUM(1)
FROM(WS-CODE-VALUE)
END-EXEC
I think WS-CODE-VALUE in TRACENUM(1) should be empty, but it's not. It seems that the value from previous task is kept, unless I initialize them.