Hi Again,
I am having trouble using -outfixt- to export files that go beyond 400
positions. Maybe there is a limit I am supposed to reset somewhere but
what is happening is that -outfixt- works perfectly when the start
positions in cols are below 400 but when they go beyond 400 it gives me
a "invalid syntax, r(198) error". I kept everything else in the command
exactly the same, just adding an extra variable and its start position,
larger than 400, triggers the invalid syntax error.
For example:
quiet outfixt a b c d e f g h i j k l m n o p q r s t u v w x y using
filename, replace
cols ( 1 4 12 20 28 36 46 56 68 83 93 123 138 146 151 153 159 168 176
181 192 200 211 331 339) format flist
( )
Works perfectly, but,
quiet outfixt a b c d e f g h i j k l m n o p q r s t u v w x y z using
filename, replace
cols ( 1 4 12 20 28 36 46 56 68 83 93 123 138 146 151 153 159 168 176
181 192 200 211 331 339 413) format flist
( )
Gives the "ivalid syntax" error. I have checked the command many times
and everything else is identical. Can anyone who has used these before,
or Austin Nichols who wrote it, help me out? I just can't figure out
what I am doing wrong. 400 seems rather small to be a limit, and the
file I am using has up to 300 columns with width close to 4000. How can
I overcome this issue. Thanks a bunch,
-Prash.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Prashant
Shukla
Sent: Wednesday, December 17, 2008 5:22 PM
To: [email protected]
Subject: st: RE: outfix2 and outfixt
Please ignore my previous post, the following command with -outfixt-
gives perfect results, i.e, correct formatting copied from the Stat data
file and correct starting positions for all columns.
quiet outfixt a b c d e f g h i j k l m n o p using filename, replace
cols ( 1 4 12 20 28 36 46 56 68 83 93 123 138 146 151 153) format flist
( )
Thanks,
-Prash.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Prashant
Shukla
Sent: Wednesday, December 17, 2008 3:13 PM
To: [email protected]
Subject: st: outfix2 and outfixt
Hi All,
If any one has used -outfix2- and -outfixt- please provide some
guidance.
I need to produce fixed width files with the columns formatted a certain
way; and I already have all the columns in the right format. I have been
trying to use both these routines but have been unsuccessful. While
using -outfix2- the following command gives me "option format ()
incorrectly specified" error.
quiet outfix2 a b c d e f g h i j k l m n o p using filename, cols (1
4 12 20 28 36 46 56 68 83 93 123 138 146 151 153) format (%3s %8.0g
%8.0g %8s %8.0g %10s %010.6f %09.0f %015.6f %10s %30s %015.6f %8s %5s
%2s %8.0g )
On -outfixt-, when used without the -format- option it gives perfect
results, i.e., all the columns are at their respective places but the
formats are not the way I want them so I have to use the -format-
option. Below is a sample statement:
quiet outfixt a b c d e f g h i j k l m n o p using "filename",
replace cols (1 4 12 20 28 36 46 56 68 83 93 123 138 146 151 153 )
However, when I introduce the -format- and -flist- option, the resulting
columns are not where I want. For instance, the second column does not
start at position 4 instead there is a gap of 4 spaces between the first
and the second columns and the after that none of the columns are in
their respective positions. Below is a sample statement again:
quiet outfixt a b c d e f g h i j k l m n o p using "filename",
replace cols (1 4 12 20 28 36 46 56 68 83 93 123 138 146 151 153 )
format flist (%3s %8.0g %8.0g %8s %8.0g %10s %010.6f %09.0f %015.6f %10s
%30s %015.6f %8s %5s %2s %8.0g )
Also, FYI, there are columns which are prescribed to be longer than the
elements that they actually contain, i.e. column with a width of 30 does
not necessarily have an element that long. And there are some blank
columns too. But this did not matter when not using -format- option. Why
is the introduction of -format- changing things now? Is it not possible
to just use the formats from Stata without having to list the format for
each of the variables in the -outfixt- command? Please shed some light
on this if you can. Thanks you all very much,
-Prash.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/