IBM InfoSphere DataStage, Version 11.3.1
STATUS function
Syntax
STATUS ( )
Description
Use the STATUS function to determine the results of the operations performed by certain statements and functions.
The parentheses must be used with the STATUS function to distinguish it from potential user-named variables called STATUS. However, no arguments are required with the STATUS function.
The following sections describe STATUS function values.
After a BSCAN statement:
- 0
- The scan proceeded beyond the leftmost or rightmost leaf node. ID.variable and rec.variable are set to empty strings.
- 1
- The scan returned an existing record ID, or a record ID that matches record.
- 2
- The scan returned a record ID that does not match record. ID.variable is either the next or the previous record ID in the B-tree, depending on the direction of the scan.
- 3
- The file is not a B-tree (type 25) file, or, if the USING clause is used, the file has no active secondary indexes.
- 4
- indexname does not exist.
- 5
- seq does not evaluate to A or D.
- 6
- The index specified by indexname needs to be built.
- 10
- An internal error was detected.
After a DELETE statement
After a DELETE statement with an ON ERROR clause, the value returned is the error number.
After a FILEINFO function:
After a successful execution of the FILEINFO function, STATUS returns 0. If the function fails to execute, STATUS returns a nonzero value. For complete information, see the FILEINFO function.
After a FILELOCK statement:
After a FILELOCK statement with a LOCKED clause, the value returned is the terminal number of the user who has a conflicting lock.
After an FMT function:
- 0
- The conversion is successful.
- 1
- The string expression passed as an argument is invalid. If NLS is enabled: the data supplied cannot be converted.
- 2
- The conversion code passed as an argument to the function is invalid.
After a GET statement or GETX statement:
- 0
- The timeout limit expired.
- Any nonzero value
- A device input error occurred.
After an ICONV or OCONV function:
- 0
- The conversion is successful.
- 1
- The string expression passed as an argument to the function is not convertible using the conversion code passed. An empty string is returned as the value of the function.
- 2
- The conversion code passed as an argument to the function is invalid. An empty string is returned as the value of the function.
- 3
- Successful conversion of a possibly invalid date.
After an INPUT @ statement:
A 0 is returned if the statement was completed by a Return. The trap number is returned if the statement was completed by one of the trapped keys (see the INPUT@ and KEYTRAP statements).
After a MATWRITE, WRITE, WRITEU, WRITEV, or WRITEVU statement:
- 0
- The record was locked before the operation.
- 3
- In NLS mode, the character that cannot be mapped is in the record ID.
- 4
- In NLS mode, the character that cannot be mapped is in the record's data.
- -2
- The record was unlocked before the operation.
- -3
- The record failed an SQL integrity check.
- -4
- The record failed a trigger program.
- -6
- Failed to write to a published file while the subsystem was shut down.
- -4
- The record was rejected by an SQL trigger.
After an OPEN, OPENCHECK, OPENPATH, or OPENSEQ statement:
The file type is returned if the file is opened successfully. If the file is not opened successfully, the following values might return
:
- Value
- Description
- -1
- The filename was not found in the VOC file.
- -21
- The filename or file is null.
- -3
- An operating system access error occurs when you do not have permission to access an InfoSphere® DataStage® file in a directory. For example, this error might occur when trying to access a type 1 or type 30 file.
- -41
- An access error appears when you do not have operating system permissions or if DATA.30 is missing for a type 30 file.
- -5
- The operating system detected a read error.
- -6
- The lock file header cannot be unlocked.
- -7
- Invalid file revision or wrong byte-ordering exists for the platform.
- -81
- Invalid part file information exists.
- -91
- Invalid type 30 file information exists in a distributed file.
- -10
- A problem occurred while the file was being rolled forward during warmstart recovery. Therefore, the file is marked "inconsistent."
- -11
- The file is a view; therefore it cannot be opened by a BASIC program.
- -12
- No SQL privileges exist to open the table.
- -131
- An index problem exists.
- -14
- The NFS file cannot be opened.
1A generic error that can occur for various reasons.
After a READ statement:
If the file is a distributed file, the STATUS function returns the following:
- -1
- The partitioning algorithm does not evaluate to an integer.
- -2
- The part number is invalid.
After a READBLK statement:
- 0
- The read is successful.
- 1
- The end of file is encountered, or the number of bytes passed in was less than or equal to 0.
- 2
- A timeout ended the read.
- -1
- The file is not open for a read.
After a READL, READU, READVL, or READVU statement:
If the statement includes the LOCKED clause, the returned value is the terminal number, as returned by the WHO command, of the user who set the lock.
NLS mode: The results depend on the following:
- The existence of the ON ERROR clause
- The setting of the NLSREADELSE parameter in the uvconfig file
- The location of the unmappable character
.
- 3
- The unmappable character is in the record ID.
- 4
- The unmappable character is in the record's data.
After a READSEQ statement:
- 0
- The read is successful.
- 1
- The end of file is encountered, or the number of bytes passed in was less than or equal to 0.
- 2
- A timeout ended the read.
- -1
- The file is not open for a read.
After a READT, REWIND, WEOF, or WRITET statement:
If the statement takes the ELSE clause, the returned value is 1. Otherwise the returned value is 0.
After an RPC.CALL, RPC.CONNECT, or RPC.DISCONNECT function:
- 81001
- A connection was closed for an unspecified reason.
- 81002
- connection.ID does not correspond to a valid bound connection.
- 81004
- Error occurred while trying to store an argument in the transmission packet.
- 81005
- Procedure access denied because of a mismatch of RPC versions.
- 81007
- Connection refused because the server cannot accept more clients.
- 81008
- Error occurred because of a bad parameter in arg.list.
- 81009
- An unspecified RPC error occurred.
- 81010
- #args does not match the expected argument count on the remote machine.
- 81011
- Host was not found in the local /etc/hosts file.
- 81012
- Remote dsrpcd cannot start the service because it could not fork the process.
- 81013
- The remote dsrpcservices file cannot be opened.
- 81014
- Service was not found in the remote dsrpcservices file.
- 81015
- A timeout occurred while waiting for a response from the server.
After a SETLOCALE function:
The STATUS function returns 0 if SETLOCALE function is successful, or one of the following error tokens if it fails:
- LCE$NO.LOCALES
- InfoSphere DataStage locales are disabled.
- LCE$BAD.LOCALE
- The specified locale name is not currently loaded, or the string OFF.
- LCE$BAD.CATEGORY
- You specified an invalid category.
- LCE$NULL.LOCALE
- The specified locale has more than one field and a category is missing.
Example
- Source Lines
- Program Output
- OPEN '','EX.BASIC' TO FILE ELSE STOP PRINT 'STATUS() IS ':STATUS() Q=123456 Q=OCONV(Q,"MD2") PRINT 'STATUS() IS ':STATUS() Q='ASDF' Q=OCONV(Q,"D2/") PRINT 'STATUS() IS ':STATUS()
STATUS() IS 1 STATUS() IS 0 STATUS() IS 1
Last updated: 2015-03-09
PDF version of this information: