TOC PREV NEXT INDEX DOC LIST MASTER INDEX



Integrating Rational Summit/TM with Other Tools

This chapter contains information to assist the user in integrating Rational Summit/TM with other tools. The following sections are included:


Comma Separated Value Files

A comma separated value file (CSV) is just a convenient way to represent a two-dimensional table of information as is found in many popular spreadsheet programs. It also proves to be an easy way to record information about tasks for use by other tools. Therefore, Rational Summit/TM provides commands for converting task field information into CSV files as well as the reverse transformation. The CSV information can then be used to perform data conversion to and from other tools' representations or used directly by those tools that support CSV files.

CSV files are ordinary text files where each line represents one row of a table's data. The columns within each row, containing a row's values, are separated by commas (','). In order to use a CSV file as a data interchange mechanism for task information, the first row of the CSV must contain the task field names. Each field name is enclosed in quotation marks. Each subsequent line contains the corresponding values for a given row.

Values which have embedded commas must be surrounded by quotes, ('"'), as must multi-line values.

Example of a Comma Separated Value File


Task/CSV Conversion Commands

task_to_csv

Syntax:

Description:

Converts task field information into a comma separated value file.

This command must be invoked from an Apex or Summit shell.

Parameters:

csv_to_task

Syntax:

Description:

Creates or updates tasks based on the contents of one or more comma separated value files. If the –update or –update_via option is specified, tasks may be updated. Otherwise, new tasks are created.

For the creation of new tasks, the command accepts the same options as the create_task command. Task creation requires the –domain option and either the –kind or –template option.

No attempt is made to trim leading or trailing whitespace from values.

This command must be invoked from an Apex or Summit shell.

Parameters:


Microsoft Project Interface

Summit/TM provides two macros, ExportToSummit and ImportFromSummit, written for Microsoft Project Version 4.0 or later (MS Project) to assist in exporting MS Project tasks to Summit/TM and importing tasks from Summit/TM. The intermediate form of the data in the export/import process is a comma-separated value (CSV) file.

After installing the macros in MS Project and defining appropriate Summit/TM task kinds you will be ready to export and import MS Project tasks to and from Summit/TM.

The sequence used to export MS Project tasks to Summit/TM consists of the following major steps:

1 . Use ExportToSummit to create a CSV file from MS Project tasks.

2 . Transfer the CSV file to the system where Summit resides.

3 . Use csv_to_task (see csv_to_task) to create/update Summit tasks from the CSV file.

The sequence used to import MS Project tasks from Summit/TM consists of the following major steps:

1 . Use list_task or task_query to create a CSV file from Summit tasks.

2 . Transfer the CSV file to the system where MS Project resides.

3 . Use ImportFromSummit to create/update MS Project tasks from the CSV file

Installing MS Project Macros

The MS Project macros reside in a text file named mspmacro.txt in the project sub-directory of $APEX_BASE/task/tools.ss/share.*.rel on the host system where Summit/TM is installed. Before you can install the macros themselves, this file must be transferred to the system where you are using MS Project. If that system is a non-UNIX system such as DOS, NT, or Windows 95, then you need to be aware of the differences in text file formats, if any, between your host system and non-Unix systems.

Transferring Text Files

When transferring a UNIX text file to a system such as DOS, NT, or Windows 95, make sure that the lines are terminated by DOS-style carriage-return/line-feed pairs when it gets there, not just UNIX-style new-lines. One way to verify this without inspecting the text file internally is to check the number of bytes that the text file uses on both systems. The text file should be longer on the DOS, NT, or Windows 95 system (one extra byte per line). If the text files are exactly the same size then you will have to try a different transfer method or use some kind of conversion utility like unix2dos.

When transferring a text file from a system such as DOS, NT, or Windows 95, to a UNIX system, make sure that the lines are only terminated by Unix-style new-lines when it gets there, not DOS-style carriage-return/line-feed pairs. You can use the method described in the previous paragraph to verify this. Some kind of conversion utility like dos2unix may be necessary if your transfer method does not do the conversion automatically.

Initial Macro Installation

To install the MS Project macros into a project for the first time perform the following steps:

