AS
Syntax
{IMPORT | REPLACE_ALL} record AS table_name;
Description
Changes the name of a record and then imports it. When using this modifier, keep the following points in mind:
-
If used with an IMPORT, the record is not imported if the table name specified in the IMPORT command already exists in the database.
-
When using the AS command modifier, you can specify either the record or table name for the record or table specified preceding the AS.
However, you must always specify the table name (not the record name) for the record or table specified following the AS. The name specified following the AS is the actual name that is used for the table to be created.
-
This modifier is not supported for records containing trigger definitions.
Parameters
IMPORT and REPLACE_ALL
Example
The following example imports a new record or table originally named PS_JOB and creates it as PS_PROCESS:
IMPORT job
AS ps_process;
Also correct:
IMPORT ps_job
AS ps_process;
Incorrect:
IMPORT ps_job
AS process;
Incorrect:
IMPORT job
AS process;
The last two examples are incorrect because process is specified, instead of ps_process. This means that the table created is named PROCESS, but it should be named PS_PROCESS to comply with the convention that all non-PeopleTools tables have the prefix PS_.
The table name that you specify following the AS command modifier should not have more than 18 characters (including the ps_ prefix). Specifying a table name that is greater than 18 characters invokes the following error message: Error: Unable to process create statement.
When you import a record in this way, it is only created in the system tables, not in the PeopleSoft tables. You must also create the record in the PeopleSoft tables, such as PSRECDEFN.
To create a table after running the IMPORT command:
-
Launch Application Designer.
-
Create or clone the new record.
Using the job and process example from the previous discussion, you would open JOB and then select File, Save As and rename the record to PROCESS.
Note:
The PS_ prefix does not appear in Application Designer.
-
Select Build, Current Object.
-
In the Build dialog box, select Create Tables under Build Options.
You may also want to make sure that all the appropriate options are set on the Build Settings tabs.