The &NDBCTL verb is used to alter processing options associated with the executing NCL process. Options that can be changed are:
By specifying MSG=NO, no error messages are issued. Only database integrity messages that are sent to monitor receivers are issued.
Handling database error conditions. By default (ERROR=ABORT), a response code greater than 29 (in &NDBRC) causes the process to be terminated with an error message.
By specifying ERROR=CONTINUE the process retains control, but must check &NDBRC for error responses.
&NDBOPEN is always processed as if &NDBCTL ERROR=CONTINUE is in effect, except for response 34 (already open). The same applies to &NDBCLOSE, except for response 35 (not open).
You can specify DATEFMT values of DATE1 to DATE10, UK (=DATE4), or US (=DATE5), or * (meaning as described previously).
By specifying QUOTE=YES all of the previously listed data types must be quoted and embedded blanks are treated as real blanks, causing &NDBQUOTE to force-quote all non-null data.
By specifying TRACE=YES, a message is produced for each token in the free-form text. This message is subject to the &NDBCTL MSG= setting. The first 20 characters of each token are traced.
These options allow you to easily develop applications using NDBs, and to make the procedures robust.
For example, while developing code, use MSG=YES and ERROR=ABORT. This will give useful messages and stop a procedure at the error point. From time to time, TRACE=YES can be used to track obscure syntax errors in free-form text (particularly scan expressions, and problems caused by failing to quote data containing delimiter characters).
When the code is finished, specifying MSG=NO (or MSG=LOG), and ERROR=CONTINUE allows the procedures to handle unexpected errors gracefully.
The DATEFMT= option lets you control the input and formatting of dates. The default behavior (honoring the user or system date format) is normally the best setting. However, when unloading or reloading data, &NDBCTL DATEFMT=NO lets you be independent of the current language settings.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |