Page 1 of 1

How to set the output file for edsbr?

Posted: 11 Apr 2011 18:55
by krutarthap
Hi,

I want to use edsbr to generate a file with a list of extensions and phone names. I use

edsbr
clear
dir
name
go file

but the file being generated is always /tmpd/edsbr.out. Can i change the name of this file, to e.g. /tmpd/myfile.out?

Re: How to set the output file for edsbr?

Posted: 14 Apr 2011 05:09
by Eliott
mv /tmpd/edsbr.out /tmpd/myfile.out
Other way is not possible as edsbr calls just /usr2/oneshot/mtcl/edmcs with fixed options.
Or use:
cdmao;echo "SELECT Mcdu,S_Name,F_Name,UTF8_S_Name,UTF8_F_Name FROM PHONEB;"|cuser|grep "\-\-" |grep -v Mcdu |cut -c5- >/tmpd/myfile.out

Re: How to set the output file for edsbr?

Posted: 15 Apr 2011 00:44
by krutarthap
Thanks a lot! The second command is very useful, it is much simpler than edsbr.

Is the database structure (tables & fields) documented anywhere? I think there may be other useful queries that we don't know about yet.

Re: How to set the output file for edsbr?

Posted: 15 Apr 2011 03:42
by Eliott
krutarthap wrote:Is the database structure (tables & fields) documented anywhere?
I think so but have never seen it. It's R&D internal and I'm not an ALU developer.

Re: How to set the output file for edsbr?

Posted: 25 Aug 2011 08:39
by emning
krutarthap wrote:Is the database structure (tables & fields) documented anywhere? I think there may be other useful queries that we don't know about yet.
I've been working on a simple extension that required this as well, and found the table names by looking at the files in /DHS3data/mao.

In other words, this should give you a list of table names:

Code: Select all

cdmao
for x in $(ls *.idx); do echo ${x%%M.*}; done
From there a simple "select * from" on a table will give you field names and contents.

Re: How to set the output file for edsbr?

Posted: 29 Aug 2011 02:03
by Eliott
emning wrote:
krutarthap wrote:Is the database structure (tables & fields) documented anywhere? I think there may be other useful queries that we don't know about yet.
I've been working on a simple extension that required this as well, and found the table names by looking at the files in /DHS3data/mao.

In other words, this should give you a list of table names:

Code: Select all

cdmao
for x in $(ls *.idx); do echo ${x%%M.*}; done
From there a simple "select * from" on a table will give you field names and contents.
Easier: cat /usr2/fab/tbl2obj.ref