generate list of tables

algernonz

New Member
Hi all,

I am a beginning Progress sysadmin on Linux and preparing to make my first binary dump.

So ...
# proutil <databasename> -C dump <tablename> .
...is going to be the tool for that.

In order to automate this process rather then doing this by hand for each tablename, I want to generate a list of all tablenames.
I have read that this query will do the trick, "select "_file-name" from pub."_file" where "_file"."_hidden" = 0" but where exactly (from what tool) do I run this query?
Can I do this from somewhere within the Data Dictionary?

Couldn't find the answer on this in the knowledgebase (probably due to bad querying), so any help is much appreciated.

TIA, Alge
 
Do not attempt to use SQL when working with Progress 4GL.

You will regret it.

From a Linux command prompt:

mpro dbname

This will bring you to "the progress editor". You may be prompted for a userid & password. If you do not know a userid & password try ^E (that will cancel the login). If no security has been setup you will still be allowed in. If security has been setup (or if this is a runtime only license) you won't.

Assuming that you get so far as the editor...

You will see a screen that has a strip menu across the top something like this:
Code:
File Edit Search Buffer Compile Tools Help
───────────────────────────────────────────────────────────





─ File: Untitled:1 ──────────────────────────────────────────────

 F1=RUN  F3=MENUS  F5=OPEN  F6=SAVE  F8=CLOSE                              Insert

That is the editor. You can enter ad-hoc 4GL code here. To get a list of tables enter:

Code:
for each _file no-lock where _hidden = no:
  display _file-name.
end.

And type ^X to execute it.

To generate the proutil commands to dump those tables:

Code:
output to "bindump.sh"
for each _file no-lock where _hidden = no:
  put unformatted substitute( "_proutil dbname -C dump &1", _file-name ) skip.
end.
output close.
 
Back
Top