1 . In MS Project, go to View > MoreViews and select Module Editor and then press Apply.

2 . Go to Insert > NewModule and, under Options, select either Global File or Current Project File before pressing OK.

3 . Go to Insert > File and select the MSPMACRO.TXT file.

4 . Go to Tools > Macros and, when selecting in turn each of [PROJ|GLOB]ExportToSummit and [PROJ|GLOB]ImportToSummit (where [PROJ|GLOB] represents the selection made in step 2), activate the ShowInMacroMenuList check-box in Options > AssignTo. The macro name should automatically appear in the associated edit box, preceded by Run.

5 . Go to File > Save.

Update Macro Installation

To install updated versions of the MS Project macros into a project, which already has the macros installed, perform the following steps:

1 . In MS Project, go to Tools > Macros and select Edit for either [PROJ|GLOB]ExportToSummit or [PROJ|GLOB]ImportToSummit (where [PROJ|GLOB] represents the selection originally made in step 2 of the "Initial Macro Installation" above).

2 . Using the following sequence of keystroke combinations, delete the contents of the module:

Ctrl-Home
Shift-Ctrl-End
Backspace

3 . Go to Insert > File and select the new MSPMACRO.TXT file.

4 . Go to File > Save.

Defining Summit/TM Task Kinds

Since MS Project has various customizable formats (tables) for its tasks, you will need to create Summit/TM task kinds to match your own particular MS Project formats. For example, here is a Summit task kind Fields definition file suitable for use with the default MS Project Entry table format:

We refer to MS Project fields as columns to help distinguish them from the Summit fields to which they correspond. Note that the first MS Project column title has been changed to MSP_ID to avoid conflict with the implicit Summit field named Id. A column title in MS Project can be changed by double-clicking on the column name to invoke a Column Definition dialog. Since MS Project does not enforce uniqueness on the column titles, it is up to you to make sure that there are no conflicts between them.

On export, the MS Project column titles are automatically converted by changing embedded blanks (" ") to underscores ("_") and percent signs ("%") to "Percent" (e.g. "% Complete" becomes "Percent_Complete"). On import, these translations are performed on a copy of each MS Project column title before making a case-insensitive comparison against the corresponding field name in the first line of the CSV file.

Two MS Project columns, Priority and Constraint Type, also have embedded blanks in their enumeration values changed to underscores on export, and vice versa on import.

Each MS Project column has an implicit type that is associated with its name (not its title). There are several MS Project "types" whose representation is not directly supported by Summit/TM: boolean, currency, duration, link, list, and percentage. A boolean can be represented by the following field definition example:

The other types can be represented as a string (or text) type.

Import/Export Operations

To import or export, you must have a project loaded and be in a Task View (that is, Gantt Chart).

You cannot directly export/import consolidated projects. Instead, run the desired operation individually on each project.

If an MS Project task is a summary task it can be exported but some of its fields will not be updated directly from the CSV file on import.

ExportToSummit and ImportFromSummit Macros

For both export and import, you will be asked whether you want the operation to be applied to ONLY currently selected MS Project tasks or ALL tasks. All columns will be selected unless the first column is locked. If so, you will be asked if you want to unlock the first column while running the macro and after the operation you will then be prompted to re-lock it. In most of the default MS Project tables, the first column is usually the MS Project task ID.

You will also be asked to specify the full path name of a CSV file that will contain the exported or imported tasks. The default is the most recent CSV file in the current directory, or a file named anyfile.csv if no CSV files are found. To see a list of the files in the current directory or another directory press Cancel. Files will be listed in order (by name or by date), preceded by a sequence number. This number can be used to select the CSV file that you wish to use, thereby bringing you back to the original full path name entry dialog. If you really want to cancel the dialog then use two successive Cancels.

ExportToSummit Macro

You may be prompted to confirm whether you want to overwrite an existing file.

The macro automatically generates a first line that contains the column titles.

The export operation is unable to properly export tasks preceded by missing MS Project tasks.

See Exporting to Summit for a more detailed look at how to use this macro.

ImportFromSummit Macro

Each time you run this macro, you will be asked whether you want to either INSERT new MS Project tasks or UPDATE existing MS Project tasks. You must use separate operations if you want to do both.

