1 2 Previous Next 21 Replies Latest reply: Dec 23, 2009 3:52 AM by Manu. RSS

    script to compile all forms / reports?

    Roger25
      Hello,

      How can i compile all forms (.fmb) files inside a folder? Let's say i have many .fmb -s in C:\forms folder. What script i need to compile all?

      Thanks
        • 1. Re: script to compile all forms / reports?
          Manu.
          Roger,

          Create a batch file in the program directory where the FMB files exists, and write the below code in that batch file, and run the batch file.
          echo Start Forms Compilation.....This may take few minutes......
          for %%i IN (*.fmb) do C:\orant\BIN\ifcmp60 userid=<user_name>/<password>@<connection_string> module=%%i batch=yes module_type=form compile_all=yes
          Regards,


          Manu.


          If my response or the response of another was helpful, please mark it accordingly
          • 2. Re: script to compile all forms / reports?
            Arunkumar Ramamoorthy-Oracle
            Hi,

            Check out Steve's [nice script|http://forums.oracle.com/forums/thread.jspa?forumID=82&messageID=793131#793126] for compiling all the forms, menus and plls in a folder (for windows and unix). Change ifcmp90 according to your forms version (if it is 10g, you need to use frmcmp).

            -Arun
            • 3. Re: script to compile all forms / reports?
              Roger25
              Hi,
              thanks for response.

              But 'C:\orant\BIN\ifcmp60' is for forms5 or 6. If i'm using developer10g how can i change that?

              Regards,
              • 4. Re: script to compile all forms / reports?
                Manu.
                Rogger,

                For 10g, use the following script in the batch file.
                echo Start Forms Compilation.....This may take few minutes......
                for %%i IN (*.fmb) do C:\DevSuiteHome_1\BIN\frmcmp userid=<user_name>/<password>@<connection_string> module=%%i batch=yes module_type=form compile_all=yes
                Regards,

                Manu.
                • 5. Re: script to compile all forms / reports?
                  Sarah
                  hi

                  try this.
                  create patch file.
                  @ECHO OFF 
                  cls 
                  Echo compiling libraries 10g .... 
                  for %%f IN (*.pll) do frmcmp userid=%1 module=%%f batch=yes module_type=library compile_all=yes window_state=minimize 
                  ECHO libraries compilation complete
                  ECHO ----------------------------------
                  Echo compiling menus 10g .... 
                  for %%f IN (*.mmb) do frmcmp userid=%1 module=%%f batch=yes module_type=menu compile_all=yes window_state=minimize 
                  ECHO menus compilation complete
                  ECHO ----------------------------------
                  Echo compiling forms 10g .... 
                  for %%f IN (*.fmb) do frmcmp userid=%1 module=%%f batch=yes module_type=form compile_all=yes window_state=minimize 
                  ECHO form compilation complete
                  ECHO ----------------------------------
                  ECHO Form Compilation complete
                  Note:-u can also use frmcmp tool Form compilations.

                  u will find it over here.
                  C:\DevSuiteHome_1\BIN




                  sarah

                  Edited by: QGIRCO on Dec 22, 2009 10:59 PM
                  • 6. Re: script to compile all forms / reports?
                    Roger25
                    i used this, but when i tried to compile all forms, it were generated the forms with .err extension. if i open a form in form compiler and i compile it, i got the .fmx. with the script, just .err -s are generated.
                    The connection string is the same

                    What's wrong?

                    Thanks
                    • 7. Re: script to compile all forms / reports?
                      Manu.
                      Roger,

                      It will generate a err file, but when you open that file in a text editor like notepad or wordpad, you can see statements like below.
                      Compiling WHEN-NEW-FORM-INSTANCE trigger on form...
                         No compilation errors.
                      The err file generation is normal. And if the FMX is not generated, then you can verify the ERR file, from which trigger / procedure the error is generated, else you can ignore the ERR file.


                      Regards,


                      Manu.



                      If my response or the response of another was helpful, please mark it accordingly
                      • 8. Re: script to compile all forms / reports?
                        Roger25
                        All the .err files contains something like

                        Compiling WHEN-WINDOW-CLOSED trigger on form...
                        No compilation errors.

                        Compiling WHEN-NEW-FORM-INSTANCE trigger on form...
                        No compilation errors.

                        Compiling ON-ERROR trigger on CATEGORII_MOTIVE_RESPINGERE data block...
                        No compilation errors.

                        FRM-10044: Cannot create file.
                        • 9. Re: script to compile all forms / reports?
                          Manu.
                          Roger,

                          Do you have proper privilege on the folder? Is the file path contains spaces, if yes, then copy the folder to a simple path like C:\Compile and check again.

                          Also make sure all the attached libraries and olb files are there in the same folder.

                          Regards,

                          Manu.

                          Edited by: Manu. on Dec 23, 2009 10:22 AM
                          • 10. Re: script to compile all forms / reports?
                            527733
                            try compiling the dependant libraries and menu modules before you compile the fmb files.
                            • 11. Re: script to compile all forms / reports?
                              Roger25
                              How should i compile the .pll -s?



                              Should i change something here? .....(*.pll) do C:\DevSuiteHome10g\BIN\frmcmp

                              Thanks
                              • 12. Re: script to compile all forms / reports?
                                Manu.
                                Roger,

                                For that try the following line, change in 2 positions. ( (*.pll, module_type=library)
                                for %%i IN (*.pll) do C:\DevSuiteHome_1\BIN\frmcmp userid=<user_name>/<password>@<connection_string> module=%%i batch=yes module_type=library compile_all=yes
                                Regards,

                                Manu.
                                • 13. Re: script to compile all forms / reports?
                                  Roger25
                                  I have compiled the .pll files, i obtained the .plx files, i copied all the .fmb -s in another folder, C:\forme, and i tried to run the .bat
                                  But there are only .err files generated, and when i open one of them i see the same thing... Cannot create file. Why? If i compile from Oracle Forms Compiler it compiles..
                                  • 14. Re: script to compile all forms / reports?
                                    spilgrim
                                    Check that you have write persmission on the directory and that the FMB / PLL are also writeable ie: not read only. Compiling will write back to the source file as well as creating the executable (FMX)
                                    1 2 Previous Next