Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Education > Statistics > Re: KEEP comman...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3505 of 3659
Post > Topic >>

Re: KEEP command

by Bruce Weaver <bweaver@[EMAIL PROTECTED] > Jun 12, 2008 at 02:23 PM

On Jun 12, 5:39 am, "A.A.A" <ayaf...@[EMAIL PROTECTED]
> wrote:

--- snip ---

> And it works without errors but the problem is that I want to save
> the
> excel files so that the columns are with a certain order v1 then
> @[EMAIL PROTECTED]
 then @[EMAIL PROTECTED]
(these are the names of the columns)so I
p=
ut
> after the save translate command
> the "keep" command as follows:
>
> SAVE TRANSLATE OUTFILE=3D!QUOTE(!concat('E:\simuldata1\', 'datag', !i,
> '.xls'))
>
>   /TYPE=3DXLS /VERSION=3D8 /MAP /REPLACE /keep v1  @[EMAIL PROTECTED]
 @[EMAIL PROTECTED]
 v2 v3
> v4 v5  v6 V14_mean1 v7 V14_mean2 v8 V14_mean3 v9 V14_n.
>
> But unfortunately the excel files were saved without the order of
> columns I need: v1 then @[EMAIL PROTECTED]
 then @[EMAIL PROTECTED]
 where is
the
> problem??????????????????????????????
>
> Great thanks

Assuming there is no blank line in the middle of the SAVE TRANSLATE
command, I don't see any obvious problems.  If you're not able to
figure out why it's not working as expected, you could always use
MATCH FILES (or ADD FILES) to rearrange the order of variables in the
working data file (and delete unwanted variables) before writing out
to Excel via SAVE TRANSLATE.  That would look something like this:

match files file =3D * /
 keep =3D v1  @[EMAIL PROTECTED]
 @[EMAIL PROTECTED]
 v2 v3 v4 v5  v6
    V14_mean1 v7 V14_mean2 v8 V14_mean3 v9 V14_n .
exe.

SAVE TRANSLATE
  OUTFILE=3D!QUOTE(!concat('E:\simuldata1\', 'datag', !i, '.xls')) /
  TYPE=3DXLS /VERSION=3D8 /MAP /REPLACE .


By the way, when posting the same question to more than one group,
please cross-post rather than doing separate posts to the different
groups.

HTH.

--
Bruce Weaver
bweaver@[EMAIL PROTECTED]
"When all else fails, RTFM."
 




 1 Posts in Topic:
Re: KEEP command
Bruce Weaver <bweaver@  2008-06-12 14:23:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Dec 4 22:54:27 CST 2008.