Hello
See if anyone could suggest a solution for following issue:
1. a new record is written into a VSAM file from one CICS Cobol program
2. Immediately the same record is read directly from the same VSAM file by full key from another assembly program
Then the issue encountered that the read by full key failed with RC 4 indicating RECORD NOT FOUND, my guess that the failure seems be caused by the assembly program is trying to read the record from the Buffer, while it's not being added in the Buffer when the new record is written by the CICS program!
Could anyone confirm if the above guess correct or not? If yes, is there a way to fix it without rewriting the assembly program to CICS program?
FYI the related codes from both the CICS & assembly programs:
Below is how the new record being written in the VSAM file (from the CICS Cobol program):
EXEC CICS WRITE
DATASET ('the-VSAM-file')
FROM (DBAL-MAST-RECORD-AREA)
LENGTH (WW-REC-LENGTH)
KEYLENGTH (WW-KEY-LENGTH)
RIDFLD (WS-REC-KEY)
END-EXEC.
Below is how the record being read by full key from the same VSAM file (from the assembly program):
GENCB BLK=RPL,
ACB=(R8),
AREA=RCDADR,
AREALEN=4,
ARG=(R9),
OPTCD=(KEY,DIR,LOC)
. . .
L R9,KEYADR /R9=> KEY VALUE
. . .
MODCB RPL=(R8),
ARG=(R9),
OPTCD=(KEQ,FKS,DIR,NSP)
. . .
GETVSAM DS 0H
GET RPL=(R8)
LTR R15,R15 /RETRIEVAL SUCCESSFUL?
Thanks, Roy