convert (Convert a legacy spec)
The convert transaction will parse and convert a legacy PowerLoader
spec file into XML.
Note: The user must have a FTP account with a spec file in the top level directory.
Query string
The query string in the HTTP header must contain the following parameters:
api- Specify the name of the API transaction.
apiversion- Specify the version of the API that should handle the requested transaction.
For the most up-to-date version, use apiversion=3.
uid- Specify a valid 1010data user name.
pswd- Specify a valid password for the 1010data user name provided to the
uidparameter.Note: Thepswdvalue should be the encrypted password returned from thelogintransaction. sid- The session ID for the current API session.
This value is returned by the
logintransaction and must be provided to every transaction (exceptlogin). kill(optional)- Valid values for
killare as follows:yes- Terminate the existing session and start a new one.
no- Do not terminate the existing session.
If no session exists, a new one will be created. If a session does exist, an error is returned.
Note: Ifkill=noand a session is active, the system returns an error. possess- Log in and possess the existing session.
auth- Authenticate with the system but do not kill, possess, or start any session.
The default is
yes.
Query String Example
https://www2.1010data.com/gw.k?api=convert&apiversion=3&uid=$UID&pswd=$PSWD&sid=$SID
XML Input to Server
The specifications must contain the following elements:
| XML Element To Send | Description of Sent Element Content |
|---|---|
<name></name> |
The spec filename to convert located on your FTP account. See PowerLoader User's Guide for file format. |
XML response from server
A successful convert produces the following result:
| XML Element Returned | Description of Returned Element Content |
|---|---|
<rc> |
Return code |
<msg> |
Message from the system |
<spec> |
XML Spec file – See addtab (Load a large table) for transaction XML Input. |
XML Response Example
<rc>0</rc>
<msg>validate successful</msg>
<spec>
<source>
<file>performance2001-2005.txt</file>
<file>performance2006.txt</file>
</source>
<name>pub.demos.foo.performance</name>
<title>Performance 2001-2006</title>
<sdesc>short description of the table</sdesc>
<ldesc>long description of table</ldesc>
<link>FOO</link>
<users>
<user>user1</user>
<user>user2</user>
</users>
<rectype>fixed</rectype>
<eor>crlf</eor>
<cols>
<col>
<field>deal</field>
<width>12</width>
<head>Deal ID</head>
<type>int</type>
<format>
<type>nocommas</type>
<width>3</width>
<dec>0</dec>
</format>
</col>
<col>
<name>date</name>
<width>55</width>
<head>Distributaion Date</head>
<type>yyyymmdd</type>
<format>
<type>date</type>
<width>8</width>
</format>
</col>
<col>
<name>loan</name>
<width>21</width>
<head>Loan`Number</head>
<type>int</type>
<exp>loan+2</exp>
</col>
</cols>
</spec>
