Error Handling
If an error occurs, the intrinsics return a non-zero value in the first
2-byte integer (the return_status parameter item) of the BRW_COMAREA or
REQUEST_COMAREA parameters. The second 2-byte integer of these
parameters (the error_parm parameter item) provides additional error
information.
This additional information can be the file system error code (FSERR),
the command interpreter error number (CIERR), the record number in the
job template file (REC#), or the job control word (JCW). Possible values
for parameter items return_status and error_parm are listed in the
following table.
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| Return | Meaning | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- |
| Status | | INIT | START | STOP | OPEN | INFO | STREAM | EXEC | CLOSE |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 0 | No error | X | X | X | X | X | X | X | X |
| | | | | | | | | | |
| | The intrinsic executed | | | | | | | | |
| | correctly. The job number of | | | | | | | | |
| | the successfully streamed job is | | | | | | | | |
| | returned in | | | | | | | | |
| | BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 1 | Illegal address for BRW_PARAMS | | | | | X | X | X | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 2 | Illegal address for PARM-DFLTS | | X | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 3 | Illegal address for filename | | | | X | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 4 | The value of COMAREA_LEN is less | X | X | X | | | | | |
| | than 100. You must set this | | | | | | | | |
| | field to the size, in bytes, of | | | | | | | | |
| | the REQUEST_COMAREA before you | | | | | | | | |
| | call BRWINITREQUEST. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 5 | The blank character that is | | | | X | | | | |
| | required at the end of the | | | | | | | | |
| | filename (in the 36-byte array | | | | | | | | |
| | FILENAME used in BRWOPEN) is | | | | | | | | |
| | missing. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 6 | The value of the field | | X | | | | | | |
| | BRW_PARAMETERS.MAX_NUM_PARMS is | | | | | | | | |
| | less than or equal to 0. (The | | | | | | | | |
| | value must be greater than 0). | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 7 | The value of the field | | | | | X | X | X | |
| | BRW_PARAMETERS.MAX_NUM_PARMS is | | | | | | | | |
| | less than or equal to 0. (The | | | | | | | | |
| | value must be greater than 0). | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 8 | The array | | | | | X | | | |
| | BRW_PARAMETERS.PARM_ARRAY is too | | | | | | | | |
| | small. Set the size of this | | | | | | | | |
| | array to the number of | | | | | | | | |
| | parameters using | | | | | | | | |
| | BRW-PARAMETERS.MAX_NUM_PARMS and | | | | | | | | |
| | try again. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 9 | The file that you have tried to | | | | X | | | | |
| | open is neither a report job | | | | | | | | |
| | file or report execution file. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 10 | FOPEN failed on the file. | | | | X | | | | |
| | | | | | | | | | |
| | The FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
Table 20-0. (cont.)
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| Return | Meaning | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- |
| Status | | INIT | START | STOP | OPEN | INFO | STREAM | EXEC | CLOSE |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 11 | If you requested BRWOPEN to open | | | | X | | | | |
| | a report execution file, it will | | | | | | | | |
| | also try to open a standard job | | | | | | | | |
| | file. It looks for BRWJOB in | | | | | | | | |
| | this order: BRWJOB; BRWJOB.PUB; | | | | | | | | |
| | BRWJOB.PUB.SYS; BRWJxxx.PUB.SYS | | | | | | | | |
| | (xxx is the Native Language | | | | | | | | |
| | Support number if the JCW | | | | | | | | |
| | NLDATALANG is set); | | | | | | | | |
| | BRWJ000.PUB.SYS. | | | | | | | | |
| | | | | | | | | | |
| | The FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.ERR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 12 | FCLOSE failed to close the file. | | | | X | | | | |
| | The FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 13 | FCLOSE failed to close the | | | | | | | | X |
| | standard job file. (In the | | | | | | | | |
| | order given for 11 above. ) | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 14 | An error occurred when reading | | | | | X | | | |
| | the report job file. The FSERR | | | | | | | | |
| | is returned in | | | | | | | | |
| | BRW_COMAREA.ERROR.PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 15 | An error occurred when reading | | | | | X | | | |
| | the standard job file. The | | | | | | | | |
| | FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 15 | The intrinsic FCONTROL that | | | | | X | | | |
| | rewinds the standard job file | | | | | | | | |
| | failed. The FSERR is returned | | | | | | | | |
| | in BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 17 | An error occurred when reading | | | | | X | | | |
| | the Job Template Header of the | | | | | | | | |
| | standard job file or report job | | | | | | | | |
| | file. (For example, an unknown | | | | | | | | |
| | word was found in the header). | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 18 | The intrinsic FCONTROL that | | X | | | X | X | | |
| | rewinds the report job file | | | | | | | | |
| | failed. The FSERR in returned | | | | | | | | |
| | in BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 19 | A syntax error was found in a | | | | | X | X | | |
| | parameter definition in the Job | | | | | | | | |
| | Template Header. The record | | | | | | | | |
| | number of the record where the | | | | | | | | |
| | error was found is returned in | | | | | | | | |
| | BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 20 | An unexpected end-of-file marker | | | | | X | | | |
| | was found when reading the | | | | | | | | |
| | report job file of standard job | | | | | | | | |
| | file. The FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 21 | You have called one of the | | | | | X | X | X | |
| | intrinsics BRWSTREAM, BRWEXEC, | | | | | | | | |
| | or BRWINFO without previously | | | | | | | | |
| | opening the BRW files by calling | | | | | | | | |
| | BRWOPEN. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
Table 20-0. (cont.)
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| Return | Meaning | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- |
| Status | | INIT | START | STOP | OPEN | INFO | STREAM | EXEC | CLOSE |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 22 | An error occurred when creating | | | | | | X | | |
| | the temporary file TRJOB0. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 23 | An error occurred when closing | | | | | | X | | |
| | the temporary file TRJOB0. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 25 | An error occurred when reading | | | | | | X | | |
| | the temporary file TRJOB0. The | | | | | | | | |
| | FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 26 | A syntax error was found when | | | | | | X | | |
| | substituting parameter values | | | | | | | | |
| | for parameters. | | | | | | | | |
| | | | | | | | | | |
| | The record number of the record | | | | | | | | |
| | where the error was found is | | | | | | | | |
| | returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 27 | A parameter was found in the Job | | | | | | X | | |
| | body that is neither defined in | | | | | | | | |
| | the Job template header nor in a | | | | | | | | |
| | Standard parameter. | | | | | | | | |
| | | | | | | | | | |
| | The record number of the record | | | | | | | | |
| | where the error was found is | | | | | | | | |
| | returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 28 | An error occurred when the son | | X | | | | X | | |
| | process creates its temporary | | | | | | | | |
| | files. | | | | | | | | |
| | | | | | | | | | |
| | The FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 29 | An error occurred when the son | | | | | | X | X | |
| | process opens its temporary | | | | | | | | |
| | files. | | | | | | | | |
| | | | | | | | | | |
| | The FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 30 | An error occurred when the son | | | | | | X | | |
| | process reads its temporary | | | | | | | | |
| | files. | | | | | | | | |
| | | | | | | | | | |
| | The FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 31 | An error occurred when the son | | X | | | | | X | |
| | process writes to its temporary | | | | | | | | |
| | files. | | | | | | | | |
| | | | | | | | | | |
| | The FSERR is returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 32 | The intrinsic tried to read the | | | | | | X | | |
| | job number of the streamed job | | | | | | | | |
| | from the temporary file BRWTEMP | | | | | | | | |
| | but failed to find it. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 33 | An error occurred when calling | | | | | | X | | |
| | the intrinsic FINDJCW. The | | | | | | | | |
| | status from FINDJCW is returned | | | | | | | | |
| | in BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
Table 20-0. (cont.)
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| Return | Meaning | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- | BRW- |
| Status | | INIT | START | STOP | OPEN | INFO | STREAM | EXEC | CLOSE |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 34 | An error occurred when calling | | | | | | X | | |
| | the MPE command STREAM via the | | | | | | | | |
| | COMMAND intrinsic. | | | | | | | | |
| | | | | | | | | | |
| | The CIERR is returned in | | | | | | | | |
| | BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 35 | An error occurred when calling | | X | | | | X | X | |
| | the intrinsic CREATE PROCESS. | | | | | | | | |
| | The error message number from | | | | | | | | |
| | CREATEPROCESS is returned in | | | | | | | | |
| | BRW_COMAREA.ERROR_PARM. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 36 | BRWSTARTREQUEST tries to | | X | | | | | | |
| | activate the son process | | | | | | | | |
| | BRWSTART, but BRWSTART does not | | | | | | | | |
| | exit. That is, BRWSTART ought | | | | | | | | |
| | to exist but does not! | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 37 | The son process BRWSTART | | X | | | | | | |
| | terminated abnormally. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 38 | The BRWEXEC program encountered | | | | | | | X | |
| | an error when executing. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 39 | An error occurred when calling | | | X | | | | | |
| | the intrinsic KILL to kill the | | | | | | | | |
| | son process BRWSTART. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 40 | An error occurred when calling | | | | X | | | | |
| | the intrinsic NLGETLLANG. | | | | | | | | |
| | | | | | | | | | |
| | The status from NLGETLANG is | | | | | | | | |
| | returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 41 | An error occurred when calling | | | | | | | X | |
| | the intrinsic COMMAND to call | | | | | | | | |
| | the MPE commands FILE and RESET. | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | The error code from the COMMAND | | | | | | | | |
| | intrinsic is returned in | | | | | | | | |
| | BRW_COMAREA.error_parm. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 42 | Execution file read failed. | | | | | X | | | |
| | Error returned because of a | | | | | | | | |
| | damaged or faulty report | | | | | | | | |
| | execution file. Build a new | | | | | | | | |
| | execution file and start again. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 43 | Execution file version error. | | | | | X | | | |
| | Error returned because of a | | | | | | | | |
| | damaged or faulty report | | | | | | | | |
| | execution file. Build a new | | | | | | | | |
| | execution file and start again. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 44 | Execution file wrong type. | | | | | X | | | |
| | Error returned because of a | | | | | | | | |
| | damaged or faulty report | | | | | | | | |
| | execution file. Build a new | | | | | | | | |
| | execution file and start again. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 45 | Wrong type of report. Error | | | | | X | | | |
| | returned because of a damaged or | | | | | | | | |
| | faulty report execution file. | | | | | | | | |
| | Build a new execution file and | | | | | | | | |
| | start again. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 46 | Section number error. Error | | | | | X | | | |
| | returned because of a damaged or | | | | | | | | |
| | faulty report execution file. | | | | | | | | |
| | Build a new execution file and | | | | | | | | |
| | start again. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 47 | Default parameter error. Error | | | | | X | | | |
| | returned because of a damaged or | | | | | | | | |
| | faulty report execution file. | | | | | | | | |
| | Build a new execution file and | | | | | | | | |
| | start again. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| 48 | Selection set error. Error | | | | | X | | | |
| | returned because of a damaged or | | | | | | | | |
| | faulty report execution file. | | | | | | | | |
| | Build a new execution file and | | | | | | | | |
| | start again. | | | | | | | | |
| | | | | | | | | | |
----------------------------------------------------------------------------------------------------------------------