.ado and .plugin

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

.ado and .plugin

Q X-2

Hello,
 
I write some new program in .ado and .plugin files. I want to use them to do analysis and plot graphs. I put them together in stata11 ado file. But when I type in new command in stata, there is error reminder. Stata says the command is unrecognized.
 
Could you please tell me how to generate new command based on these ado files and plugin? How to make these new program files work in STATA11?
 
Thanks.
Ann    
*
*   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/
Reply | Threaded
Open this post in threaded view
|

Re: .ado and .plugin

David Kantor
At 09:38 AM 12/2/2010, Cecilia Ann wrote:

>I write some new program in .ado and .plugin files. I want to use
>them to do analysis and plot graphs. I put them together in stata11
>ado file. But when I type in new command in stata, there is error
>reminder. Stata says the command is unrecognized.
>
>Could you please tell me how to generate new command based on these
>ado files and plugin? How to make these new program files work in STATA11?

I'm not acquainted with plugins, but for ados,...
1, does the ado file define the program (-program def...-)?
2, is the defined program the same name as the file (e.g., file
myprogam.ado defines myprogram)?
3, is the ado file located in either the current directory or your
ado directory (or appropriate subdirectory)?
HTH
--David

*
*   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/
Reply | Threaded
Open this post in threaded view
|

RE: .ado and .plugin

Q X-2
yes, the ado file defines the programm and the program name and ado file name are same.
I put them in the ado directory.
 
But it still does not work.
----------------------------------------

> Date: Thu, 2 Dec 2010 09:52:27 -0500
> To: [hidden email]
> From: [hidden email]
> Subject: Re: st: .ado and .plugin
>
> At 09:38 AM 12/2/2010, Cecilia Ann wrote:
>
> >I write some new program in .ado and .plugin files. I want to use
> >them to do analysis and plot graphs. I put them together in stata11
> >ado file. But when I type in new command in stata, there is error
> >reminder. Stata says the command is unrecognized.
> >
> >Could you please tell me how to generate new command based on these
> >ado files and plugin? How to make these new program files work in STATA11?
>
> I'm not acquainted with plugins, but for ados,...
> 1, does the ado file define the program (-program def...-)?
> 2, is the defined program the same name as the file (e.g., file
> myprogam.ado defines myprogram)?
> 3, is the ado file located in either the current directory or your
> ado directory (or appropriate subdirectory)?
> HTH
> --David
>
> *
> * 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/
Reply | Threaded
Open this post in threaded view
|

Re: .ado and .plugin

nshephard
Administrator
On Thu, Dec 2, 2010 at 3:26 PM, Cecilia Ann <[hidden email]> wrote:
> yes, the ado file defines the programm and the program name and ado file name are same.
> I put them in the ado directory.
>
> But it still does not work.

What directory did you put them in?

Is it listed in the directories that Stata is looking which is shown
by -adopath-

If you've not placed them in one of the directories listed by
-adopath- then Stata will not be able to run your do-file because it
doesn't know where you put it, and why should it, you could have a 2Tb
hard-drive with hundreds of thousands of directories, or even network
drives attached to your computer.  Stata can't possibly be expected to
search through everything to look for where you have saved your own
commands.

Neil


--
"Our civilization would be pitifully immature without the intellectual
revolution led by Darwin" - Motoo Kimura, The Neutral Theory of
Molecular Evolution

Email - [hidden email]
Website - http://kimura-no-ip.org/
Photos - http://www.flickr.com/photos/slackline/
*
*   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/
Reply | Threaded
Open this post in threaded view
|

Re: .ado and .plugin

Austin Nichols
In reply to this post by Q X-2
Cecilia Ann <[hidden email]>:
Saying merely that something "does not work" is of no use. Instead
tell us what you have done to diagnose the problem, what you typed and
what Stata replied.  Start by defining a very simple program and
making sure you understand how and where the files should be written:

file open t using ok.ado, write
file write t "prog ok" _n "di c(alpha)" _n "end" _n
file close t
type ok.ado
which ok
ok

The -type- command can be a useful diagnostic tool if you have saved a
file in a non-text format, and -which- can tell you if you have saved
a file in an inaccessible location.

