*********************************************************** * Copyright (C) Micro Focus 2018. All rights reserved. * * This sample code is supplied for demonstration purposes * only on an "as is" basis and is for use at your own risk. * *********************************************************** identification division. program-id. RTSERR1. environment division. configuration section. data division. working-storage section. 01 ws-flags pic x(4) comp-5. 01 ws-error-str pic x(255). procedure division. display "This program will generate a COBOL Runtime" " error to force termination." move 0 to ws-flags **** Null Terminated String for text is required. move "Application Generated Runtime Error" to ws-error-str call "CBL_RUNTIME_ERROR" using by value ws-flags by reference ws-error-str end-call display "This will never be reached as RTS Error handling is" " invoked." goback. end program RTSERR1.