Webutil_host.blocking( ) example needed  * SOLVED *

Hello, I need to get the name of the UNIX application server from my forms 10g program. I'm calling pid := webutil_host.blocking('uname -n') but it fails with a return code of 2 no matter how I format the command ('ksh -c "uname -n"', etc). subsequent calls to outp := webutil_host.get_standard_output(pid) or outp := webutil_host.get_standard_error(pid) don't seem to work either as trying to display outp(0), etc display nothing.
webutil functionality is not being called in pre-form or when-new-form-instance (before webutil is instantiated).
Can anyone point me to a working example of getting output from a UNIX command?
Thanks,
Gary

Ok, here's how I did it, turned out to be pretty simple:
FUNCTION get_oas_name RETURN varchar2 IS
  fp text_io.file_type;
  output varchar2(30);
BEGIN
  host('/bin/uname -n > /tmp/oasname');
  fp := text_io.fopen('/tmp/oasname','r');
  text_io.get_line(fp, output);
  text_io.fclose(fp);
  return output;
END;Gary

Similar Messages

  • WEBUTIL_HOST.blocking is not blocking

    Hello,
    I am having problems using WEBUTIL_HOST.blocking for Microsoft Office 2003 products and Adobe. For example, if I try to open a Word document in blocking mode and Word is already open, the blocking feature fails. I found that this happens also in Excel, Outlook and for pdf files. If the host application is not already open the blocking feature works fine. I have found that for file types using notepad, the blocking feature works all the time.
    Here is our setup:
    Forms Version 10.1.2.0.2
    JInitiator: Version 1.3.1.2
    Forms AS 10.1.2.0.2
    DB10g Enterprise Edition Release 10.1.0.5.0
    Windows XP professional, service pack 2
    Here is the code that runs:
    // v_fullname contains the fully qualifed filename
    v_Cmd := 'cmd /c start "" /WAIT "' || v_fullname || '"' ;
    Ret := WEBUTIL_HOST.blocking( v_Cmd ) ;
    I found a thread on here that solved this problem for Word with the following syntax
    v_Cmd := 'cmd /c start "" /WAIT WINWORD /W "' || v_fullname || '"' ;
    Is there a way to solve this problem with a generic solution? All help is greatly appreciated.
    Thanks Jim

    Hello,
    does anyone have any thoughts on this or a workaround?
    We use the blocking feature to allow the user to make changes to the document and then restore those changes to the database. Without this feature the code falls through and breaks the link between the document and the forms application.
    appreciate all help
    Jim

  • Webutil_host.blocking is not working when an existing Chrome browser is already open

    Hi Everyone,
       I've a small issue which I would like to share with you and hopefully you might have come across this problems before and assist me to resolve it.
    The problem is I'm using Oracle Forms [32 Bit] Version 11.1.2.0.0 (Production) version and in one of the Form's button I'm calling an external API to display the image in a Chrome browser and once it completes, it would return control back to the Oracle Form. In the ideal situation where there isn't any existing Chrome browser opened, the logic would work perfectly as I was using the webutil_host.blocking command that block Form processing until the Chrome browser is terminated. However, as soon as I have one or more existing Chrome browsers open, I was still able to call the external API to display the image but the locking or blocking of the Oracle Form would not work. By the way, all clients accessing the oracle Forms are using Window 7. Is that a solution for that? Is that a Chrome, OS or/and WebUtil issue? Thank you for your assistance and time.
    Regards,
         John

    Hello,
    does anyone have any thoughts on this or a workaround?
    We use the blocking feature to allow the user to make changes to the document and then restore those changes to the database. Without this feature the code falls through and breaks the link between the document and the forms application.
    appreciate all help
    Jim

  • WEBUTIL_HOST.blocking and winword 2003

    Hi all,
    I got some problems using webutil_host and winword 2003.
    As i open a document with winword in blocking mode, works well if word is not already open.
    Eg if word is already open it dunot do the blocking stuff, and go back to forms immediatly.
    here is the code :
    LC$Cmd := 'cmd /c start "" /WAIT "winword.exe'||'" '|| Path_vima;
    Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
    fms_message('back from call');
    LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
    If LN$But <> 0 Then
    Set_Alert_Property( 'AL_ERREUR', TITLE, 'Host() command' ) ;
    End if ;
    So if winword is not open on client -> it works well
    if winword already open -> it dunot block and display fms_message('back from call');
    Plz Help :)
    Thanks
    PS : this work perfectly with Excel ....

    Ok seems that dunot work even if not using forms.
    as launch a cmd like cmd /c start /WAIT winword
    it wait the close of winword to continue execution
    but if i launch winword first and than try a
    cmd /c start /WAIT winword
    it open a second winword but dunot wait for word to be close.....
    that's to bad .
    I'll try look at MS forum

  • Webutil_host.blocking procedure blocking the application intermittently

    we are using webutil_host.blocking procedure to open a word document and have the application blocked until word document is closed. It opens the word document fine but blocking the application intermittently. Since it was not blocking intially, I started debugging and tried recompiling the form. It is now blocking the application fine, with no change in the code. It is definitely not the recompilation that made the trick because I compiled the form many times earlier while I was working on other parts of the form. Please share your expertise if anyone had the same issue.

    we are using Forms 10.1.2.0.2 with Webutil 1.0.6

  • WEBUTIL_HOST.Blocking

    When I try to call the WEBUTIL_HOST.Blocking function from a Webutil enabled Form, I get this error when I try to compile the trigger:
    "expression is of wrong type"
    It is as if I cannot call WEBUTIL_HOST.Blocking as function.
    Here is the code I am trying to compile:
    DECLARE
         type PROCESS_ID is record (handle PLS_INTEGER);
         ret_pid PROCESS_ID;
    BEGIN
    ret_pid := WEBUTIL_HOST.Blocking('c:\bat\runprog.bat');
    END;
    Anyone else run into this problem???
    Thanks.

    This works for me:
    DECLARE
    ret_pid WEBUTIL_HOST.PROCESS_ID;
    BEGIN
    ret_pid := WEBUTIL_HOST.Blocking('c:\bat\runprog.bat');
    END;Well, when I say works I mean it compiles. Obviously I don't have a 'c:\bat\runprog.bat' to run.
    Cheers, APC

  • Webutil_host.blocking /nonblocking_with_callback problem

    I have a word document stored in the database. I want to open it in Word, edit it, save then store it back in the database.
    I thought that by using webutil_host.blocking, it would wait until I'd saved the document before continuing, but it doesn't.
    I've tried the following code:
    ret_code := WEBUTIL_HOST.Blocking('C:\Program Files\Microsoft Office\Office10\WINWORD.exe '|| doc_name ) ;
    and also:
         cmd := 'cmd /c start "" /WAIT "' || doc_name || '"' ;
         ret_code := WEBUTIL_HOST.Blocking( cmd );
    but neither work - the code following (to save back into the database) executes immediately and doesn't wait until I've quit Word.
    I've also tried using nonblocking_with_callback with a callback trigger, but the trigger is executed immediately while my Word doc is still open!
    Can anyone help?

    Hello,
    Yes, it is a user-defined form-level trigger.
    Francois

  • Hi, i have problem, when i press " File Import Video Frames to layers " please i need solve it fast. waiting.....

    hi, i have problem, when i press " File > Import >Video Frames to layers " he say to me [could not complete the video frames to layers command because photoshop does not support video on this version of windows]  so please i need solve it fast...

    We can't know. You have not provided any system info, no details about your video files nor do we actually know what version of what program you are referring to.
    Mylenium

  • Why is question blocked and not solved.

    Why is the question "Keep getting We noticed you may have signed in or signed out in another window. Click OK to reload your page. everytime I start firefox" blocked and not solved. I have had this problem ever since FF updated to ver 13. Is Mozilla going to fix this? I am using Win XP. None of the responses to the question resolve the issue for me.

    This question --> https://support.mozilla.org/en-US/questions/836545?s=Keep+getting+We+noticed+you+may+have+signed+in+or+signed+out+in+another+window.+Click+OK+to+reload+your+page.+everytime+I+start+firefox <br />
    is locked because the original question is over a year old. Advice given on prior Firefox versions may vary from advice given on current Firefox versions. Posting in more current similar questions with the same/similar topic may be allowed.
    Look for another similar thread/question or post a new question giving all of your details.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • [SOLVED][Code::Blocks]Installed needed library, now what?

    Hi ARCH-ers,
    Today I've got IMO quite easy question but which I cannot overcome by myself - I want to start making some OpenGL stuff using GLFW in Code::Blocks enviroment. I've installed glfw package from official ARCH repositiories. But when I choose GLFW Project in Code::Blocks it asks me to point GLFW location. So now my question is : where it is? Where had this package been installed? Or maybe I'm missing some important puzzle in this whole thing.
    I've also googled out this page http://wiki.codeblocks.org/index.php?ti … lling_GLFW but this zip file seems to lack in Linux make files.
    Last edited by Winged4Ever (2014-02-12 17:17:12)

    @Raynman Thanks, 'pacman -Ql <name>' is what I was asking for.
    But unfortunately things have now turned out to be more complex than I thought. The way pacman have installed it seems not to be matching Code::Blocks needs - files are scattered all around dirrefent directiores while it need a proper arrangement.
    Output of 'pacman -Ql glfw':
    glfw /usr/
    glfw /usr/include/
    glfw /usr/include/GLFW/
    glfw /usr/include/GLFW/glfw3.h
    glfw /usr/include/GLFW/glfw3native.h
    glfw /usr/lib/
    glfw /usr/lib/cmake/
    glfw /usr/lib/cmake/glfw/
    glfw /usr/lib/cmake/glfw/glfwConfig.cmake
    glfw /usr/lib/cmake/glfw/glfwConfigVersion.cmake
    glfw /usr/lib/cmake/glfw/glfwTargets-noconfig.cmake
    glfw /usr/lib/cmake/glfw/glfwTargets.cmake
    glfw /usr/lib/libglfw.so
    glfw /usr/lib/libglfw.so.3
    glfw /usr/lib/libglfw.so.3.0
    glfw /usr/lib/pkgconfig/
    glfw /usr/lib/pkgconfig/glfw3.pc
    glfw /usr/share/
    glfw /usr/share/licenses/
    glfw /usr/share/licenses/glfw/
    glfw /usr/share/licenses/glfw/COPYING
    I tried pointing different directions but only /usr/include/GLFW have required glfw3.h file. and nonetheless Code::Blocks shows an error like this:
    The path you entered seems valid, but the wizard can't locate the include directory. The wizard cannot continue.
    Do anyone know Code::Blocks well enough to point me out a solution?
    EDIT:
    @progandy Didn't noticed your post. Anyway I'll try the possible solution as you described.
    Last edited by Winged4Ever (2014-02-12 12:44:58)

  • Help on User Exits with example needed

    Hello Experts,
    Need help/material on:
    1)Understanding Advanced Customization (VOFM, User Exits)
    2)Calculating Freight Charges
    3)Integrating Credit and Payment Cards
    4)Interfacing with Other Modules (MRP, AR)
    5)Using Batch Delivery Processing
    Regards
    Innova

    Hi,
    There are a number of techniques SAP have used over the years to implement user-exits.
    The most recent exits will be found in CMOD. Using CMOD (or SMOD), you can list all the enhancements available, that use this technique. As  usual in the SAP world, the later the version of SAP you are using, the more exits are available.
    Other exits do not use the enhancement technique. For example, in Sales Order Processing (SAPMV45A), SAP have provided empty forms, such as USEREXIT_SAVE_DOCUMENT_PREPARE that can be used to provide customer functionality. With one client, this was used to set the blocking indicator on a sales order, if a manual change had been made to pricing. The requiredscript is written in between form and end form.
    Another technique is the use of validation and substitution rules in the financial modules.
    The best way to find the user exits available is through the IMG. The relevant nodes will take you to where the customisation can be performed. Usually, the associated IMG note details the use of each exit, though there are gaps.
    Award points if helpful.
    Message edited by
    Mohan

  • MDM - Examples needed with Tables and Data

    Hi,
    I am new to MDM. I just loaded the Console and Data Manager and connected to an MDM server. I am able to create a repository and browse in the Data Manager. However, I want to get some Table examples and data that go along with it. I am looking for a step by step guide to create some good tables and load actual data into it using a flat file or XML.
    Any help is greatly appreciated!

    Hi,
    MDM Repository Structure:-
    Table Types in MDM Repository
    1.Only one main Table.(Default name is Products)
    2.Sub Tables
    Lookup Sub tables are just one of the powerful ways that MDM enforces Data integrity in an MDM repository.
    (Parent - Child Relationships)
    3.Object Tables
    It is special type of Lookup Subtables.It includes the images ,Sounds,Videos,Binary objects,Text Blocks,Copy Blocks,Text HTMLs and PDFs.You cannot store any object dirctly to the Repository.Instead ,each object is defined or imported into the repository once then linked to a main or subtable field as a lookup into the object table of that type.
    [Object Tables eliminate redunt information ,since each object appears only once in the MDM repository even if it is linked in multiple records.]
    4.Special Tables
    Special Tables include Image variants,Masks,Families,Relationships,Work Flows,Named Searchs,Data Groups and Validation Group Tables.
    [Data Groups and Validation Group Tables are does not exist in the MDM Repository.]
    5.System Tables
    System Table appear under the Admin Node in the console Hierarchy include roles,Users,Connections,Change Tracking,Remote Systems,Portas,Links..etc.
    Creating Look up table.
    1.Create Lookup Table(Type as Hierarchy,Taxonomy,Qualifier)
    2.Add a Field in Main table
    3.Set the type(Hierarchy,taxonomy,Qualifier lookup)
    4.You need to enter or map the lookup table name and field.
    5.When ever u add new record in the Lookuptable,You can able to use that lookup data in the Main Table Record creation.
    I donot have software with me ,otherwise i would have given screenshot to u.
    For further info, U can refer Console reference Guide.
    Best Regards
    Devaraj PK

  • Parallel Conditional Block Example

    I am new to Guided Procedures. I am trying to create a process that has a parallel conditional block where the block would execute when an output parameter equals some value.  All the examples seem to have just simple sequential blocks.  Can anyone point me in the right direction/reference??  I am sure this is very simple for you GP wizards. 
    Thanks.

    One way for you to go about it is:
    - first you need create one main sequential block B1 that'll contain the parallel dynamic block B2
    - then you need your parallel dynamic block B2 that'll contain sequential blocks (B3 and B4) for each branching
    The first callable object of your parallel dynamic block will be a "decision value" callable object. Based on the result of the decision value, the block B3 or B$ will be choosen.
    Straightforward and easy to test. I mean normally

  • Oracle Forms - need to update multi-record block - Help needed asap

    Hi,
    We are using Oracle apps release 11i - Oracle forms 6i.
    I have a field "project_start_date" in project_block in a custom form. There is another multi-record block called role_block in the same custom form and it has a field named start_date. Requirement is when ever I make change in the project_start_date in project_block, that should reflect in role_block.start_date. I tried different means and could update only the very first record of the multi-record block - role_block. I need to update all the records in the role_block with the same project_start_date. Used looping and several other methods. But could not achieve. Any help is really appreciated.
    Thanks
    Akil

    Hi;
    For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which you can get more quick response
    Regard
    Helios

  • Script for moving multiple subtitle clips in the works - EXAMPLES NEEDED!

    Hi everyone!
    One severe deficiency of DVD Studio Pro is the inability to move multiple subtitle clips back or forward in a track by an arbitrary offset.
    I ran into this problem while I was creating a DVD from an EyeTV recording of a DVB broadcast, the subtitles from which have to be extracted to a SON file and a bunch of .bmp images with a separate piece of software, ProjectX. For some reason, ProjectX messed up the subtitle timecodes, so I had to move the entire track forward by a fixed amount. Unable to do this inside DSP, and unable to find tools that would do this for SON files, I set out to code my own tool with Python.
    Currently, I have a very simplistic working version of the script, which I successfully used to shift the timecodes of the aforementioned SON file.
    This got me thinking: I can't be the only one who has faced this problem. So, in the spirit of giving something back to the community, I thought I'd try my hand at turning this little script into a versatile tool for timescaling several different subtitle formats.
    If possible, I would like to receive real-life examples of several different plaintext (no binary formats, thanks) subtitle formats from you guys, both those that DSP supports and those that it doesn't.
    For now the tool only shifts entire tracks and works on the command line, but who knows, maybe I'll create a GUI at some point and add the ability to shift specific subtitle clips instead of whole tracks - time permitting, of course.
    If you think you might have some juicy subtitles laying around, please reply or contact me directly by e-mail: elamaton (at) nic.fi. Don't worry, I won't redistribute anything you send me, it will only be used as test data.
    iMac Core Duo 20"   Mac OS X (10.4.7)  

    Sounds like a very good idea... but have you seen Subtitler:
    http://www.versiontracker.com/dyn/moreinfo/macosx/26322
    Not to say you won't make a better version, and I'd be delighted if you did! Manipulating subs in DVDSP is not something I do any more - I use an external text editor for any job where more than a few subs are needed.
    The problem in DVDSP is that you cannot extract the subs directly, you have to export an track item description which has the subs and time code buried within the XML. You might find that PHP will give you a web based tool to extract the subs and time codes and write a text file, which you can then manipulate.
    In fact, wouldn't a web based tool be a good idea? People could upload the track description, it would export the subs and you could get it to adjust the timecodes and write a text file back in the correct format to import back in to DVDSP. Once the subs are in a text file it is a simple matter to manipulate them further...

Maybe you are looking for

  • X60, x60s scrambled graphics in outlook express

    I have a very strange problem with my x60(1706-8DU).  The problem only occurs in Outlook Express under XP Pro.  I can't read HTML messages and I can't reply to msg's at all.  When I read msg in HTML, the message is grayed out.  I can read only if I c

  • Use of Variable in Script Logic

    Dear All, We are working on a BPC Script Logic involving depreciation calculation, which calls an implementation of the BAdI BADI_UJ_CUSTOM_LOGIC. We are passing some parameters from the script logic to the BAdI. There are two parameters to be passed

  • Contact Form won't display input text

    Hi, I'm trying to create a flash contact form that sends the user's message on enter key. Therefore I need you to help me do this and also help me understand why my form isn't displaying right when I have a mask for it. To get a better picture of the

  • Can I authorize more than 5 computers for iTunes?

    Can I authorize more than 5 computers for iTunes?

  • USB not loading and saying there are no files...

    My USB has content but won't load properly: the drive shows on the desktop but with no name - just quotation marks when referenced. When i open it the folder it says it's empty, but when I 'get info' there is over 12gb taken up. I tried to use disk u