On Thu, Dec 2, 2010 at 10:26 AM, Cecilia Ann <[hidden email]> wrote:

> yes, the ado file defines the programm and the program name and ado file name are same.
> I put them in the ado directory.
>
> But it still does not work.
> ----------------------------------------
>> Date: Thu, 2 Dec 2010 09:52:27 -0500
>> To: [hidden email]
>> From: [hidden email]
>> Subject: Re: st: .ado and .plugin
>>
>> At 09:38 AM 12/2/2010, Cecilia Ann wrote:
>>
>> >I write some new program in .ado and .plugin files. I want to use
>> >them to do analysis and plot graphs. I put them together in stata11
>> >ado file. But when I type in new command in stata, there is error
>> >reminder. Stata says the command is unrecognized.
>> >
>> >Could you please tell me how to generate new command based on these
>> >ado files and plugin? How to make these new program files work in STATA11?
>>
>> I'm not acquainted with plugins, but for ados,...
>> 1, does the ado file define the program (-program def...-)?
>> 2, is the defined program the same name as the file (e.g., file
>> myprogam.ado defines myprogram)?
>> 3, is the ado file located in either the current directory or your
>> ado directory (or appropriate subdirectory)?
>> HTH
>> --David
>>
*
*   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/
Reply | Threaded
Open this post in threaded view
|

RE: .ado and .plugin

Q X-2
Austin's comment is meant to be verbal attack. I do not think your behavior is in a polite way! I am trying to figure out the reason.Even if I say "does not work",it hurts you nothing.
Besides, your explanation is of no use at all!
 
----------------------------------------

> Date: Thu, 2 Dec 2010 10:38:53 -0500
> Subject: Re: st: .ado and .plugin
> From: [hidden email]
> To: [hidden email]
>
> Cecilia Ann :
> Saying merely that something "does not work" is of no use. Instead
> tell us what you have done to diagnose the problem, what you typed and
> what Stata replied. Start by defining a very simple program and
> making sure you understand how and where the files should be written:
>
> file open t using ok.ado, write
> file write t "prog ok" _n "di c(alpha)" _n "end" _n
> file close t
> type ok.ado
> which ok
> ok
>
> The -type- command can be a useful diagnostic tool if you have saved a
> file in a non-text format, and -which- can tell you if you have saved
> a file in an inaccessible location.
>
> On Thu, Dec 2, 2010 at 10:26 AM, Cecilia Ann wrote:
> > yes, the ado file defines the programm and the program name and ado file name are same.
> > I put them in the ado directory.
> >
> > But it still does not work.
> > ----------------------------------------
> >> Date: Thu, 2 Dec 2010 09:52:27 -0500
> >> To: [hidden email]
> >> From: [hidden email]
> >> Subject: Re: st: .ado and .plugin
> >>
> >> At 09:38 AM 12/2/2010, Cecilia Ann wrote:
> >>
> >> >I write some new program in .ado and .plugin files. I want to use
> >> >them to do analysis and plot graphs. I put them together in stata11
> >> >ado file. But when I type in new command in stata, there is error
> >> >reminder. Stata says the command is unrecognized.
> >> >
> >> >Could you please tell me how to generate new command based on these
> >> >ado files and plugin? How to make these new program files work in STATA11?
> >>
> >> I'm not acquainted with plugins, but for ados,...
> >> 1, does the ado file define the program (-program def...-)?
> >> 2, is the defined program the same name as the file (e.g., file
> >> myprogam.ado defines myprogram)?
> >> 3, is the ado file located in either the current directory or your
> >> ado directory (or appropriate subdirectory)?
> >> HTH
> >> --David
> >>
> *
> * 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/
Reply | Threaded
Open this post in threaded view
|

re: .ado and .plugin

Christopher F Baum
In reply to this post by Q X-2
<>
Cecilia wrote

"I write some new program in .ado and .plugin files."

plugin, in Stata language, is a technical term referring to some code in the C language that has been compiled and linked with appropriate C libraries on your machine. Unless you are a crackerjack C programmer, I would not try to write anything in this fashion. Stata ado-file code, possibly with Mata functions, is likely to provide you with everything you need.

