Fast Export Script Syntax

Tools
Enthusiast

Fast Export Script Syntax

.BEGIN EXPORT
SESSIONS 20;
.LAYOUT Control ;
.FIELD Date1 * Date ;
.FIELD Date2 * Date ;
.IMPORT INFILE InName
LAYOUT Control ;
.EXPORT OUTFILE C:\outputtext.txt ;

SELECTRegion,
ProdCode,
From TranLogTable
WHERE TranDate BETWEEN :Date1 and :Date2
ORDER BY Region, ProdCode;
.END EXPORT ;
5 REPLIES
Enthusiast

Re: Fast Export Script Syntax


.LAYOUT Control ;

What this line do? Is Control a keyword or user defined word?

And this Layout is input file Layout or the layout of the file to which output is export?

Thanks in Advance..
Enthusiast

Re: Fast Export Script Syntax

Control is not a keyword, you can give any name there ... it's purpose is to define the input file format from which fastexport can read some information (like the conditional filter values that needs to be applied in the query etc)

Re: Fast Export Script Syntax


Hi,

This my fastexport script and I am trying to get my outfile in readable format ( say text).

I tried ... please correct..

---------------
.logtable DXWX1.log_run11;

.logon tdp7/DXWX1,***;

DATABASE DXWX1;

.begin export

sessionS 5;
.export outfile C:\Fast_data.txt mlscript C:\Mload.txt format text mode record ;

sel * from VWV01
where year_week_number= XXXX;

.end export;

.logoff;

----------

Thanks

Enthusiast

Re: Fast Export Script Syntax

.export outfile C:\Fast_data.txt mlscript C:\Mload.txt format text ;

Re: Fast Export Script Syntax

in place of "sel *" u should have the coulmn name and the data type. like

SELECT WK_I (CHAR(11)), YR_I (CHAR(11)), COUNT(*) (CHAR(11))

FROM .....

Then we can see the data in text format and you can open it in text/notepad

Let me know if this work, and also let us know if you find any other way to achive it.

Thanks

Sandipan