Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-30-2012, 10:13 AM
Styrmir
Guest
 
Posts: n/a
Default Outputting a notepad file with qoutation marks...

Hi everybody

I need to output a file in .txt format where all the variables have
quotation marks around them.

In my final step I do this:


proc sql;
create table final as select
compress(quote(field_1b)) as field_1,
compress(quote(field_2b)) as field_2,
compress(quote(field_3b)) as field_3,
compress(quote(field_4b)) as field_4,
compress(quote(field_5b)) as field_5,
compress(quote(field_6b)) as field_6,
compress(quote(field_7b)) as field_7
from cust_id;
quit;

So I have quotation marks wrapped around the values. But when I output
the file the result is like this:

"""CMBO""","""1234567890""","""NKC+1234567890"""," ""2990.00""",
12082010,"""DKK""",""""""

when it should be like this:

"CMBO","1234567890","NKC+1234567890","7500,00","12 082010","DKK",""

How can I output the file with a single quotation mark? Anybody
knows?

Thanks in advance for your help.

Styrmir
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 08-01-2012, 01:27 PM
hlschreier@gmail.com
Guest
 
Posts: n/a
Default Re: Outputting a notepad file with qoutation marks...

data _null_ ;
file print dsd ;
set sashelp.class ;
put (_all_)(~) ;
run ;

On Monday, July 30, 2012 6:13:57 AM UTC-4, Styrmir wrote:
> Hi everybody
>
>
>
> I need to output a file in .txt format where all the variables have
>
> quotation marks around them.
>
>
>
> In my final step I do this:
>
>
>
>
>
> proc sql;
>
> create table final as select
>
> compress(quote(field_1b)) as field_1,
>
> compress(quote(field_2b)) as field_2,
>
> compress(quote(field_3b)) as field_3,
>
> compress(quote(field_4b)) as field_4,
>
> compress(quote(field_5b)) as field_5,
>
> compress(quote(field_6b)) as field_6,
>
> compress(quote(field_7b)) as field_7
>
> from cust_id;
>
> quit;
>
>
>
> So I have quotation marks wrapped around the values. But when I output
>
> the file the result is like this:
>
>
>
> """CMBO""","""1234567890""","""NKC+1234567890"""," ""2990.00""",
>
> 12082010,"""DKK""",""""""
>
>
>
> when it should be like this:
>
>
>
> "CMBO","1234567890","NKC+1234567890","7500,00","12 082010","DKK",""
>
>
>
> How can I output the file with a single quotation mark? Anybody
>
> knows?
>
>
>
> Thanks in advance for your help.
>
>
>
> Styrmir


Reply With Quote
  #3 (permalink)  
Old 08-09-2012, 12:59 PM
Styrmir
Guest
 
Posts: n/a
Default Re: Outputting a notepad file with qoutation marks...

perfect, thanks a lot for taking the time
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 08:30 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.