Macro: Convert varchar2 byte to varchar2 char in Oracle

This macro will loop through the active model and change all varchar2 byte to varchar2 char in Oracle.

5661.Convert varchar2 byte to varchar2 char.txt
'TITLE:  Convert varchar2 byte to varchar2 char
'DESCRIPTION:  This macro will loop through the active model and change all varchar2 byte
' 			to varchar2 char.  This has only been tested in Oracle 11g.

'ER/Studio Variables
Dim diag As Diagram
Dim mdl As Model

Dim ent As Entity

Dim att As AttributeObj

Sub Main

	Set diag = DiagramManager.ActiveDiagram
	Set mdl = diag.ActiveModel

	Debug.Clear
	For Each ent In mdl.Entities
		For Each att In ent.Attributes
			Debug.Print att.ColumnName & att.CharUsed
			If att.CharUsed = False And att.Datatype = "VARCHAR2" Then
				att.CharUsed = True
			End If
		Next
	Next

	
End Sub