Skip to main content

This article explains why a runtime error occurs after a program successfully compiles.

Problem:

The program (pgmfind.cbl) has compiled successfully, but is giving run time error as follows. Why is this?

Execution error: file '/export/home/S127059/Pgmfind.int'

error code: 164, pc=C7, call=1, seg=0

164 Run-Time subprogram not found (in CBL_LOCATE_FILE)

Resolution:

The problem with the routine is because a bad parameter is passed in on user-mode. Without MF"10" user-mode is initialized to x"20" (i.e. space) but with the directive it is x "00" and hence works. Try changing it to:

1 user-mode pic x comp-x VALUE 0.

Old KB# 14163