Forms and UNIX Commands

My question is: What is the command that is needed to send a UNIX command from a form generated using the Forms editor? I am trying to create a print button that when pushed in Oracle will generate a lpr command in UNIX and print the window. Thanks.

It is not as simple as using one command.
What I have previously done is set up an external procedure (documented in Oracle manuals) and call this external procedure from your form.
This external procedure must be a C program which will reside on your unix machine which can then call a unix script or whatever.
I would make sure that your external procedure returns a success or failure flag so that you know if the unix script run successfully (ie the print worked).
The hardest part to get this working is setting up the external stuff and listener etc so at first, just pass a couple of parameters to write to a unix file first and then when you can call this withouth any problems ..... change it to print.
Good luck

Similar Messages

  • How to generate a empty file in AL11 using ABAP and unix command

    Hi Experts,
    when load infopackage triggers it will search file from AL11 if file is available it will get loaded successfully.  When there is no file in AL11 error while opening file (orgin A) and the load will fail.  At this level i have to write a abap code using unix command to generate a empty file.
    Is there any way to achieve the above requirement.
    Thanks
    Vara

    Hi,
    If i get your requirement properly then you want to create a blank file if there is no file on the application server so that your infopackage does not fail, am i correct.
    If this is your requirement then this can be easily done if you use process chain to load the file via infopackage. Follow the following steps:
    1. Add a ABAP program before the infopackage and check if the file is present on the server or not. Use a simple ABAP statement OPEN DATASET <FNAME>. Check the SY-SUBRC after this statement if it is not 0 then it means that the file does not exist on the application server.
    2. Once you have established that the file is not present create a flat file using a code similar to the below one
    OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE
                          MESSAGE D_MSG_TEXT.
    IF SY-SUBRC NE 0.
      WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
      EXIT.
    ENDIF.
    * Transferring Data
    LOOP AT INT_table.
      TRANSFER INT_table-field1 TO FILENAME.
    ENDLOOP.
    * Closing the File
    CLOSE DATASET FILENAME.
    3. Add your infopackage step after this ABAP program in your process chain.
    I hope this helps.
    Best Regards,
    Kush Kashyap

  • Command to compile a form in Unix command line

    What is the command to compile a report in Unix command line for Oracle Developer Suite 10g Form version 9.0.4.0.19? Thanks.

    I am not quite sure but as I remember it is something like:
    rgen10*.exe something on oracle_home/bin directory
    Hope this helps
    Ghulam

  • Help with Servlet and Unix Commands

    Hello,
    I want to write a Java Servlet that runs some Unix commands on the system..
    Any guidelines? A really small and simple java servlet example that runs "ls -la" for example and outputs the results would be great...
    Any help would be greatly appreciated :)
    Thanks in advance

    You'll want to use Runtime.exec() to run Unix commands.
    Why can't you just get this out of java.io.File.listFiles()? What's ls really doing for you here?
    If you insist on using Runtime.exec(), you'll want to read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    MOD

  • ARD and UNIX commands with outdated MAN pages. (e.g. networksetup)

    I may have read it wrongly or referred to the wrong MAN page for "networksetup", but while trying to set proxies, I realise that networkservice for the ethernet port was no longer "Built-in Ethernet" but just Ethernet (without the quotes). Took quite some time to figure that one out. Any ideas if it's just the "new" MacBooks or 10.6.4 listing differently these days? I got my multiple unix commands to work :
    networksetup -setwebproxy Ethernet proxy 3128;
    networksetup -setwebproxy AirPort proxy 3128;
    networksetup -setproxybypassdomains Ethernet 10.0.1.10 *.local 10.0.0.200 10.0.0.0/16;
    defaults write com.apple.SoftwareUpdate CatalogURL 'http://10.0.1.10:8088/index-leopard-snowleopard.merged-1.sucatalog';
    softwareupdate -i -a

    Hi
    I found this out a few weeks ago after trying for about 20-30 minutes or so. Won't be the first time manual pages were wrong or out-of-date, nor the last. Depending which OS you're running there are manual pages for utilities that don't exist any more. I remember ktrace disappearing in 10.5 yet the manual page was still available. Completely gone in 10.6.
    Tony

  • Changing user type from ARD and Unix command

    I am now in charge of a Mac network encompassing many different machines, running a mix between Tiger and Leopard. I have them on ARD and would like to batch "demote" every user except my admin account on each machine to standard user privileges. What would be the command I need to send through to do this en masse?

    You could run a dscl command on the 10.5 machines. Maybe run it within a shell script that searches in the /Users folder and returns each folder name (user name). But, again this would only work on the 10.5 machines with the new directory services.

  • Softwareupdate -l and proxy and UNIX command

    When I run softwareupdate -l I'm prompted to login to our company proxy server, which I expect. Is there a way to send my username and password along with the software update command?

    If you're using Workgroup Manager, the procedure is documented in Chapter 7 of the System Imaging and Software Update Administration section of the Mac OS X 10.4 Server documentation.
    If not, another poster came up with this solution (I haven't tested it, so I can't say of my own knowledge that this is correct):
    Create the following as a text file, save it as com.apple.SoftwareUpdate.plist and then copy it to /Library/Managed Preferences/root/on each workstation. Replace the <<your server here>> with the address of your actual software update server.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>CatalogURL</key>
    <string>http://<<your server here>>:8088/</string>
    </dict>
    </plist>
    Hope it works for you.

  • Mail and Unix commands

    I am having all sorts of problems connecting to my ISP server. They had a total shut down a couple of weeks ago and since then connection time in Mail has got up to 3-4 minutes. Their support teckies are asking me to use Terminal to check out the connection and they can't figure out the results.
    here's what's happening.
    Using ping gives me this
    PING mx1.velcom.ca (67.220.134.187): 56 data bytes
    64 bytes from 67.220.134.187: icmp_seq=0 ttl=52 time=30.178 ms
    64 bytes from 67.220.134.187: icmp_seq=1 ttl=52 time=31.016 ms
    64 bytes from 67.220.134.187: icmp_seq=2 ttl=52 time=30.155 ms
    64 bytes from 67.220.134.187: icmp_seq=3 ttl=52 time=30.991 ms
    64 bytes from 67.220.134.187: icmp_seq=4 ttl=52 time=30.845 ms
    64 bytes from 67.220.134.187: icmp_seq=5 ttl=52 time=30.756 ms
    64 bytes from 67.220.134.187: icmp_seq=6 ttl=52 time=30.684 ms
    64 bytes from 67.220.134.187: icmp_seq=7 ttl=52 time=31.073 ms
    and it continues forever.
    Using tracert gets me to this
    tracert mx1.velcom.ca
    tcsh: tracert: Command not found.
    They don't seem to have a clue what these mean and neither do I.
    Anyone got any ideas?
    Using OSX 10.3.9 and Mail 1.3.11 (v622/624)
    Thanks

    Well here's the correct command and the result
    Last login: Wed Oct 22 09:35:23 on ttyp1
    Welcome to Darwin!
    [Peter-Hydes-Computer:~] peterhyd% traceroute mx1.velcom.ca
    traceroute to mx1.velcom.ca (67.220.134.187), 30 hops max, 40 byte packets
    1 64.213.140.2 (64.213.140.2) 13.318 ms 14.525 ms 12.094 ms
    2 64.210.12.226 (64.210.12.226) 12.718 ms 12.64 ms 12.543 ms
    3 64.210.12.225 (64.210.12.225) 13.683 ms 13.41 ms 13.47 ms
    4 64.210.12.62 (64.210.12.62) 25.575 ms 64.214.150.82 (64.214.150.82) 26.413 ms 26.547 ms
    5 border1.pc1-bbnet1.tor001.pnap.net (70.42.24.132) 26.284 ms 25.456 ms 25.319 ms
    6 colosseum-2.border1.tor001.pnap.net (70.42.26.2) 27.023 ms 27.487 ms 27.04 ms
    7 * * *
    8 207.61.120.57 (207.61.120.57) 27.155 ms 27.835 ms 27.252 ms
    9 mx1.velcom.ca (67.220.134.187) 27.043 ms 27.423 ms 27.557 ms
    [Peter-Hydes-Computer:~] peterhyd%
    So I will wait to see what their reply is. Thanks again for the suggestions, I had already done them but I went back and checked everything again and it all comes up correct. They are not the best people to deal with and I'm trying out a new ISP just to be safe:-)

  • Java and Unix commands

    I have a program that simulates a quiz. When the program begins, the user must type in the name of a file with the fully qualified path, the file doesn't have to be in the current directory. I just don't know how to get the java program to look for the file. For example, if I said the file name was ~gabel/cs/program.txt, and if I am in the directory of say ~ga/tests, how to I get it to go to find the file?

    As far as I'm aware, there's nothing in standard Java that will take a string identifying an arbitrary user and figure out the user's home directory, the way that some shells can do with "~". I believe you can get the current user's home directory with the system property "user.home".
    A reasonable heuristic to get an arbitrary user's home directory may be to start at user.home. If the user ID given is the same as the system property user.name, then you're done. Otherwise, go up a directory and see if there's a subdirectory with the same name as the user ID given. This seems likely to work across many systems, but by no means all of them.
    Otherwise...maybe you can Runtime.exec "finger" and parse the results. Maybe there's a better utility to use than "finger" but offhand I can't think what it would be.

  • ARD 3.6.1 remote log in Unix command failure

    Hello, I am using 10.7.5 and ARD 3.6.1 and cannot figure out how to remotely log in to another computer
    I wish to remotely log in using ARD to multiple computers in my network, up to 30 at a time for elementary students.  I can observe, control and send Unix commands to the machines when they are at startup log in screen or in use. This is the Unix command I am trying to use to log into the comptuer using ARD and Unix command function.
    osascript -e 'tell application "System Events" to keystroke "login"'; \
    osascript -e 'tell application "System Events" to keystroke tab'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke "password"'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke return'
    **and yes I am changing the login and password keystroke**
    I have tried the above Unix command and several others but I get a message saying "A console user is not logged in on “studnetmacbook""  so I click the button to run command as user admin but then get the message below. 
    36:50: execution error: An error of type -10810 has occurred. (-10810)
    36:49: execution error: An error of type -10810 has occurred. (-10810)
    36:54: execution error: An error of type -10810 has occurred. (-10810)
    36:52: execution error: An error of type -10810 has occurred. (-10810)
    36:52: execution error: An error of type -10810 has occurred. (-10810)
    Could someone explain these errors.  Is ARD not compatible with remote log in with the versions I have?  I have seen on sites this is posted and other sites that this needs to be run as the root user...Should I know how to run this as a root user and if so could someone help me with how to do this? 
    Or if anyone else has a working command could you share it with me for remotely logging in using ARD.
    Thanks!

    Hi
    Don't quite recognise what it is you're using. Maybe try:
    osascript <<EOF
    tell application "System Events"
    keystroke "whateverusernameyou'reusing"
    keystroke tab
    delay 0.5
    keystroke "whateverthepasswordis"
    delay 0.5
    keystroke return
    end tell
    EOF
    Instead. Works every time for me.
    The above are all on separate lines.
    HTH?
    Tony

  • SFTP using Unix command

    Hi all,
    I am trying to upload a file from SAP to a folder in another server.
    Here they want us to use SFTP port 22 which is not supported by SAP by default i guess.
    Could any one give me clear procedure and commands to be used in program in order to upload the in file in the server.
    If you could give the methods and FMs and unix commands used it would be great.
    I went through lot of threads but very few are talking about SFTP and i am not the clear about how to go with it.
    Few say that we need to create and external command in SM59.
    IF it is so can you tell what exactly are the parameter to be given for ex i want to put a file so what would be the parameters and how do we use this command in my program
    Any sample code which puts the file another server???
    Thanx

    Check if your able to do sftp at command line from the server where BPEL is running.
    --Prasanna                                                                                                                                                                                                   

  • To find whether a form using HOST (Unix) command to exit/execute a process.

    Hi all,
    I have some(Little bit) knowledge on forms.But here I got one requirement which was confusing me .The requirement is ,we have nearly 70 custom forms developed
    using TEMPLATE.fmb.Now I have to open each and every form and have to check whether that form is using any HOST (unix) command to exit to the shell and
    execute a process .I never got this type of requirement previously .Can any one help in how to search for those commands ,I.e is there any standard to use Unix call in
    particular trigger or etc..
    Thanks in advance .
    Regards,
    Gopi.CH

    Your question is a little unclear. The "HOST" command is an Oracle Forms built-in command which allows you to execute OS commands. So the only part of it that belongs to forms is the part that looks like HOST(). The contents within the parentheses would be the command you wanted to execute. For example:
    HOST('/path/to/your/script.sh');Refer to the Forms Builder online help for more information about how to use the HOST command.

  • Convert .fmb and .rdf files to .txt using unix commands

    I want to know how to convert .fmb and .rdf files to .txt using unix commands
    Example ACCT_ACCOUNTS_ADMIN.fmb ---> ACCT_ACCOUNTS_ADMIN.txt
    agent_balances.rdf ---> agent_balances.txt
    NOTE: i don't want to use form builder or report builder.
    is there anyone who can help me
    Regards
    Harsh

    Thanks it helped and Just to add little bit on it
    for i in `ls *.fmb`
    do
    f60gen module=$i userid=$unpw forms_doc=yes batch=yes
    done
    Might help someone too.
    Thanks

  • How to execute unix command through odi and store the result in table

    I have to reconcile  if data is loaded in table from csv file or not . I have to create a oracle data integrator package/interface/procedure to execute unix command to count number of rows in the csv files and store the count result in a table then i have to query the loaded table and count number of rows there and store in the table and have to compare is counts are same or not,  Please assist me how to make package/interface/procedure to  execute unix command and store result in oracle table.
    Thanks in Advance

    Use ODI OS command tool in the ODI package.
    create an interface in ODI using LKM File to Sql and the output file generated with the csv file's row count as a source and the db table(where the count needs to be stored) as a target

  • How To Start Forms and Reports From Start Command

    Hi All,
    How to start Oracle Forms and Reports in Oracle8i My OS is Windows 2000.Please tell the procedure to get into forms and reports.
    Otherwise we have to install other software for Forms and Reports.
    Thanks
    Sujan

    Sujan,
    what does the database have to do with starting Forms and Reports ? If you are on Wondows2000 then navigate to the \bin directory if the Oracle Home you installed Oracle9iDS to. Type ifbld90 for Forms and rwbuilder for Reports design environment.
    If your ability to start Forms and Reports from the command line is your only exit criteria in evaluating software for a project , how far will you go with it?
    Frank

Maybe you are looking for

  • 2 iTunes Accounts, 2 computers, multiple iPads/iPhones/iPods

    My wife and I have several iDevices between the two of us, and we currently share one iTunes account.  She recently received an iPad for work, and needs to set up a separate iTunes account that can be linked to her corporate credit card for business

  • Deleting BBM contact

    Hello everyone.. I have a problem with my BBM. When I trying to delete a BBM contact, It can't be removed. It's happen only in 1 contact. When I try to delete another contact, it's successful.. I have tried to reboot my BB and it doesn't work.. What

  • Lumia 1020 wont crop photos

    My 1020 looses picture quality when I crop the photos.  Its like im zooming in on a very low resolution photo. Everything goes pixilated and blurry.  The cropped photos cannot be used. One of the biggest selling points of the phone cannot be used. I

  • Mailmerge functionality

    Hi,     THE MAILMERGE FUNCTIONALITY IS NOT WORKING FOR THE LEAN CAMPAIGN MANAGEMENT SCENARIO: A new Marketing Plan for all marketing activities of the current year and the related Marketing Plan Elements on a quarterly basis are created using transac

  • Credit memo for smartforms

    Hi, Can anyboby tell me which smartforms are used for credit memo thanks in advance, Phani