Document Type | Troubleshooting
Category | Migration
Applicable Product Version | 7FS02PS
Document Number | TMITS005
Issue
During the process of extracting JAVA SOURCE creation scripts and transferring them to the to-be DB, if the creation script includes JAVA code like the example below, the message "Enter value for '____':" appears and the query cannot be executed.
Example Code
inListByte[inListByteIdx] = newTempByte[i];
inListByteIdx++;
if((i + 1) % 16 == 0 && i != 0){
byteList.add(inListByte);
inListByte = new byte[16];
inListByteIdx = 0;
}Execution Example
SQL> @ISU_CRYPT_BLOCK.sql
At line 179, column 48:
if((i + 1) % 16 == 0 && i != 0){
^
Enter value for 'i':
Cause
& character is recognized as a variable input prompt, so when using the ' & i ' syntax, it tries to find a variable. If the variable does not exist, the message "Enter value for i:" is displayed.
Solutions
By executing SET DEFINE OFF;, the & symbol is recognized as a regular character rather than a variable substitution symbol, allowing the && code to execute properly.
SQL> SET DEFINE OFF; SQL> @ISU_CRYPT_BLOCK.sql
NoteAfter setting SQL> SET ESCAPE ON;, you can also work around characters using ESCAPE '\' or similar.