Others have suggested that you examine your -adopath- and ensure that any ado-files you write are located on the adopath. They should be in the directory defined by PERSONAL, not the directories BASE nor UPDATES. If they are in PERSONAL, and are not occluded by ado-files of the same name elsewhere, you should be able to say -which foo- to locate foo.ado, or -viewsource foo.ado- to examine it.

Kit

Kit Baum   |   Boston College Economics and DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming   |   http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata   |   http://www.stata-press.com/books/imeus.html


*
*   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/
Reply | Threaded
Open this post in threaded view
|

Re: .ado and .plugin

Sergiy Radyakin
In reply to this post by Q X-2
Dear Cecilia Ann,

nobody wants to attack you here. Austin is just requesting additional
information to
help you solve your problem. He is not asking for the reason,
something you don't
know (otherwise you wouldn't write here), like any doctor is asking a
patient for
the SYMPTOMS of an illness, he is asking for COMMANDS and OUTPUT. Coming
to the doctor and saying "I feel sick" is of no use, unless there is a
possibility to
examine the patient. Since noone has access to your computer, the only way is
to communicate this information in the emails.


Based on the information you already provided, most probably creating
a .plugin file is
something wrong (unless somebody else has passed that file to you).


Given that the COMMANDNAME is the name of your new command (choose
capitalization appropriately):

1. Type which COMMANDNAME and report what happens.
2. Type findfile COMMANDNAME.ado and report what happens
3. Type sysdir and report what happens.
4. Type update query and report what happens.

When you write: "I put them together in stata11 ado file" explain
where you save the file
is it in the Stata 11 folder? Specify the exact location of your program.

This would help to resolve your problem.

Best, Sergiy Radyakin


On Thu, Dec 2, 2010 at 11:27 AM, Cecilia Ann <[hidden email]> wrote:

> Austin's comment is meant to be verbal attack. I do not think your behavior is in a polite way! I am trying to figure out the reason.Even if I say "does not work",it hurts you nothing.
> Besides, your explanation is of no use at all!
>
> ----------------------------------------
>> Date: Thu, 2 Dec 2010 10:38:53 -0500
>> Subject: Re: st: .ado and .plugin
>> From: [hidden email]
>> To: [hidden email]
>>
>> Cecilia Ann :
>> Saying merely that something "does not work" is of no use. Instead
>> tell us what you have done to diagnose the problem, what you typed and
>> what Stata replied. Start by defining a very simple program and
>> making sure you understand how and where the files should be written:
>>
>> file open t using ok.ado, write
>> file write t "prog ok" _n "di c(alpha)" _n "end" _n
>> file close t
>> type ok.ado
>> which ok
>> ok
>>
>> The -type- command can be a useful diagnostic tool if you have saved a
>> file in a non-text format, and -which- can tell you if you have saved
>> a file in an inaccessible location.
>>
>> On Thu, Dec 2, 2010 at 10:26 AM, Cecilia Ann wrote:
>> > yes, the ado file defines the programm and the program name and ado file name are same.
>> > I put them in the ado directory.
>> >
>> > But it still does not work.
>> > ----------------------------------------
>> >> Date: Thu, 2 Dec 2010 09:52:27 -0500
>> >> To: [hidden email]
>> >> From: [hidden email]
>> >> Subject: Re: st: .ado and .plugin
>> >>
>> >> At 09:38 AM 12/2/2010, Cecilia Ann wrote:
>> >>
>> >> >I write some new program in .ado and .plugin files. I want to use
>> >> >them to do analysis and plot graphs. I put them together in stata11
>> >> >ado file. But when I type in new command in stata, there is error
>> >> >reminder. Stata says the command is unrecognized.
>> >> >
>> >> >Could you please tell me how to generate new command based on these
>> >> >ado files and plugin? How to make these new program files work in STATA11?
>> >>
>> >> I'm not acquainted with plugins, but for ados,...
>> >> 1, does the ado file define the program (-program def...-)?
>> >> 2, is the defined program the same name as the file (e.g., file
>> >> myprogam.ado defines myprogram)?
>> >> 3, is the ado file located in either the current directory or your
>> >> ado directory (or appropriate subdirectory)?
>> >> HTH
>> >> --David
>> >>
>> *
>> * 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/