createTable Method

 

This method has been deprecated and should not be used in Profile versions v6.4 and above.

Class: Schema

Description

This method creates a temporary table schema. Because the compiler actually creates the data dictionary entries, all parameters must be literal.

Syntax

Schema.createTable(literal String tableName, literal String accessKeys, literal String columnList,

literal String global)

Parameters

tableName

The name of the temporary table to create.

accessKeys

The access keys for the temporary table.

columnList

A list of columns to include in the table definition.

global

The name of the global in which to store the table.

Returns

Void

When Became Available

Profile v6.0

Example

new dep,tmp

do Schema.createTable("TEST",""TEST",JOB,TYPE","TOTBAL","ZTMP")

 

type RecordDEP dep = Db.getRecord("DEP","CID")

type RecordTEST tmp

 

set TYPE = dep.type

set JOB = %ProcessID

if ‘Db.isDefined("TEST","JOB,TYPE")

set tmp = Class.new("RecordTEST")

else

set tmp = Db.getRecord("TEST","JOB,TYPE")

set tmp.job = %ProcessID

set tmp.type = dep.type

set tmp.totbal = tmp.totbal + dep.bal

do tmp.save()

 

do Schema.deleteTable("TEST")