LOL,  Leave it to R:Base to make it that simple !!  

-- Frank

Frank Taylor - Information Technology Administrator 
F.J. O'Hara & Sons,  Inc - Araho Transfer Inc.
Boston, MA - Rockland, ME - Miami, FL
Direct Dial - 617-790-3093
email: [email protected]


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak Memon
Sent: Tuesday, April 12, 2011 2:02 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Gateway Export Question

At 12:50 PM 4/12/2011, Frank Taylor wrote:

>We have a new customer that wants a flat file sent to them with the 
>fields separated by the | (Pipe) symbol and no quotes.  I thought this 
>was going to be very simple, but I am having an issue where it is 
>giving me blank (No separator) instead of |
>
>Here is the command I am using
>
>gateway export Tab p:\durgin.txt select * from quotetable option 
>COL_NAMES ON | separator |
>
>If I change it to Separator #, then that works as does other symbols.
>I tried putting the quotes around the pipe '|' symbol but still no 
>luck.  Any suggestions ? This is RB V9.1


Frank,

Did you know that you can use the keyword "PIPE" as a separator for pipe symbol?

Here's how:

-- Example 01:

GATEWAY EXPORT TAB G:\Durgin.txt SELECT * FROM QuoteTable + OPTION COL_NAME ON 
| SEPARATOR PIPE LAUNCH G:\Durgin.txt RETURN

-- Example 02:
IF (CVAL('DATABASE')) <> 'RRBYW17' OR (CVAL('DATABASE')) IS NULL THEN
    CONNECT RRBYW17 IDENTIFIED BY NONE
ENDIF
    SET VAR vCommand TEXT = NULL
    SET VAR vFileName TEXT = 'Customer.txt'
    SET ERROR MESSAGE 2077 OFF
    DELETE .vFileName
    SET ERROR MESSAGE 2077 ON
    SET VAR vCommand = +
    ('GATEWAY EXPORT TAB'&.vFileName& +
     'SELECT * FROM Customer'& +
     'OPTION COL_NAME ON | SEPARATOR PIPE')
    &vCommand
    CLS
    LAUNCH .vFileName
    CLEAR VARIABLE vCommand
    RETURN

That's all there is to it!

Very Best R:egards,

Razzak.



_______________________________________________________________________
This Email has been scanned for all viruses by PAETEC Email Scanning Services, 
utilizing MessageLabs proprietary SkyScan infrastructure. If you need 
assistance, please contact the Systems Administrator, Frank Taylor at 
[email protected] - 617-790-3093. 

_______________________________________________________________________


Reply via email to