Specifying the Database Instance and the User ID: -d and -u 

Use

Specifying the database instance and user ID when calling the C/C++-Precompiler is optional. There are three ways in which you can define the database instance and user:

  1. You can specify the name of the database instance, the user name, and the user password in the command to call the C/C++ precompiler. The C/C++ precompiler will then use these values.

cpc –d DB -u Armstrong,Secret testfile

  1. You can define a database instance and user in the file <file_name>.cpc in the SET_SERVERDB command and/or CONNECT statement (see: C/C++ Precompiler: SAP DB 7.3). As long as you do not add any other values when you call the C/C++ precompiler, the C/C++ precompiler will then use the values from the command or statement.
  1. You can specify a database instance and a user using the tool XUSER. The C/C++ precompiler will use the values you enter with XUSER in that particular session (see Using XUSER) as long as no other entries are made when the C/C++ precompiler is called.

Note that if you specify a database instance and a user in the command when calling the precompiler, this will override any values you entered with the tool XUSER or any entries you made in the file <file_name>.cpc.

If you have not defined a user and database instance in one of the three ways described above, the system will terminate the compiling operation and display an error message. One way of avoiding this would be to use the precompiler option –Hnocheck.