-
Notifications
You must be signed in to change notification settings - Fork 28
Mock a CICS file read and raise a condition
Dave Nicolette edited this page Dec 17, 2020
·
11 revisions
Home -> User Guide -> Common Testing Scenarios ->
Note: It's possible this cannot be implemented in a way that will work properly off-platform. There is no EXEC CICS RAISE CONDITION command. There are games we could play, but we are not convinced the resulting implementation would provide useful information for a functional check. It would be better to refactor the application code so that the EXEC CICS READ DATASET command is contained in a separate paragraph, and then mock that paragraph. But there may be cases when such refactoring is not feasible, so we will try to implement this pattern.
MOCK CICS DATASET 'THEFILENAME'
ON READ INTO WS-RECORD
RAISE CONDITION NOTFND
END-MOCK
PERFORM PARAGRAPH-UNDER-TEST
EXPECT CONDITION NOTFND TO BE RAISED