Unix script to compile forms

Right now I have this script to compile forms
ORACLE_HOME=/u01/app/ora_fr
export ORACLE_HOME
PATH=$PATH:/u01/app/ora_fr/bin
export PATH
FORMS_PATH=/u01/app/ora_fr/forms:/u01/app/ora_fr/forms/prod
export FORMS_PATH
TNS_ADMIN=$ORACLE_HOME/network/admin
export TNS_ADMIN
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdk/jre/lib/i386/server:$ORACLE_HOME/jdk/jre/lib/i386/native_threads:$ORACLE_HOME/jdk/jre/lib/i386:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
ORACLE_TERM=vt220
export ORACLE_TERM
frmcmp_batch.sh module=/u01/app/ora_fr/forms/devl/*platelet_irradiation_log.fmb* module_type=FORM compile_all=yes userid=hbc_qa/[email protected]
The problem is every time I compile a new form I need to vi this and change the module name.
Is there a way that I can give a parameter kind of thing here and add the fmb name when I call the script?
Thanks in advance
Anu

Here is a script I have used to generate (under unix) all the forms in a folder.   It uses f90genm, but you can modify the script to call whatever compile command you need.
<p>There is a unix script posted here:<br>
    Re: How to generate multiple files using f90genm ?
(keywords: genform compall )

Similar Messages

  • Calling unix script using oracle forms

    we have to call unix script using oracle forms , a trigger in form calls stored procedure on database
    that stored procedure on database calls a oracle shared library
    but since the only listener account for oracle on our unix server is oralist , whenever a call is made to the unix script from the oracle form , the unix script is executed by oralist user
    but issue that we are having now is since oralist is specific for listening connections from orale we dont want to use this user to establish SFTP on it to avoid any issues with oralist
    we want the sftp to be established on soem other useraccount , so is it possible to do something so that the script is executed by an account other that oralist.

    I'm not a Linux/Unix specialist, but I think this may work: let your database call a shell script that does a su command before running the actual script:
    su - other_account
    your_script.sh

  • Calling UNix Script from portal Form

    Has anyone conquered this issue through jav or plsql. I need to call a unix script from the portal form when I select the insert button.

    I have several very convoluted ways which all work, but I have always thought there should be more straightfwd ways. Fundamentally the easiest way to call something from the Insert button is to add some PL/SQL code before (or after) the "doInsert();" call in the Insert Button event handler.
    What seems to be lacking is the ability to get from pl/sql to the o/s. So until we know how to do that you have to call a method in Java to execute o/s commands - specifically you can use Runtime.getRuntime().exec(cmd); where Runtime is a class in java.lang, and cmd is the actual o/s command (script or whatever).
    How to call this Java is then where you have several options:
    1. Compile this piece of Java into the Oracle DB as a SP.
    2. Deploy this piece of Java within a Java servlet on a 9iAS instance. Then have another SP call this servlet using the utl_http package (begin_request and other sp's within package).
    Which options would depend on several factors including your preference but most importantly whether you have a DB or a 9iAS instance on the machine where you want to execute the script. If you have neither you have a problem. In such cases I have used a standalone OC4J container which has a very small footprint.
    As I said these methods are all quite convoluted and if anyone else has anything better I would like to know (but they work quite reliably).
    Cheers.
    Anton.

  • Compile Forms on a Unix Machine (check for errors in any of the files)

    Hello there,
    Our organization is wrapping up the development phase and beginning our testing phase. I am responsible for the Configuration Management of our forms, menus, libraries, and reports.
    We develop our code in a Windows environment (including compilation check), then we FTP the source files to a unix environment, then we compile the forms on a unix environment. We have this process down pretty well (for a couple of files at a time).
    Now we would like to automate our "build" procedure. This process involves the following tasks.
    1.) Extract all the source files from our vault software (PVCS)
    2.) FTP all the source files to the UNIX environment
    3.) Compile all the source files on the UNIX environment
    4.) Test the Software on the UNIX application server
    We have all of the above working (if no compilation errors occur). I am not sure how to check if any of the files errored during compilation. How can I check to see if any errors occurred during the UNIX source code compilation? I know how to do this manually (look at the output and see if the module compiled), but we are compiling approximately 200 files during our release build process. Maybe some sort of send the compilation results to an output file then search for any files that contain "not generated" (I assume if an error is generated, the text will be displayed to the user).
    Is there an easy way to check if any of the forms, menus, libraries, or reports errored during the "automatic" compilation process?
    Thanks,
    Mike

    I use this script to generate .fmx files from a zipped .fmb file. This approach allows for much faster FTP because our developers are not co-located with our servers.
    In addition, the tail command echoes the final line of the .err as either...
    Created form file <filename.fmx>
    for success or
    Compilation errors have occurred.
    for failure.
    # SCRIPT: zipgen
    # REV: 1.0.d - Used for developement
    # DATE: 070515
    # PLATFORM: Not Platform Dependent
    # PURPOSE: This script takes a single filename variable (w/o extension)
    # and it unzips the file then deletes any existing compiled
    # form of that name and finally attempts to generate a new fmx
    # of the variable name.
    # Assign Variables
    v_log=$1.err
    v_zip=$1.zip
    v_fmx=$1.fmx
    v_fmb=$1.fmb
    # Unzip File: Overwriting any existing file(s)
    unzip -q -o $1.zip
    # Cleanup ZIP files
    rm $1.zip
    # Delete existing FMX
    rm $1.fmx
    # Generate FMB
    gen $1
    # Display results
    tail -1 $1.err
    # End of script

  • Unable to compile form in unix

    Hi All,
    When I am trying to compile a form in unix using the below command:
    $ORACLE_HOME/bin/f60gen module=ICQTYUH2.fmb userid=apps/test99 output_file=ICQTYUH2.fmx module_type=form batch=no compile_all=yes
    I am getting the below message and the form is not getting compiled.
    Forms 6.0 (Form Compiler) Version 6.0.8.27.0 (Production)
    Forms 6.0 (Form Compiler): Release - Production
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    PL/SQL Version 8.0.6.3.0 (Production)
    Oracle Procedure Builder V6.0.8.21.0 Build #0 - Production
    Oracle Virtual Graphics System Version 6.0.5.39.0 (Production)
    Oracle Multimedia Version 6.0.8.25.0 (Production)
    Oracle Tools Integration Version 6.0.8.17.0 (Production)
    Oracle Tools Common Area Version 6.0.5.32.0
    Oracle CORE Version 4.0.6.0.0 - Production
    ROS ERROR: -200
    Segmentation Fault(coredump)
    Some additional info I also tried to compile some exisitng forms in the same directroy and those are getting compiled. So then i transfer a compiled form to my harddrive and open it with formbuilder and then save it and ftp it to unix. Again when I try to compile the same form without even making any change I am getting same message.
    So I am suspecting there is something wrong when I am opening and saving the form builder. Can anybody assist me with this problem.
    Thanks.

    I am pretty sure transfer is happening correctly. I am taking care of the binary mode of transfer. Moreover when I transfer an already compiled file from unix and without open it from form builder and save it, I just trasfer it back to the unix box and I am able to compile it.
    Is there any other thought on this.
    Thanks

  • Compiling Forms on a Unix Server

    Hello,
    I was wondering if there was a way to compile forms on a Unix server from the command line? Right now we are using Reflection X and form builder on the Unix server to compile.
    Is there any alternatives to Reflection X?
    Any help would be appreciated.

    In a normal vt100 telnet session, i use
    f60gen $formname $usern module_type=$moduletype Compile_All=YES
    cheers
    Yogeeraj

  • How to compile form in Linux?

    Hi guys,
    I am developing using forms builder 6i on windows xp.
    The application server is on Linux.
    Should I recompile my form on Linux?
    If so then can you please detail the step in how to do so? Because I am really unfamiliar with Linux.
    What command should I run? where do I run the said command? etc.
    Thanks
    Jim

    Jim
    Should I recompile my form on Linux? A. If you plan to run it on an iAS server that is Linux then Yes.
    Is you application server Linux and is it possible you could compile it there?
    Script to compile on the iAS server
    #UNIX Forms Compile
    #compile_forms.sh
    export FORMS_PATH=/u01/app/oracle/product/apps/<your_directory>
    export DISPLAY=localhost:2.0
    #export NLS_LANG=AMERICAN_AMERICA.UTF8
    export TERM=vt220
    export ORACLE_TERM=vt220
    export FORMS_BUILDER_CLASSPATH=/u01/app/oracle/product/apps/<your_directory>
    for i in `ls /u01/app/oracle/product/apps/afs_dev/your.fmb`
    do
    echo Compiling Form $i ....
    frmcmp_batch.sh userid=username/password@oracle_sid batch=yes module=$i module_type=form
    compile_all=yes window_state=minimize
    done
    # May Need to modify $ORACLE_HOME/frmcmp_batch.sh to include FORMS_PATH and other environment variables.
    # Copy the frmcmp_batch.sh to /home/oracle or the directory you prefer.
    Replace your.fmb and <your_directory> with the correct form name and path

  • Compile form(frmcmp.sh)

    Hi,
    There is Oracle Retek patch and module is rms.In patch there is one fmb file.while i am trying to compile it seems hanged Find below steps.I think there is issue with DISPLAY server if yes how could i resolve.
    $frmcmp.sh
    FRM-91500: Unable to start/complete the build.
    $export PROGNAME=recctadj.fmb
    $frmcmp.sh
    FRM-91500: Unable to start/complete the build.
    $export DISPLAY=192.168.125.20:0.0
    $frmcmp.sh ---> after running it seems hanged nothing comes
    Thnaks
    Edited by: userpat on Jun 7, 2010 3:13 AM

    Try using a script, for example:
    #UNIX Forms Compile
    #compile_forms.sh
    export FORMS_PATH=/u01/app/oracle/product/source
    export DISPLAY=localhost:2.0
    #export NLS_LANG=AMERICAN_AMERICA.UTF8
    export TERM=vt220
    export ORACLE_TERM=vt220
    export FORMS_BUILDER_CLASSPATH=/u01/app/oracle/product/source
    for i in `ls /u01/app/oracle/product/source/recctadj.fmb`
    do
    echo Compiling Form $i ....
    ./frmcmp_batch.sh userid=someuser/password@database batch=yes module=$i module_type=form
    compile_all=yes window_state=minimize
    done
    # May Need to modify $ORACLE_HOME/frmcmp_batch.sh to include FORMS_PATH and other environment variables.
    # Copy the frmcmp_batch.sh to /home/oracle or the directory you prefer.     
    # Change variables as needed make sure you set username password and database connect string

  • How ro run unix script freom pl/sql - dbms_scheduler 11.2.0.3

    Hi,
    Using 11.2.0.3 and have a unix script which works fine.
    Want to run this unix script every time a piece of pl/sql runs
    have put below in but doesn't actually run it.
    How can we achieve this?
    Many Thanks
    idea is that file we create locqally on server is copied to another via the unix script caled form pl/sql
    DBMS_SCHEDULER.create_program (
       program_name => 'test_executable_prog',
       program_type => 'EXECUTABLE',
       program_action => '/oracle/jm/data/dataout/copy_tcfile',
       number_of_arguments => 0,
       enabled => TRUE,
       comments => 'CREATE_PROGRAM test using a schell script.');Tried below but no joy
    -- Shell Script (OS executable file).
    /*DBMS_SCHEDULER.drop_program(program_name => 'por_copy_files');
    DBMS_SCHEDULER.create_program (
       program_name => 'por_copy_files',
       program_type => 'EXECUTABLE',
       program_action => ' /oracle/jm/data/dataout/copy_tcfile',
       number_of_arguments => 0,
       enabled => TRUE,
       comments => 'CREATE_PROGRAM test using a schell script.');
    DBMS_SCHEDULER.create_job (
        job_name        => 'por_copy_files_job',
        program_name    => 'por_copy_files',
        start_date      => null,--SYSTIMESTAMP,
        repeat_interval => null,--'freq=hourly; byminute=0',
        end_date        => NULL,
        enabled         => TRUE,
        comments        => 'Job defined by existing program and inline schedule.');Edited by: user5716448 on 03-Oct-2012 08:35
    Getting message when look in all_scheduler_job_run_details
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    even thoug hfile exists
    Edited by: user5716448 on 03-Oct-2012 08:50

    When run for unix command line which o.k
    get
    AUTHSTATE=files
    A__z=! LOGNAME
    COLUMNS=132
    EDITOR=vi
    ENV=/home/oracle/.kshrc
    HOME=/home/oracle
    LANG=en_US
    LC__FASTMSG=true
    LOCPATH=/usr/lib/nls/loc
    LOGIN=oracle
    LOGNAME=oracle
    MAIL=/usr/spool/mail/oracle
    MAILMSG=[YOU HAVE NEW MAIL]
    MAIL_HOST=prdikw01
    NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
    ODMDIR=/etc/objrepos
    ORACLE_BASE=/oracle/app/oracle
    ORACLE_HOME=/oracle/app/oracle/product/11.2.0/dbhome_1
    ORACLE_SID=IKW
    ORACLE_TERM=vt100
    ORATAB_PATH=/etc
    PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5/jre/bin:/usr/java5/bin:/usr/local/bin:/etc:/usr/sbin:/usr/ucb:/h
    ome/oracle/bin:/usr/bin/X11:/sbin:/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch
    PS1=[$ORACLE_SID]$PWD $
    PWD=/oracle/jm/data
    SHELL=/usr/bin/ksh
    TERM=xterm
    TMPDIR=/tmp
    TZ=GMT0BST,M3.5.0,M10.5.0
    USER=oracle
    _=/usr/bin/env
    dba=/home/oracle/dbaWhen run from pl/sql
    get
    ORA-27369: job of type EXECUTABLE failed with exit code: 255
    STANDARD_ERROR="execve: Exec format error"when try
    dbms_scheduler.create_job(
    job_name => 'POR_JOB',
    job_type => 'EXECUTABLE',
    job_action => '/oracle/jm/data/copy_tcfile',
    start_date => SYSTIMESTAMP,
    number_of_arguments=>0,
    enabled => true,
    auto_Drop => true,
    comments => 'Demo');Above code in pl/sql where create job and schedule job separately gives file not found message even though give full path

  • Call unix script within Servlet - need to wait for completetion

    Hi,
    I have a servlet which grabs some information from my web form and then calls a unix script.
    This already works fine and does what i need it to do. I now need to add some functionality where i can get the servlet to wait for the unix script to complete before carrying on and then redirecting back to the user.
    the code i have for the current servlet is:
             * EXECUTE THE UNIX COMMAND.
            Runtime   oRuntime  =     Runtime.getRuntime();
            Process   oProcess   =     null;
            String[]      cmd          =     {"/bin/sh", "-c", sPath}; // UNIX
             * ERROR CODES 3 = File not found
            try
              oProcess = oRuntime.exec(cmd);
            catch(Throwable t)
              t.printStackTrace();
            }I am assuming i need some sort of wait method to handle this. Any help would be greatly appreciated.
    Thanks
    Graham

    ok.. you code is fine.. you can run any shell script or program using the exec() method. if you need to wait till the process finishes then you need to call the method waitFor() in class Process.. the method blocks the parent thread (servlet) till the sub process (your exec'd script or program) terminates.
    hope that solves your problem.. :-)
    Pls tell me one more thing.. are you using netBeans or Eclipse for executing the programs or you use standalone tomcat to deploy the application. I have problem in execing programs when i deploy in tomcat 5.5 and the same application works fine in netBeans 5.0. if you know pls help me too..
    Thanks,
    -- abdel Olakara.

  • Running Unix script from stored procedure

    At present, I run a unix script to export my data for backup using telnet. I would like my users to run the commands on their own without my help. My users do not know telnet (they have no IT knowledge). So, I plan to create a form using Developer/2000 and let them run the procedure thru a stored procedure.But, my problem is how can a stored procedure call a unix script?

    Hi,
    solution, used by me.
    Create a stored procedure that produces a text file with utl_file. The content of the file is the script you want to execute on your Unix box.
    On your Unix Box write a shell script that scans the utl_file_dir for Files. If a file is in, chmod 744 to grnt execute rights to it and execute it.
    I have a example if you want.
    Start the script with crontab or let it loop with a sleep inside.
    HTH
    Detlev

  • Trigger UNIX Script from SAP

    Hi..
    The requirement is as follows :
    SAP drops a file into a folder and triggers a UNIX script using a File Port partner destination.
    Unix script will perform a secure copy to the Webmethods server.  If a Unix script error occurs, an Rfc function will be called to send an error notification to a particular contact  person.
    Can anyone help me how is the unix script triggered from SAP ?
    Thanks in advance

    You can execute this sample code:
    Data: unix_cmd(50).
    unix_cmd = 'chmod 664 /sapdata/DEV/home/travelers'.
    translate   unix_cmd to lower case.
    call 'SYSTEM' id 'COMMAND' field unix_cmd.
    write: / sy-subrc.
    OR
    Create and run a UNIX command programmatically
    The destination must be set up and configured from tcode SM59
                                                  see note OSS 63930
    rfcexec, this service must be started from UNIX
    UX syntax to start service:
           rfcexec -aUNIX_COMMAND -g sap01 -x sapgw00 &
           rfcexec        - program, /sapmnt/DEV/exe
           UNIX_COMMAND   - program ID from SM59, case sensitive
           sap01          - AP_Gateway_hostname
           sapgw00        - Gateway_Service
    Transaction SMGW, monitor the gateway (Goto/Logged on clients)
    *Number LU name  TP Name        Syst.type    Host name  Host address
       0  sap01    sapgw00        LOCAL_R3       sap01    10.1.193.50
    233  sap01    UNIX_COMMAND   REGISTER_TP    sap01    10.1.193.50
    Could replace this unsupported SAP syntax,         Call 'SYSTEM'
    *data: begin of tabl occurs 0,
    line(200),
    *end of tabl.
    *call 'SYSTEM' id 'COMMAND' field comm
                 id 'TAB' field tabl-sys.
    data: command(256).
    data : begin of ret occurs 10,           " results of unix command
            text(80),
          end of ret .
    data: i_connected_systems type table of gwy_system.
    data: w_connected_systems type  gwy_system.
    data: w_message(80).
    parameter: p_junk(4) default 'Junk'.
    start-of-selection.
    call function 'GWY_READ_CONNECTED_SYSTEMS'
    EXPORTING
      GWHOST                          =
      GWSERV                          =
      DISCONNECT                      =
      tables
        connected_systems               = i_connected_systems
    EXCEPTIONS
      GWY_UNKNOWN_OPCODE              = 1
      GWY_COMMUNICATION_FAILURE       = 2
      GWY_GET_TAB_FAILED              = 3
      GWY_NEWLINE_FAILED              = 4
      GWY_TABLEN_TOO_SHORT            = 5
      GWY_GET_OPCODE_FAILED           = 6
      GWY_GET_GWHOST_FAILED           = 7
      GWY_GET_GWSERV_FAILED           = 8
      GWY_MONITOR_DISABLED            = 9
      OTHERS                          = 10
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    read table i_connected_systems into w_connected_systems
               with key tpname = 'UNIX_COMMAND'.
    if sy-subrc ne 0.
      perform display_error_messages.
      stop.
    endif.
    *COMMAND = 'ls '.                           " command
    *COMMAND = 'ls -lt'.       " command, newest at top
    command = 'ls -osra'.
    call function 'RFC_REMOTE_PIPE'
    DESTINATION 'SERVER_EXEC'
      destination 'UNIX_COMMAND'
      exporting
        command  =   command
        read     =   'X'
      tables
        pipedata =   ret.
    loop at ret.
      write ret.
    endloop.
    end-of-selection.
    *&      Form  Display_error_messages
    form display_error_messages .
      data: begin of listtab occurs 0,
            field(80),
            end of listtab.
      listtab-field = 'Program UNIX_COMMAND is not registered.'.
      append listtab.
      listtab-field = 'Tell Basis person about the error'.
      append listtab.
      listtab-field = ' '.
      append listtab.
      listtab-field = 'UX syntax to start service: '.
      append listtab.
      listtab-field = 'rfcexec -aUNIX_COMMAND -g sap01 -x sapgw00'.
      append listtab.
      listtab-field = ' '.
      append listtab.
      listtab-field = 'Program  aborted,'.
      listtab-field+19 = sy-cprog.
      append listtab.
      call function 'POPUP_WITH_TABLE_DISPLAY_OK'
        exporting
          endpos_col         =     70
          endpos_row         =     20
          startpos_col       =     10
          startpos_row       =     10
          titletext          =    'Registered program error'
      IMPORTING
        CHOISE             =
        tables
          valuetab           =  listtab
      EXCEPTIONS
        BREAK_OFF          = 1
        OTHERS             = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " Display_error_messages
    Bruce

  • Getting error when compiling form in R12

    getting the following error msg when trying to compile a form in R12. what to do ?
    Message file /d01/oracle/VIS/db/tech_st/11.1.0/forms/mesg/fmcus.msb not found.

    970426 wrote:
    Looks like there is an issue with the install. If you used both oracle and applmgr accounts to install R12.1.1 Vision, then this script (and others, plus all application binaries) should be owned by applmgr account, not oracle. It looks like you used only the oracle account - does the applmgr account own any files ?
    HTH
    Srinibut Oracle and applmgr users belong to dba group and there are no files that are owned by applmgr...so whats the work around for compiling forms ??If applmgr account does not have any files, then you have single-user install (using oracle account). Have you sourced the application environment file in $APPL_TOP before invoking frmcmp_batch.sh ? Pl post the complete command used and the complete output and error message. If the install has been done correctly using oracle account, the script should work without errors
    >
    Message file /d01/oracle/VIS/db/tech_st/11.1.0/forms/mesg/fmcus.msb not found.
    >
    This message indicates you have sourced the database environment file, not the application environment file. The application uses 10g (10.1.2) binaries for Forms, not 11gR1 binaries (which are used by the database)
    http://docs.oracle.com/cd/E18727_01/doc.121/e12841/T120505T120509.htm#F_92659x3Ax20H1x20Head1x3Ax20Environmentx20Settings
    HTH
    Srini

  • How To Compile Forms 10g Devloped in Windows For Deployment In RHEL

    can any budy give me script file for compiling forms 10g ,which i developed in windows and need to be deployed in RHEL 5
    How To Compile Forms 10g Devloped in Windows For Deployment In RHEL 5
    any budy plzzz help

    You could try something like this:
    for i in `ls *.pll`
    do
    echo Compiling Library $i ....
    frmcmp.sh userid=me/me@medb batch=no module=$i module_type=library compile_all=yes window_state=minimize
    done
    for i in `ls *.mmb`
    do
    echo Compiling Library $i ....
    frmcmp.sh userid=me/me@medb batch=no module=$i module_type=menu compile_all=yes window_state=minimize
    done
    for i in `ls *.fmb`
    do
    echo Compiling Library $i ....
    frmcmp.sh userid=me/me@medb batch=no module=$i module_type=form compile_all=yes window_state=minimize
    done

  • How To Compile Forms 10g Devloped in Windows For Deployment In RHEL 5

    can any budy give me script file for compiling forms 10g ,which i developed in windows and need to be deployed in RHEL 5
    How To Compile Forms 10g Devloped in Windows For Deployment In RHEL 5
    any budy plzzz help

    Why not ask over at the Forms forum?
    Forms
    This is the Oracle Designer forum

Maybe you are looking for