If the field name in a given position of the first line of the CSV file does not match the corresponding existing column title in the project view then the operation will report it as an incompatible CSV file. This includes the case where the number of fields does not match the number of columns.

Hidden columns are not currently supported. A hidden column is one whose heading right boundary has been dragged up against its left boundary. To un-hide a column, double-click just to the right of the heading left boundary of the column to the right of the hidden column.

If you encounter any vague error messages during ImportFromSummit, try using the File > Open command with Merge option, after deleting the first line from a copy of the CSV file. This technique is also faster than using the macro since it does not do the same amount of checking or translation and, being a built-in command, is not limited to making the changes one column at a time for each MS Project task. On the other hand, the Merge option of File > Open operates on the entire project and cannot be limited to a subset of MS Project tasks without first introducing just the right number of dummy lines in the CSV file. A dummy line is one that just contains the commas that would normally separate fields.

See Importing from Summit/TM for a more detailed look at how to use this macro.

MS Project Examples

The following examples assume that you have already installed the macros and defined a task kind in Summit/TM for the MS Project Entry table format similar to that shown in the section Defining Summit/TM Task Kinds.

When properly installed, the macros should be available by selecting Tools > RunImportFromSummit. However, if you installed the macros in another project rather than in the Global project, they may not be visible in the new project. To execute them anyway, make sure that the other project is also loaded and go to the Tools > Macros dialog and, after finding and selecting the appropriate macro, press the Run button.

Exporting to Summit

In this example we will create some MS Project tasks and use the ExportToSummit macro to put them in a CSV file. After transferring the CSV file to Summit/TM, we will then use the csv_to_task command to create Summit tasks from it.

