Is there a way of exporting all the application source to a text file?

34 views
Skip to first unread message

Allan Biggs

unread,
May 30, 2012, 12:20:44 PM5/30/12
to openroa...@googlegroups.com
I just wondered if things had changed. We are now using 5.1

Is there a mechanism to export OpenROAD source files for an application  to a fairly  compact text document ?

I need to do some analysis of our source code as part of a big tidying up exercise.

thanks
Allan



Adrian Williamson

unread,
May 30, 2012, 12:23:53 PM5/30/12
to openroa...@googlegroups.com
Hi Allan,
 
You can export applications as XML if you want, or there is of course the document app functionaility.
 
Adrian
 


From: openroa...@googlegroups.com [mailto:openroa...@googlegroups.com] On Behalf Of Allan Biggs
Sent: 30 May 2012 17:21
To: openroa...@googlegroups.com
Subject: [openroad-users] Is there a way of exporting all the application source to a text file?

--
You received this message because you are subscribed to the Google Groups "OpenROAD Users Mailing List" group.
To post to this group, send email to openroa...@googlegroups.com.
To unsubscribe from this group, send email to openroad-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openroad-users?hl=en.

Adrian Williamson

unread,
May 30, 2012, 12:26:43 PM5/30/12
to openroa...@googlegroups.com
Neithier of which I'd describe as compact....
 
Tools like Beyond Compare hepl to make things easier unless you know your way round something like sed/awk/perl etc.
 
I tend to write OpenROAD apps to consume openroad software as it's what I knwo best.
 
Adrian


From: openroa...@googlegroups.com [mailto:openroa...@googlegroups.com] On Behalf Of Adrian Williamson
Sent: 30 May 2012 17:24
To: openroa...@googlegroups.com
Subject: RE: [openroad-users] Is there a way of exporting all the application source to a text file?

Bodo Bergmann

unread,
May 30, 2012, 12:26:45 PM5/30/12
to openroa...@googlegroups.com

Allen,

 

OpenROAD is not using any source files (sources are stored in the repository).

 

Exporting an application in XML format (either from Workbench or using “-xml” option from command line)

should produce a “fairly compact” text document.

The question is, what information do you expect in such a document and how compact is ““fairly compact”?

 

If you are interested in certain parts of the sources only (e.g. the “Script” parts), then you can parse and filter the XML files
with XML tools (even OpenROAD).

 

Bodo.

 

Bodo Bergmann | Sr. Software Engineer | OpenROAD Worldwide Development | Actian

 

From: openroa...@googlegroups.com [mailto:openroa...@googlegroups.com] On Behalf Of Allan Biggs
Sent: Wednesday, May 30, 2012 18:21
To: openroa...@googlegroups.com
Subject: [openroad-users] Is there a way of exporting all the application source to a text file?

 

I just wondered if things had changed. We are now using 5.1

Bodo Bergmann

unread,
May 30, 2012, 1:04:59 PM5/30/12
to openroa...@googlegroups.com

The XML export file contains all information required to rebuild the application/component(s).

So, the content is as compact as it can get for an XML file.

Of course the element names could be shortened if we wouldn’t use the known/documented attribute names

(e.g. “b1” rather than “bgcolor”, “b2” rather than “bgpattern” etc.),
but that would make the whole thing cryptic again – an EXP export file is an example of such a cryptic text file.

Using XML parsers or the XML classes provided with OpenROAD on the export file will provide means to “post-process” the XML export file.

You can also use XSL transformation rules on it to convert it to the format you like (with the content you need).

 

It seems that you only want selected information,

but you described that you want the “source”, which means “everything” that makes up an application/component,
e.g. for a frame it’s the whole FrameSource with its properties including its form (and all fields), menu, toolbars, macro variables, style sheet, script, etc.

 

Bodo.

Allan

unread,
May 30, 2012, 3:10:00 PM5/30/12
to openroa...@googlegroups.com
I know that the source is kept in the database, Sorry for the confusion. i only want the ‘code‘ i am actually looking for the 3GL calls that we use.
Naming conventions that we use will help me with that.
Thanks for the replies i‘ll give it a whirl but oh to be back on VMS and with ABF for this sort of requirement !! Specifically not on windows.
--
Sent from my Android phone with mail.com Mail. Please excuse my brevity.

Adrian Williamson

unread,
May 30, 2012, 4:36:54 PM5/30/12
to openroa...@googlegroups.com
Hi Allan,
 
If you are just after the 3GL calls then you can track the dependency on these things using the Ingres table:
 
ii_dependencies
 
The 3GL routines are 'recorded' in the ii_entities table as entity_type = 'proc3glsource' if I recall correctly. (do a select distinct entity_type from ii_entities)
 
The ii_dependencies table should show everything that a component uses to make it work, and is at its best after you have done a compileapp.
 
I can't say that I've checked that it tracks 3GL procedures particularly well, but if you make a new application with a frame and a 3GL routine in a fresh database then you can check the contents of ii_dependencies without being distracted by loads of other components.
 
I'd always do a force compile before trusting the ii_dependencies table, so keep that in mind (relocatedb -new_database type stuff)
 
If it doesn't seem to be working then email again tomorrow and we'll give you hand (provided it's not 25 degrees here again in which case I'll be in the garden tanning my legs).
 
Good luck,
 
Adrian
 
 
 
 
 


Sent: 30 May 2012 20:10

Allan Biggs

unread,
May 31, 2012, 2:02:45 AM5/31/12
to openroa...@googlegroups.com
Adrian,

this seems to work

select ee.entity_name, e.entity_name  from ii_dependencies d , ii_entities e , ii_entities ee
where  e.entity_type    = 'proc3glsource'
and    d.dest_entity_id = e.entity_id
and   ee.entity_id      = d.src_entity_id
;



many thanks

Allan

 

----- Original Message -----

From: Adrian Williamson

Sent: 05/30/12 09:36 PM

Reply all
Reply to author
Forward
0 new messages