A routine named PROFILE, that was previously set up by you, is performed automatically when you start ISQL. This allows unique terminal-session characteristics to be established before any information is typed. You can set these characteristics yourself by using the SET command described in Chapter 10, ISQL Commands.
DB2 Server for VM | ||
---|---|---|
|
Placeholders are not allowed in a profile routine. Because the routine is run automatically, there is no way to pass parameters to substitute for the placeholders.
In addition, a unique master profile routine can be created by someone having DBA authority. It is created with an authorization ID of SQLDBA and is run automatically for each user who starts ISQL as if it were the user's own profile routine.
Both the master and your own profile routines run automatically when you start ISQL. Your routine runs second, and its operational characteristics override those in the master routine.
After the profile routine is run, you can invoke a subsequent routine to run as part of the ISQL signon process. Parameters can be passed on to this routine. The ISQL EXEC procedure invokes ISQL and runs this subsequent routine.
The ISQL EXEC procedure has the following format:
>>-ISQL----+----------+-----------------------------------------> '-V1SCRIO--' >-----+-----------------------------------------------------+-->< '-ROUTine--(--routine_name--+------------------+---)--' '-(parameter_list)-' |
You can create your own EXEC procedure from the ISQL EXEC procedure. For example, you can add commands to your EXEC to change the PF-key settings or to route printed reports.
You set your own terminal-session characteristics by using the SET command described in Chapter 10, ISQL Commands.
A profile routine cannot contain parameters, but an ISQL routine that runs as part of the ISQL signon procedure can contain parameters. You use the 4-character transaction identifier ISQL to start ISQL and to run a routine. Two ways of using the transaction identifier are:
For method 1, the ISQL transaction identifier and routine have the following format:
>>-ISQL----+-------------------------------------+------------->< '-routine_name--+------------------+--' '-(parameter_list)-' |
Both of the above-mentioned methods let you specify a routine, and any parameters to be passed to that routine, to be run by ISQL after it has run a profile routine. For method 1, the ISQL transaction identifier and the routine name and all its parameters must not be longer than the screen width or 132, whichever is less. For method 2, the command which suppresses the ISQL signon display as described in Appendix E, Suppressing the ISQL Sign-On Display for DB2 Server for VSE, must not be longer than the screen width or 132, whichever is less.
You can insert any number of blanks after the routine name or the parameters and the surrounding parentheses. For example:
isql routine (abc (1 2 3))
You can create your own routine or profile routine. For example, in your profile, you can add commands to change the number of copies of printed reports or route printed reports.
You can change the terminal-session characteristics. You can do this each time you use ISQL (SET command, page ***), or you can have ISQL do it for you (SET commands in the PROFILE routine).