The RETURNING clause returns a multi-attributed array of error codes, one
attribute for each error. The attributes themselves may be multivalued,
depending on the error. The first value is the error code, as found in
ERRMSG/ENGLISH.MSG. Any other values are data to be inserted in the error
message. For example, using your example below, 388 is the ERRMSG ID. 388 is:
Top of "388" in "ERRMSG", 5 lines, 22 characters.
*--: P
001: HIn
002: A
003: H at line
004: A
005: H
Bottom.
The 'A' in the ERRMSG item is where the other values are inserted. So your
message would be:
In BP/_BED.TEST at line 65
This tells you where the error occurred. The error code following 388 is the
actual error. In your example below it is 958 with 13 being inserted in the
message (index: 13 to one dimension matrix is out of range).
Not all errors are preceded by 388, only those generated by UniBasic errors.
Also, other error codes of an informational nature will be in the RETURNING
array, such as 41 (n records selected to list n) if a SELECT command is
executed, or 10043 (Added \"@ID\", the default record for UniData to DICT
) if a file is created.
This is for UniData 6.1.10, though it also applied for 4.1.22 and 5.2.28.
We're on HP-UX.
HTH,
Dean
Dean Armbruster
Ferguson Enterprises, Inc.
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Bjvrn Eklund
> Sent: Thursday, July 28, 2005 3:04 AM
> To: 'u2-users@listserver.u2ug.org'
> Subject: [U2] [UD]Error Codes
>
> Hi,
> we are trying to find a way to capture results from our
> nigthly batch runs to a log file. That log file is then read
> to trigger warnings or critical alarms.
>
> We'd like to use the RETURNING clause in the EXECUTE
> statement to capture output from the batch programs.
>
> I'll show an example to make things clear:
>
> CMD = "RUN BP BED.TEST"
> EXECUTE CMD RETURNING AN_ARRAY
>
> AN_ARRAY might then look like this:
> 388}BP/_BED.TEST}65~958}13~
>
> I have come to the conclusion that 65 is the row number where
> the program crashes but the other fields doesen't tell me
> much(apart from the program name that is). Does anyone know
> where I can find information about this so that we can
> interpret the returning array. The documentation just tells me
> that:
>
> "-Note- The error message numbers you capture with RETURNING
> will vary,
>depending upon which version of UniData you are running."
>
> We are on Unidata 5.2 on Solaris.
>
> Bjvrn Eklund
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/