9.178 REBUILD_FILE

Note: Built-In Function Rules     Usage Options

Optionally drops the existing file and its views, and creates a new file from the CTD file.

REBUILD_FILE can also be used to alter an Imported file to add the two LANSA columns X_RRNO and X_UPID.

 

Processing

If drop views specified, drop the table and its matching views.

If Create new file is specified, create the new table from the CTD file.

If Use Connection Parameters in CTD file is specified, alter the table in the external database specified in the CTD file.

If Prompt for user ID and password is specified, remove the existing user id and password from the connection parameters in the CTD file and allow the database manager (e.g. ODBC driver) to prompt for the user id and password. Note that some database managers prompt for much more than this, even though it is only the user id and password that is required. Some others do not need a user id and password and so the database manager will still not prompt for them (e.g. MS Access and MS SQL Server).

Arguments

No.

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

The LANSA File Name

1

10

 

 

2

A

Opt

Drop File and Views

Values:
Y = Drop
N = Do not Drop

Default = Y

1

1

 

 

3

A

Opt

Create New File

Values:
Y = Create
N = Do not Create

Default = Y

1

1

 

 

4

A

Opt

Use Connection Parameters in CTD File

Values:
Y = Connect using CTD File
N = Use current database connection

Default = N

1

1

 

 

5

A

Opt

Prompt for user ID and password

Values:
Y = Prompt
N = Use CTD file user id and password

Default = N

1

1

 

 

6

A

Opt

Library Name

1

10

 

 

7

A

Opt

CTD Location Level
A= All (Partition + System).
P = Partition Level only.
S=System Level only.

Default is A.

1

1

 

 

 

Return Values

No.

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return Code:
OK = File successfully rebuilt
ER = An Error occurred rebuilding the file

2

2