Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Layout of .fmt files

Re: Layout of .fmt files

From: Rolf Unger <rolf.unger_at_ctilabs.de>
Date: 31 Mar 2004 10:28:12 -0800
Message-ID: <32fe19ad.0403311028.1bfaa971@posting.google.com>


swinfor_at_terra.com.br (Luiz) wrote in message news:<9356e81b.0403301151.530ff480_at_posting.google.com>...
> Does anybody knows a document that describe the content of a .fmt file
> generate in Developer environment??

Hm, difficult.

As far as I know there is no documentation on the format. With a little bit of ugly reverse engineering i found out that it does somehow reflect the structure that you see in the Navigator/Inspector of Form-Builder.

The main nodes to the hierachy level are blocks that have the "FRM50_IDFO" identifier.

There is one single block that has the IDFOS_OID = 1 (guess OID means something like object ID) and that is the parent of all in the hierachy level:

DEFINE FRM50_IDFO
BEGIN

   IDFOS_POI = 0    <-- Parent ID
   IDFOS_OID = 1
   IDFOS_NAM = <<"MODULE_NAME">>
   IDFOS_TYP = 22
   IDFOS_OOI = 0
   IDFOS_OPN = 111
   IDFOS_CNT = 29   <-- Number of children, somehow ???
END Next Level is defined by those IDFO blocks that have the parent id 1: IDFOS_POI = 1
These are anomymous blocks and they correspond with the object types Form-Level-Triggers, Alerts, Datablocks, Canvases, ... Strange enough my .fmt has 13 of those blocks, but the IDFOS_CNT in the parent block with ID=1 is 29.

DEFINE FRM50_IDFO
BEGIN

   IDFOS_POI = 1
   IDFOS_OID = 7
   IDFOS_NAM = <<"">>
   IDFOS_TYP = 69
   IDFOS_OOI = 0
   IDFOS_OPN = 0
   IDFOS_CNT = 7

END The children of these blocks are then the single form-level-triggers or datablocks, canvases, windows ... whatever you have. The following shows my first trigger in the "module_name" form:

DEFINE FRM50_IDFO
BEGIN

   IDFOS_POI = 7
   IDFOS_OID = 10
   IDFOS_NAM = <<"WHEN-WINDOW-ACTIVATED">>
   IDFOS_TYP = 68
   IDFOS_OOI = 1
   IDFOS_OPN = 314
   IDFOS_CNT = 3

END So basically it is somehow XML, but instead of xml tags they use begin-end blocks. That has the "great" advantage that there are no parsers that could handle this beasts of data. (One of my forms reached the size of 4 MByte as .fmt!)

Now one more important thing:

You may ask, where is my PL/SQL source code of the triggers and program units?

 It's hex-encoded to make it 7bit clean, if you use a language with  strings that may inlcude special characters like german umlauts or  french accents.
 You have probably recognized these blocks of raw data, when you had  a quick look at the file. The sick thing about it is, that it does not  only contain your source code but also a header that includes some  kind of timestamp. And as it is inside the hex blocks, there is no  clear separator between the header part and the body text.

Or you might do a diff on two version of .fmt files ...

 Forget it. Well if you did not change to much a diff could still  be meaningful, but if you did a full compile between the two stages  (always happens if you closed and opend the form) any of the PL/SQL  blocks will be changed because of the changed timestamp.

Conclusion:



You might try to save your form in the database. I think that these BEGIN-END blocks are one line in some table. So chances are that the stuff is more structured in the database, better to filter and better to search -- but your code will still be hex-encoded.

If you really interested in this thing, drop me a mail and I will send you a perl script that I wrote to decode the PL/SQL blocks back into plain text format.

HTH, Rolf. Received on Wed Mar 31 2004 - 12:28:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US