1 . In MS Project, start a new Entry format project via File > New and create some tasks in your project. The easiest way to create tasks is to just enter a short task description in the Task Name column of each of the first few task rows. For example, enter Design, Coding, Testing, and Document for tasks 1 through 4, respectively. MS Project automatically assigns a default duration of one day (1d), starting and finishing on the current date. If the Start or Finish columns show sharp signs (#) then it means that their display width is not sufficient to show the full text of the formatted date. The column's width can be adjusted by double-clicking on the column name to invoke a Column Definition dialog, and then selecting BestFit.

2 . After using File > Save to save the project's contents, execute the ExportToSummit macro. Reply as follows to the macro's dialog boxes (where file is the full path name of a new CSV file):

Dialog Text

Reply

The first column is locked and cannot be Exported ...
NO
Export ONLY currently selected tasks or ALL tasks? ...
ALL
Enter full path name of CSV file: (or Cancel to ...
file

The CSV file produced in this step will look something like the following:

3 . Transfer the CSV file to your Summit/TM system. Put the file in a Summit task domain view having the Summit task kind that you created. See Transferring Text Files for a warning regarding this process.

4 . Start Summit in the view and, in a Summit shell, issue the following command:

The result should be the creation of new tasks, one for each of the tasks you created in MS Project.

Importing from Summit/TM

In this example we will create some Summit tasks and use the list_task command to put them in a CSV file. After transferring the CSV file to MS Project, we will then use the ImportFromSummit macro to create MS Project tasks.

1 . Start Summit in a task domain view of the Summit task kind that you created and, in a Summit shell, issue the following commands:

2 . In the same view, issue the following command (where file is something like example2.csv and tasks represents the task names generated above):

3 . Transfer the CSV file to your MS Project system. See Transferring Text Files for a warning regarding this process.

In MS Project, start a new Entry format project via File > New. Then, execute the ImportFromSummit macro. Reply as follows to the macro's dialog boxes (where file is the full path name of the CSV file):

Dialog Text

Reply

The first column is locked and cannot be Exported ...
NO
Do you want to UPDATE existing tasks or INSERT ...
INSERT
Enter full path name of CSV file: (or Cancel to ... 
file

The MS Project task rows produced in this step will look something like the following:

Round Trip Transfer

This example demonstrates the round-trip capability using a combination of the operations used in the two previous examples.

1 . Perform step 1 of the example Importing from Summit/TM, if you have not already done so.

2 . In the same view, issue the following command (where file is something like example2.csv and tasks represents the task names generated above):

3 . Transfer the CSV file to your MS Project system. See Transferring Text Files for a warning regarding this process.

4 . In MS Project, start a new Entry format project via File > New. Then, go to Insert > InsertColumn to insert an additional column before the Duration column. This new column should be a Text1 column (or Text2, etc.) with the title Id. Now execute the ImportFromSummit macro. Reply as follows to the macro's dialog boxes (where file is the full path name of the CSV file):

Dialog Text

Reply

The first column is locked and cannot be Exported ...
NO
Do you want to UPDATE existing tasks or INSERT ...
INSERT
Enter full path name of CSV file: (or Cancel to ...
file

The MS Project task rows produced in this step will look something like the following (where prj1, etc. represent the task IDs generated earlier):

5 . Perform step 2 of the first example, Exporting to Summit. The CSV file produced in this step will look something like the following (where prj1, etc. represent the task IDs generated earlier):

6 . Transfer the CSV file to your Summit/TM system. Put the file in the same Summit view that you used in steps 1 and 2 of this example. See Transferring Text Files for a warning regarding this process.

7 . Start Summit in the view and, in a Summit shell, issue the following command:

8 . In the same view, issue the following commands (where prj1, etc. are the task IDs generated earlier):

9 . Perform steps 2 and 3 of the current example again. The CSV file produced in this step should now look something like the following where prj1, etc. represent the task IDs generated earlier):

10 . In MS Project, load the same project that was created in Step 4 of this example. Now execute the ImportFromSummit macro. Reply as follows to the macro's dialog boxes (where file is the full path name of the CSV file):

Dialog Text

Reply

The first column is locked and cannot be Exported ...
NO
Do you want to UPDATE existing tasks or INSERT ...
UPDATE
Import ONLY currently selected tasks or ALL tasks? ...
ALL
Enter full path name of CSV file: (or Cancel to ...
file

The MS Project task rows produced in this step should now look something like the following (where prj1, etc. represent the task IDs generated earlier):


Microsoft Excel Interface

Summit/TM provides two macros, ExportToSummit and ImportFromSummit, written for Microsoft Excel Version 5.0 or later (MS Excel) to assist in exporting MS Excel rows to Summit and importing tasks from Summit. The intermediate form of the data in the export/import process is a comma-separated value (CSV) file.

After installing the macros in MS Excel you will be ready to export and import MS Excel tasks to and from Summit/TM.

The sequence used to export MS Excel rows to Summit consists of the following major steps:

1 . Use ExportToSummit to create a CSV file from MS Excel rows.

2 . Transfer the CSV file to the system where Summit resides.

3 . Use csv_to_task to create/update Summit tasks from the CSV file.

The sequence used to import MS Excel rows from Summit/TM consists of the following major steps:

1 . Use list_task or task_query command to create a CSV file from Summit tasks.

2 . Transfer the CSV file to the system where MS Excel resides.

3 . Use ImportFromSummit to create/update MS Excel rows from the CSV file.

Installing MS Excel Macros

The MS Excel macros reside in a text file named mxlmacro.txt in the excel sub-directory of $APEX_BASE/task/tools.ss/share.*.rel on the host system where Summit/TM is installed. Before you can install the macros themselves, this file must be transferred to the system where you are using MS Excel. If that system is a non-UNIZ system such as DOS, NT, or Windows 95, then you need to be aware of the differences in text file formats, if any, between your host system and non-UNIX systems.

Transferring Text Files

When transferring a UNIX text file to a system such as DOS, NT, or Windows 95, make sure that the lines are terminated by DOS-style carriage-return/line-feed pairs when it gets there, not just UNIX-style new-lines. One way to verify this without inspecting the text file internally is to check the number of bytes that the text file uses on both systems. The text file should be longer on the DOS, NT, or Windows 95 system (one extra byte per line). If the text files are exactly the same size then you will have to try a different transfer method or use some kind of conversion utility like unix2dos.

When transferring a text file from a system such as DOS, NT, or Windows 95, to a Unix system, make sure that the lines are only terminated by UNIX-style new-lines when it gets there, not DOS-style carriage-return/line-feed pairs. You can use the method described in the previous paragraph to verify this. Some kind of conversion utility like dos2unix may be necessary if your transfer method does not do the conversion automatically.

The following instructions apply to MS Excel version 2002. You may have to adjust these steps if you use different version of MS Excel.

Initial Macro Installation

To install the MS Excel macros into a MS Excel file for the first time perform the following steps:

1 . In MS Excel, go to Tools > Macro > Visual Basic Editor. A new window will appear titled Microsoft Visual Basic - Book 1.

2 . Go to File > Import File... and select the MXLMACRO.TXT file. You may have to change the Files of type field to be All Files (*.*) to find the file.

3 . Go to File > Close and Return to Microsoft Excel.

4 . Go to Tools > Customize.... The Customize dialog box will appear. Click on the Command tab, and scroll the left hand list down and click on Macros. The selection list on the right should show two entries, Custom Menu Item and Custom Button. Using the left mouse button, drag the Custom Button entry across the screen to the MS Excel Tools menu, the menu will display and you can then continue the drag operation to place this button on the menu at an appropriate place. The menu will stay displayed. Repeat the drag operation to place a second Custom Button on the menu.

5 . With the Customize dialog still displayed goto the Tools menu, which should still be displayed, and right click on one of the new buttons. A popup menu will display, choose Assign Macro... and choose ExportToSummit and click Ok. Right click the button entry in the Tools menu again and select Name: and change the name to "Export to Summit". You can also change the icon used on the menu by using the popup. Repeat for the second button and ImportFromSummit.

6 . Go to File > Save.

Update Macro Installation

To install updated versions of the MS Excel macros into a MS Excel file, which already has the macros installed, perform the following steps:

1 . In MS Excel, go to Tools > Macro > Visual Basic Editor. A new window will appear titled Microsoft Visual Basic - Book 1.

2 . Expand the Modules folder in the project. Right-click on Module1 and choose Remove Module1. When prompted "Do you want to export Module1 before removing it", choose No.

3 . Go to File > Import File... and select the MXLMACRO.TXT file. You may have to change the Files of type field to be All Files (*.*) to find the file.

4 . Go to File > Close and Return to Microsoft Excel.

Defining Summit/TM Task Kinds

You may need to create Summit/TM task kinds to match your own particular MS Excel formats.

On export, the MS Excel column labels are automatically converted by changing embedded blanks (" ") to underscores ("_") and percent signs ("%") to "Percent" (e.g. "% Complete" becomes "Percent_Complete").

On import, the above translations are performed on a copy of each MS Excel column label before making a case-insensitive comparison against the corresponding field name in the first line of the CSV file.

Values are not examined or translated by the macros. However, MS Excel may convert values that it recognizes, such as dates.

Import/Export Operations

To import or export, you must have a Worksheet selected.

You will be prompted for the row number of the column labels, if any. The macros will use these labels to verify the name and number of existing columns. If you elect to have the macros ignore any existing column labels then you run the risk that an incompatible CSV file will be created during export or not detected during import.

ExportToSummit and ImportFromSummit Macros

For both export and import, you will be asked whether you want the operation to be applied to ONLY currently selected MS Excel rows or ALL MS Excel rows. All columns will always be selected.

You will also be asked to specify the full path name of a CSV file that will contain the exported or imported tasks. The default is the most recent CSV file in the current directory, or a file named anyfile.csv, if no CSV files are found. To see a list of the files in the current directory or another directory press Cancel. Files will be listed in order (by name or by date), preceded by a sequence number. This number can be used to select the CSV file that you wish to use, thereby bringing you back to the original full path name entry dialog. If you really want to cancel the dialog then use two successive Cancels.

ExportToSummit Macro

You may be prompted to confirm whether you want to overwrite an existing file.

The macro automatically generates a first line that contains the column labels unless you chose to ignore them.

See Exporting to Summit/TM for a more detailed look at how to use this macro.

ImportFromSummit Macro

Each time you run this macro, you will be asked whether you want to either INSERT new MS Excel rows or UPDATE existing MS Excel rows. You must use separate operations if you want to do both.

  • Insert

    Imported Summit/TM tasks will be inserted at the current position. If the selection is empty, Summit tasks will be inserted immediately after the last existing MS Excel row.

  • Update

    If there are more Summit/TM tasks in the CSV file than in the selection, an update operation will stop without updating beyond the selected MS Excel rows.

If the field name in a given position of the first line of the CSV file does not match the corresponding existing column label then the operation will report it as an incompatible CSV file. This includes the case where the number of fields does not match the number of columns.

Microsoft Excel Examples

The following examples assume that you have already installed the macros.

When properly installed, the macros should be available by selecting Tools > ImportFromSummit. However, if you installed the macros in another book, they may not be visible in the current book. To execute them anyway, make sure that the other book is also loaded.

Exporting to Summit/TM

In this example we will create some MS Excel rows and use the ExportToSummit macro to put them in a CSV file. After transferring the CSV file to Summit/TM, we will then use the csv_to_task command to create Summit tasks from it. For this example we will be using the feature task kind which can be found in $APEX_BASE/task/tools.ss/share.*.rel/feature.

1 . In MS Excel, open a book using File > Open or File > New and select an empty worksheet. In row 1 of columns A through D, enter the labels Summary, State, Priority, and Assigned, Then enter Design, Coding, Testing, and Document in column A of rows 2 through 5, respectively.

2 . After using File > Save to save the book's contents, execute the ExportToSummit macro. Reply as follows to the macro's dialog boxes (where file is the full path name of a new CSV file):

Dialog Text

Reply

Which row contains the existing column titles, if ...
1
Export ONLY currently selected tasks or ALL tasks? ...
ALL
Enter full path name of CSV file: (or Cancel to ...
file

The CSV file produced in this step will look something like the following:

3 . Transfer the CSV file to your Summit system. See Transferring Text Files for a warning regarding this process. Put the file in a Summit domain view having the Summit feature task kind.

4 . Start Summit in the view and, in a Summit shell, issue the following command:

Importing from Summit/TM

In this example we will create some Summit tasks and use the list_task command to put them in a CSV file. After transferring the CSV file to MS Excel, we will then use the ImportFromSummit macro to create MS Excel rows. For this example we will be using the feature task kind which can be found in $APEX_BASE/task/tools.ss/share.*.rel/feature.

1 . Start Summit in a domain view of the feature task kind. If you have just completed the previous example then you can use the tasks created there in place of the ones generated in this step. Otherwise, in a Summit shell, issue the following commands:

2 . In the same view, issue the following command (where file is something like example2.csv and tasks represents the task names generated above):

The CSV file produced in this step will look something like the following:

3 . Transfer the CSV file to your MS Excel system. See Transferring Text Files for a warning regarding this process.

4 . In MS Excel, open a book using File > Open or File > New and select an empty worksheet. Then, execute the ImportFromSummit macro. Reply as follows to the macro's dialog boxes (where file is the full path name of the CSV file):

Dialog Text

Reply

Which row contains the existing column titles, if ...
0
Do you want to UPDATE existing rows or INSERT ...
INSERT
Enter full path name of CSV file: (or Cancel to ...
file

The MS Excel rows produced in this step will look something like the following:

Round Trip Transfer

This example demonstrates the round-trip capability using a combination of the operations used in the two previous examples.

1 . Perform step 1 of the example Importing from Summit/TM, if you have not already done so.

2 . In the same view, issue the following command (where file is something like example2.csv and tasks represents the task names generated above):

3 . Transfer the CSV file to your MS Excel system. See Transferring Text Files for a warning regarding this process.

4 . In MS Excel, open a book using File > Open or File > New and select an empty worksheet. Now execute the ImportFromSummit macro. Reply as follows to the macro's dialog boxes (where file is the full path name of the CSV file):

Dialog Text

Reply

Which row contains the existing column titles, if ...
0
Do you want to UPDATE existing rows or INSERT ...
INSERT
Enter full path name of CSV file: (or Cancel to ...
file

The MS Excel rows produced in this step will look something like the following (where xcl1, etc. represent the task IDs generated earlier):

5 . Change the Unassigned value in column D (labeled Priority) of rows 2 through 5 to Critical, High, Medium, and Low, respectively.

Then perform step 2 of the first example, Exporting to Summit/TM. The CSV file produced in this step will look something like the following (where xcl1, etc. represent the task IDs generated earlier):

6 . Transfer the CSV file to your Summit system. Put the file in the same Summit domain view that you used in steps 1 and 2 of this example. See Transferring Text Files for a warning regarding this process.

7 . Start Summit in the view and, in a Summit shell, issue the following command:

8 . In the same view, issue the following commands (where xcl1, etc. are the task IDs generated earlier):

9 . Perform steps 2 and 3 of the current example again. The CSV file produced in this step should now look something like the following (where xcl1, etc. represent the task IDs generated earlier):

10 . In MS Excel, load the same book and worksheet that were created in Step 4 of this example. Now execute the ImportFromSummit macro. Reply as follows to the macro's dialog boxes (where file is the full path name of the CSV file):

Dialog Text

Reply

Which row contains the existing column titles, if ...
1
Do you want to UPDATE existing rows or INSERT ...
UPDATE
Update ONLY currently selected rows (1..1), or ALL ...
ALL
Enter full path name of CSV file: (or Cancel to ...
file

The MS Excel rows produced in this step will look something like the following (where xcl1, etc. represent the task IDs generated earlier):


Scopus Interface

csv_to_sql

Syntax:

Description:

Modifies a Sybase SQL table based on the contents of one or more comma separated value (.csv) files.

No attempt is made to trim leading or trailing whitespace from values. Values containing newline characters may not be processed correctly.

The Sybase isql program must be available for this command to run.

This command requires both the -table option and the -U option.

Parameters:

  • csv_file...

    Identifies the comma separated value files containing the new values.

  • options

    -I sql_interfaces_file

    The name and location of the interfaces file that is searched as part of the process of connecting to the SQL Server.

    Default value: $SYBASE/interfaces

    -P sql_password

    The SQL password of a user permitted to modify the table.

    Default value: (no password)

    -S sql_server

    The name of the SQL Server with which to connect.

    Default value: $DSQUERY

    -U sql_user_id

    The SQL id of a user permitted to modify the table. This option is required.

    -insert

    An SQL INSERT is performed.

    Default value: true

    -table table_name

    Specifies the name of the Sybase SQL table being modified. This option is required.

    -update

    Performs an SQL UPDATE operation instead of an SQL INSERT. Requires the -where option.

    Default value: false

    -where where_expression

    Expression specifying the row selection criteria. It is required if the -update option is given.

sql_to_csv

Syntax:

Description:

Converts one or more Sybase SQL SELECT listing files to comma separated value (.csv) files. The listing files must have the values delimited by a unique character, as specified by the -delimiter option.

This command may also be used to generate the SQL listing to be converted, in which case the -table and -U options are required.

The Sybase isql program must be available for this command to run if it is used to generate an SQL listing.

Leading and trailing whitespace are trimmed from listing values.

Parameters:

  • sql_listing

    Optional name of an SQL listing file to be converted to acomma separated value file. The listing file must have been previously created.

  • options

    -I sql_interfaces_file

    The name and location of the interfaces file that is searched as part of the process of connecting to the SQL Server.

    Default value: $SYBASE/interfaces

    -P sql_password

    The SQL password of a user permitted to query the table. It is only meaningful if the -U option has been supplied.

    Default value: (no password)

    -S sql_server

    The name of the SQL Server with which to connect.

    Default value: $DSQUERY

    -U sql_user_id

    The SQL id of a user permitted to query the table. This option is required if the -table option is used.

    -columns column_names

    Specifies columns to be extracted. If multiple columns are required, they must be surrounded by quotes and separated by spaces.

    Default value: * (all columns)

    -delimiter delim_char

    Specifies the delimiter character to be used.

    Default value: %

    -initial options_file

    Specifies a field-value format file containing sql_to_csv command options. Any command line options will override those in the file.

    -table table_name

    Specifies the name of the Sybase SQL table being queried.

    -where where_expression

    Specifies rows to be extracted. It is only meaningful if the -table option has also been supplied.

    Default value: (all rows)


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS