i am analyzing a program where after doing an ASSIGN to get some value the program is using either EXEC CICS RECEIVE or EXEC CICS RETRIEVE to get data based on the valuw got from ASSIGN. What is the difference between receive and retrieve? When are these used?
The RETRIEVE command retrieves data stored by expired START commands. It is the only method available for accessing such data.
The RECEIVE command is used by all CICS-supported terminals for which the other RECEIVE descriptions are not appropriate.
The assign is probably to determine if this execution of the transaction is currently started from a terminal or by a start command. Both commands get the information that the trans was started with but from different locations.