How to fix the Oracle error PCB-00211: VARYING not supported with PIC N or PIC G variable “string”?

In this post, you’ll learn more about the Oracle ErrorPCB-00211: VARYING not supported with PIC N or PIC G variable “string” with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

PCB-00211: VARYING not supported with PIC N or PIC G variable “string”

Reason for the Error PCB-00211: VARYING not supported with PIC N or PIC G variable “string”

Cause: The keyword VARYING was used in a PIC N variable declaration.

How to fix the Error PCB-00211: VARYING not supported with PIC N or PIC G variable “string” ?

You can fix this error in Oracle by following the below steps

Action: Remove the keyword VARYING from the variable declaration. If you want to declare a PIC N VARCHAR variable, specify the precompiler option VARCHAR=YES and declare the variable as an implicit VARCHAR group item as illustrated by the following example: EXEC SQL BEGIN DECLARE SECTION END-EXEC. … 01 ENAME. 05 ENAME-LEN PIC S9(4) COMP. 05 ENAME-ARR PIC N(20). … EXEC SQL END DECLARE SECTION END-EXEC.

Tags :

Leave Your Comment