User Guide > Scripting > Using DJImport/DJExport Object Connection Wizard > Creating New DJImport or DJExport Object
Was this helpful?
Creating New DJImport or DJExport Object
To create a new DJImport or DJExport object
1. In the EZScript Editor, click EZScript menu, and click DJImport/DJExport Object Connection Wizard.
The wizard opens and displays the DJImport/DJExport Object Declaration window.
2. Select Create a New DJImport or DJExport Object.
3. To create DJImport object, select DJImport.
4. To create a new DJExport object, select DJExport.
5. In Enter name of new DJImport/DJExport object, type a new name for the object that you are going to import or export.
If you open this wizard from a map or a process file, then select the Make this DJImport/DJExport variable global to make the variable global. This option is selected by default.
6. Select Include ConnectString declaration in the final expression. An example is displayed in the text box.
If you have selected Make this DJImport/DJExport variable global, then Include ConnectString declaration in final expression is disabled.
7. Click Next.
The DJImport/DJExport Object Connection window is displayed.
8. Select one of the following options to specify how you want to connect to the object:
Build a connect string - Construct a new connect string. Click Build. The Source Connection window is displayed. Specify the information that is required to setup the source connection and click OK.
Use an existing connect string - With this option, you can browse to select a source connection (.src.dataset) or target connection (.trg.dataset) file to use. You can select a source/target connection file that you previously created OR you can select from a list of connection files in the Connections directory. If you originally chose the default directories for the product installation, the connections are in the Connections directory.
Use the connect string from the map source - In this option, the default is to include object declaration in the final expression (source side). Clear the option if you do not want to include the object declaration.
Use the connect string from the map target - In this option, the default is to include object declaration in the final expression (target side). Clear the option if you do not want to include the object declaration.
The third and fourth options are not displayed when you open this wizard from the EZscript file.
9. Click Next.
The SQL Statement window is displayed.
10. Select one of the following to specify whether you want to use SQL statement to connect to the DJImport/DJExport object:
Do not include a SQL statement - This is the only selection if your connection is not a SQL connector type.
Use SQL statement from the built connect string - Builds a SQL statement from the connect string already built or selected.
Note:  When ODBC3.5 connection is set using query statement, then this option is enabled.
Build a SQL statement using the query builder - Click Build to open the SQL Query Builder Wizard.
Use the SQL statement from the map source connection - Builds a SQL statement using the current source connect string.
Note:  If you select any connect string other than containing SQL statement, then option 1 must be selected by default and other options are disabled. If you select connect string with a SQL statement, then all the options are enabled. If you select Build SQL statement using query builder, type-in a new SQL statement.
11. Click Next.
The DJImport/DJExport Expression Summary window is displayed.
12. Review the expression and click Finish.
13. Click OK.
The new DJImport/DJExport query statement is displayed in the EZscript Editor.
The following is a DJExport statement example, with the djexample object. In step 8, the connect string was specified to be used from the source file in the transformation. The default source properties for ASCII (Delimited) are included in the statement:
Set djexample = New DJExport "ASCII (Delimited)"
djexample.ConnectString = "CodePage=ANSI;RecordSeparator=CR-LF;FieldSeparator=,;FieldStartDelimiter=";FieldEndDelimiter=";Header=False;FieldDelimitStyle=all;StripLeadingBlanks=True;StripTrailingBlanks=True;TransliterationIn=;TransliterationOut=;MaxDataLen=0"
Last modified date: 02/01/2024