prostrct list

Posted by a.noteboom on 20-May-2014 06:56

"prostrct list dbname" overwrites the dbname.st file Is there commandline to get a list of all the area's in the database without overwriting the current structurefile? i want to know from a script if the aifiles needed for activating afterimaging are already present in the database, and i don't want to change the stfile present. Is that possible? (11.3.2)

Posted by Rob Fitzpatrick on 20-May-2014 08:03

The prostrct list command can take a structure file name as a parameter.

prostrct list sports2000 foo.st will create or overwrite foo.st rather than overwriting sports2000.st.

All Replies

Posted by Stephanie Seney on 20-May-2014 07:08

We're not on OE 11 yet, but when I don't want to overwrite a .st file - I used the command and recdirect the output to a different file name.  We're on Unix:  prostrct list dbname > filename.txt


Posted by Vinko Buzak on 20-May-2014 07:20

Even if you redirect the output, prostrct list will still overwrite .st file.
 
I suggest you have 3 lines in your script:
 

-          Copy current st file to st.old

-          prostrct list dbname > dbname-st.out

-          Copy st.old to dbname.st

 
[collapse]
From: sseney [mailto:bounce-sseney@community.progress.com]
Sent: Wednesday, 21 May 2014 12:09 a.m.
To: TU.OE.RDBMS@community.progress.com
Subject: RE: prostrct list
 
Reply by sseney
We're not on OE 11 yet, but when I don't want to overwrite a .st file - I used the command and recdirect the output to a different file name.  We're on Unix:  prostrct list dbname > filename.txt
 

[collapse]
From: a.noteboom [mailto:bounce-anoteboom@community.progress.com]
Sent: Tuesday, May 20, 2014 7:58 AM
To: TU.OE.RDBMS@community.progress.com
Subject: prostrct list
Thread created by a.noteboom
"prostrct list dbname" overwrites the dbname.st file Is there commandline to get a list of all the area's in the database without overwriting the current structurefile? i want to know from a script if the aifiles needed for activating afterimaging are already present in the database, and i don't want to change the stfile present. Is that possible? (11.3.2)
Stop receiving emails on this subject.

Flag this post as spam/abuse.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse][/collapse]

Posted by Paul Koufalis on 20-May-2014 07:26

Stephanie: This does not work.  You get the STDOUT output (all that verbal diarrhea) in filename.txt but the dbname.st file is still regenerated.

A.noteboom: You can use prostrct statistics :

$ prostrct statistics aim | grep a[1-9]

    /db/aim/aim.a1  131072

    /db/aim/aim.a2  131072

    /db/aim/aim.a3  131072

    /db/aim/aim.a4  131072

    /db/aim/aim.a5  131072

You can also use rfutil db -C aimage list which will return an error and give you no information on physical AI files if AI is disabled OR give you the list of files.  This is not an answer to your question but it might be useful to one of the readers.

Posted by Stephanie Seney on 20-May-2014 07:52

You're right, I guess I never noticed that it did overwrite the .st file before.  In our case, it's not a problem, but I learned something new.  I just tested it with copy of the sports DB I had for testing.  Thanks for pointing this out.
 
Steph


[collapse]From: Vinko Buzak [mailto:bounce-vbuzak@community.progress.com]
Sent: Tuesday, May 20, 2014 8:21 AM
To: TU.OE.RDBMS@community.progress.com
Subject: RE: prostrct list
Reply by Vinko Buzak
Even if you redirect the output, prostrct list will still overwrite .st file.
 
I suggest you have 3 lines in your script:
 

-          Copy current st file to st.old

-          prostrct list dbname > dbname-st.out

-          Copy st.old to dbname.st

 
[collapse]
From: sseney [mailto:bounce-sseney@community.progress.com]
Sent: Wednesday, 21 May 2014 12:09 a.m.
To: TU.OE.RDBMS@community.progress.com
Subject: RE: prostrct list
 
Reply by sseney
We're not on OE 11 yet, but when I don't want to overwrite a .st file - I used the command and recdirect the output to a different file name.  We're on Unix:  prostrct list dbname > filename.txt
 

[collapse]
From: a.noteboom [mailto:bounce-anoteboom@community.progress.com]
Sent: Tuesday, May 20, 2014 7:58 AM
To: TU.OE.RDBMS@community.progress.com
Subject: prostrct list
Thread created by a.noteboom
"prostrct list dbname" overwrites the dbname.st file Is there commandline to get a list of all the area's in the database without overwriting the current structurefile? i want to know from a script if the aifiles needed for activating afterimaging are already present in the database, and i don't want to change the stfile present. Is that possible? (11.3.2)
Stop receiving emails on this subject.

Flag this post as spam/abuse.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse][/collapse][/collapse]

Posted by Rob Fitzpatrick on 20-May-2014 08:00

Another way to get a list of AI areas, if you have access to an editor:

for each _area no-lock where _area-type = 7:

  display _area-number _area-name.

end.

Posted by Rob Fitzpatrick on 20-May-2014 08:03

The prostrct list command can take a structure file name as a parameter.

prostrct list sports2000 foo.st will create or overwrite foo.st rather than overwriting sports2000.st.

Posted by a.noteboom on 20-May-2014 13:20

Thank you for the answer Rob Fitzpatrick.

I ended up using "prostrct list db tempfile.st"  and parsing the output.

I'm using this in a script to activate AI from my management tools.

thnx

I'm not able to mark your reply as the 'answer', because your first post containing the ABL code seem to mess up the html of the forum.  Maybe one of the moderators of this forum can look into this?

Posted by Thomas Mercer-Hursh on 20-May-2014 13:26

> Maybe one of the moderators of this forum can look into this?

They are.

This thread is closed