Call executable and stdout/stderr

Is there a possibility to save  the output of commandline program which writes to stdout/stderr and which is run from a call executable teststep other than to redirect the stdout/stderr channels to a file ?

The Call Executable Step Type does is not able to access the stdout/stdin/stderr at the present time.  This may be a feature we consider adding for a future version of TestStand.
One workaround you can do is to call an executable from another environment (such as LabVIEW), and create a custom step type from this.
Allen P.
NI

Similar Messages

  • Calling Unix-Script from within Oracle and store stdout/stderr in table

    Hi,
    What I want to do is:
    1. Calling a UNIX script (e.g. hello.sh) (from inside the Database)
    hello.sh
    echo “Hello World!“
    2. and get the stdout/stderr output back in my Database in a table (e.g. temp_back)
    table temp_back
    ID     stdout          stderr
    1     Hello World!
    I think Number 1 isn’t a big problem, but how to get stdout back in DB?
    Any solution?
    I searched a bit in this Forum and found this Post.
    re:Calling Host Command Through Database  Procedures or Triggers
    This may be what I am searching for, but can’t access the Link
    Since I am not really fit with UNIX and packages/procedures in Oracle it would be nice if you could post a very detailed answer.
    (Please no java)
    -What packages do I need? (heard DBMS_OUTPUT would be useful)
    -example PL/SQL script
    Thanks a lot!
    Marcus
    Environment:
    Oracle 9.2.0 DB

    Marcus, if you opened the Java sandbox to access any o/s file, you can call any Unix command, shell script, or program, that the Oracle o/s user has exec privs on.
    Just remember that there's a very basic Unix environment when you make the call - the settings in the .profile does not apply. Thus PATH for example is not set. When making the call make sure that the complete path is given. As for the environment, that is a problem as you cannot set that and make the call at the same time.
    In that case it is much simpler to rather write a Unix shell script that does all for you. Set the environment. Run the command(s). Format output. Etc.
    Then you call that Unix script, via Java, from SQL or PL/SQL. Treat the Unix scripts like the Unix-version of stored procedures for your Oracle application.
    Some technical details. When you connect to Oracle, a Unix process services you. This can be either a dedicated server process (servicing only your Oracle session) or a shared server process (from the shared service pool of processes).
    In either case, it is a Unix process running as a background process (thus detached from any tty device). PL/SQL and SQL are executed by this process. The Oracle JVM created by your session also lives in this process. When you therefore make o/s calls, these calls are made by this process.
    Therefore you are limited to what this process can and can't do. E.g. it runs as the oracle o/s user and will fail on accessing paths and commands does the oracle user does not have privs on. Etc.

  • Remote procedure call failed and did not execute response after changing contents

    Hey Hey!
    I have reviewed the other posts related to this issue but have not found a solution.
    I have done myself quite a mischief and hope someone here can help me out!
    I'm running an old ACER laptop with Windows 7. This PC belonged to an old colleague and therefore all of the folders and user names were still under his name, so I decided to try to change them all to my name. The main issue was the USER folder which had
    the locked symbol next to it but it wasn't locked at all. I googled how to delete this folder and one bright spark suggested I create a new folder with my name, copy all of the folders from the other 'locked' user's folder into my folder, and then delete the
    old user's folder. 
    That was fine. All seemed well. When I tried to delete the old folder the computer sat around thinking saying it was 'moving' but not doing anything. So, I cancelled the operation in the Task Manager. When I attempted to open any folder from the start menu
    or desktop or task bar I was presented with a bunch of numbers and letters and the message "REMOTE PROCEDURE CALL FAILED AND DID NOT EXECUTE."
    I quickly googled the message realising I'd made a major error and the first response was to type in services.msc or something to that effect, so I typed that into the Start Menu search bar and hit enter and nothing came up. So, I tried again, but now I
    couldn't type anything into the search bar, I could not even select any programs from the Start Menu. 
    So, I can't access the Start Menu, search bar, or any of the folders unless I open uTorrent, select open containing folder, and from there I can access what I need.
    I'm too afraid to reboot the PC. I can't locate my copy of Windows 7 anywhere. I'm freaking out!!
    Before I pour my lowly student wage into getting a professional to fix it, could someone please offer some suggestions??
    Greatly appreciated in advance. 
    Paris, Texas. 

    Hi,
    Based on your description, for this question is more related to NetQueryDisplayInformation() API, in order to get better help, we may ask for suggestions in the following MSDN forum.
    MSDN Forum
    https://social.msdn.microsoft.com/Forums/en-US/home
    Besides, we can try to use a script to get all domain users. Regarding this point, the following script can be referred to as reference.
    How to list all active directory users in a particular domain using PowerShell
    https://gallery.technet.microsoft.com/office/How-to-list-all-active-0d9be7ce
    In addition, for scripts, we can also ask for help in the following forum.
    The Official Scripting Guys Forum
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    Best regards
    Frank Shen 

  • Default Logging of stderr and stdout to files

    Are stderr and stdout logged to a file as part of the default configuration?
    Are stderr and stdout sent to weblogic.log, or to another file?
    Are there parameters in the config.xml for re-directing stderr and stdout to
    a file?
    What should I be looking for?
    Thanks in advance.
    Stan

    Depending on the platform, most people start Weblogic with a shell or batch
    or command script that redirects stderr and stdout ... sometimes to one file
    sometimes to two different files. You can use the ">" and "2>" on
    DOS/Windows/Linux/Unix to redirect stdout and stderr.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Stan" <[email protected]> wrote in message
    news:[email protected]..
    Are stderr and stdout logged to a file as part of the defaultconfiguration?
    Are stderr and stdout sent to weblogic.log, or to another file?
    Are there parameters in the config.xml for re-directing stderr and stdoutto
    a file?
    What should I be looking for?
    Thanks in advance.
    Stan

  • Primitivelogger - A barebones-simple file and/or stdout/stderr logger

    Nothing too major to announce here, just thought I'd share in case anyone wanted to make use of this. Basically, I've been writing my media player app, and obviously found a need for logs. But for one, I wanted logs that could be colorized if they were headed to STDOUT/STDERR, and otherwise be "boring". And I just wanted something to code.
    So, I present to you "primitivelogger", a reinventing-the-wheel-because-I-can barebones logger that uses Clint for color when sending things to the standard outs, which is the default. You can specify a log file and a date/time format when setting up the logger object, and use its 3 simple functions: info(), error(), and fatal(). Take a look on Github if you want. If you have an idea, fire away, I'm open to decent suggestions. And if you don't like it, well... that's cool too!
    It's Python 2/3 compatable and is on the AUR as python[2]-primitivelogger-git. I dunno if I'll be making a non-git package or not. Might be useful for some cases but as I doubt this gets updated much, it'd probably be pretty redundant.

    what about
    * * * * * /home/snuffy/myscript.sh > /tmp/snuffy.lis 2>&1
    or
    sqlplus -s /nolog >>$logfile 2>&1 <<EOF!
    Edited by: user11181920 on Aug 13, 2012 5:10 PM

  • [advanced] Runtime.exec() and ordering of stdout, stderr

    Hi,
    When invoking Runtime.exec(), I'd like to output the contents of stdout, stderr in the correct order. I am using Process.getInputStream(), Process.getErrorStream() and output those but I can't get the order right.
    For example, the following events occur:
    1) stdout: "c:\> dirt"
    2) stderr: "dirt is a bad command or filename"
    3) stdout: "c:\>"
    When I run my program I get the following output:
    c:\> dirt
    c:\>
    dirt is a bad command or filename
    My output has #1 and #3 merged and #2 in its own. The placement of stderr is crucial in my program; how can I possibly synchronize the two streams and know which text goes where?
    Please help.
    Gili

    Crosspost. See Advanced forum.

  • Window.cep.process.createProcess - how to capture process stdout/stderr?

    I am using following code to execute process and capture stderr/stdout:
    proc = window.cep.process.createProcess('/path/to/nodejs','/path/to/script.js');
    // proc.data is a PID
    window.cep.process.stdout(proc.data,function(line){
        console.log(line);
    window.cep.process.stderr(proc.data,function(line){
       console.log(line);
    And here is my script.js:
    console.log('abcdef');
    console.log('12345');
    console.log('gghhtt');
    For some reason only the first line ('abcdef') is printed by stdout handler (handler is called only once)... Next lines are ignored and callback is never called again. What I am doing wrong?
    Adobe Photoshop Version: 14.2 (14.2 20131211.r.515 2013/12/11:23:00:00) x64
    Operating System: Mac OS 10.9.1

    There is nothing wrong in your code. This is a limitation of cep.process.stdout/stderr which is targeting to capture one time of stdout/stderr output. For now, two workarounds are suggested as the following.
    a. Embed cep.process.stdout/stderr, like the code below
    window.cep.process.stdout(proc.data,function(line){
        console.log(line);
        window.cep.process.stdout(proc.data,function(line2){
            console.log(line2);   
            window.cep.process.stdout(proc.data,function(line3){
                console.log(line3);
    b. Join all stdout output as one, like
    var str1 = 'abcdef';
    var str2 = '12345';
    var str3 = 'gghhtt';
    console.log(str1 + str2 + str3);
    Besides, the good news is since CEP5, nodejs is integrated into CEP and your script could be executed in Html engine of CEP directly. My guess is Photoshop 15.0 will probably pick up CEP5 to involve the benefit in. Kindly let me know if you need more information.

  • Feature Request: stdin/stdout/stderr redirection

    I know that CLibInit.setSprite() can setup a text area for
    this purpose - I haven't gotten this to work at all since I've been
    using gluegen wrappers and you need to call setSprite() before
    init() and the glugen wrappers do init() when the static class is
    loaded. Being able to call setSprite() at any time would be a boon.
    But even if I get setSprite() to work, I'd like to be able to
    redirect stdin/stdout/stderr to use some buffers that I can control
    the use of.
    Need to play with file access but something similar would be
    nice there too - controlling file handles to go to buffers under my
    control.

    Lexion wrote:[...]
    int redirect_io()
    freopen(in, "r", stdin);
    return 0;
    int shell_write(char *s)
    // write command to stdin file
    fprintf(stdin, "%s\n", s);
    return 0;
    I don't think its related, but you are writting to a file opened for reading. I believe bash is exiting because after reading the ls command there's nothing left in the file and it gets an EOF.
    You should be using pipes here:
    int fork_shell()
    /* call pipe(), it will give you two file descriptors,
    * one for each end of the pipe.
    // fork another thread to run shell
    shell_pid = fork();
    if (shell_pid == 0)
    /* close the write end */
    /* reassing stdin to the read end, using dup() i think */
    /* reopen stdout to a file (or the write end of another pipe
    * if you want the output to go back to the parent process)
    char *cmd[] = {"/bin/bash", NULL};
    execv(cmd[0], cmd);
    _exit(0);
    /* you may reassing stdout to the write end of the pipe or use it
    * explicitly when sending commands to bash
    return 0;
    Last edited by diegonc (2010-07-28 14:24:02)

  • How to create bdc for fbs1 using both call transaction and session

    Hi Friends,
    i have one problem with tcode FBS1, i need to create a bdc program for both call transaction and session method using subroutine.
    first call transaction needs to execute if there is an error sesion has to execute. if u have code please forward.
    thanks in advance.
    chandramouli pothugunta

    where as in call transaction we can do error handling explictly.those errors  are stored in one file .this file will send to the error log(session method),i.e session log.
    in the above case we use both call transaction n session method at time in one program.sample code is below ,go through it .
    data : begin of itxk01 occurs 0,
    end of itxk01.
    data : bdcdata like itbdcdata occurs 0 with header line.
    data : itbdcmsgcoll like itbdcmsgcoll occurs 0 with header line,
             itxk01 like itxk01-dup occurs 0 with header line.
    call gui-upload.
    loop at itxk01.
    refresh itxk01.
    perform bdc-dynpr0 using 'prg' 'scr'
    perform bdc-dynfld using fnam fval
    call transaction 'xk01' using bdcdata mode 'a' update 's' messages into itbdcmsgcoll.
    if sy-subrc ne 0.
    append itxk01 into  itxk01-dup.
    endif.
    endloop.
    if not itxk01-dup[] is initial.
    refresh itck01.
    call bdc_open_group
    itxk01 = itxk01-dup.
    loop at itxk01.
    refresh itxk01.
    perform bdc-dynpr0 using 'prg' 'scr'
    perform bdc-dynfld using fnam fval
    call bdc-insert.
    endloop.
    call bdc-close-group.
    form bdc-dynpr0 using pr sc
    endform .
    form bdc-field  using fnam faval
    endform.
    this will help u.
    reward points for me
    kiran

  • How to add NI VI's in a executable and installer

    I have a working program made in Labview, but I have problems withy creating an executable and installer.
    The first thing I did was create a project, I have the Main program and under the Dependencies I have the Vi's and the VI.lib from labview 8.6 directory.
    I made an executable and after that an Installer. But when I run the installer version it's missing some Vi's.
    These Vi's arer mainly the VI's that come from the vi.lib from the LAbview 8.6 directory. Some how these Vi's aren't taken into the executable and installer.
    What am I doing wrong????
    Kind regards,
    Barry Bomer

    Hi Bomer,
    normally all vi's you need are automatically in the executable. Do you use some dynamic called vi's, maybe the report generation toolkit?
    Mike
    Message Edited by MikeS81 on 01-15-2009 09:27 AM

  • Tuxedo calls procedure and Application Level Service Failure

    hello ,professors all!
    My Tuxedo Service just call an procedure exists in oracle9i, i am sure that the procedure runs ok in oracle9i individually, when it was called by my tuxedo service , it is not ok by first time ,and runs out tp application level Service failure error .But strangely it is ok by second time!
    who can explan it to me and show me a way to solve the difficult problem?
    i spend a lot time wondering the answer!
    Edited by: user9086437 on 2010-9-29 下午9:57

    There are many possible reasons why a database procedure might fail the first time it is executed and succeed after that.
    You should check the Tuxedo ULOG and Oracle database logs for any messages that may point to the problem.
    If there is a LIBTUX_CAT:6205 or LIBTUX_CAT:6206 message in the userlog file then you need to add a tx_open() call to your server's tpsvrinit() or tpsvrthrinit() function.
    If there is an OPENINFO string for the group where your server is running then you are using XA transaction management and should not be connecting to the database in your application code; if there is not an OPENINFO string for the group where your server is running then you need to connect to the database in your application.
    If you set the environment variable
    TMTRACE=*:ulog:dye
    for the server where the failure is happening then Tuxedo will write a trace record of each Tuxedo call and each XA call to the ULOG file. This can be helpful in determining why the failure is happening on the first call, especially if Tuxedo is handling transaction management using XA.
    I hope some of this is of help in debugging the problem.
    Ed

  • Why do I get error -17500 when calling a batch file using the call executable step type?

    I am calling a batch file using the call executable step type. If the path to the batch file contains a space I get error -17500 and a message stating there was an error in "Post". For example the path to the batch file is "c:\TestWin\Test Files\...\Program.bat" When I run this I get the above mentioned error, however if I change my directory structure so the path is now "c:\TestWin\TestFiles\...\Program.bat" it runs fine. I use the browse feature to find my batch file so it is not me typing in a path incorrectly. I have removed the batch file and I get a different error stating that it couldn't find the file so it appears that for my error it can find the file but can't run it. I am
    sure that this has something to do with the fact that batch files are written in DOS but really don't want to resort to changing my directory structure on all my test stations. Is there any way to fix this problem so I can leave a space in my path?

    It appears I have figured it out. This was on another computer so I was unaware of how they used their computer. I like you got it to work in the temp directory and in fact got the program.bat file to work as long as I put it under the temp directory, but when I switched out to my TestWin directory it wouldn't work, so I removed everything from the directory except the batch file it self and it work. What I found out after adding files in one at a time is that the person had a file called "Test" with no file extension in there "c:\TestWin\" directory. Removing this file made it work. Putting the file back broke it. So it appeares that when teststand was running it followed the path saw a space and attempted to grab the "Test" file instead of bro
    wsing into the "Test Files" directory. If you create a file in your temp directory called "temp" with no file extension you will see the same problem. Thank you for your help.

  • *RUNLOGIC call executes sometimes, but not others

    Hi all,
    I hope someone has insight into this problem.
    I have 2 applications, Sales & CostCenter, that each feed data into a Consol app. In both Sales & CostCenter, I use *DESTINATION_APP (both in default logic, and in a batch-mode logic) to post the values to Consol. All of this works fine.
    I also need the currency conversion logic in Consol to be triggered automatically, every time there is an update. I use *RUNLOGIC to do this, as the last step of the update.
    // From CostCenter -- Run the Consol curr conv
    *RUNLOGIC
    *APP=CONSOL
    *LOGIC=CurrConvCostCenter
    *ENDRUNLOGIC
    // From Sales -- Run the Consol curr conv
    *RUNLOGIC
    *APP=CONSOL
    *LOGIC=CurrConvSales
    *ENDRUNLOGIC
    Both of the CurrConv* logic files exist in Consol (and are identical except for a slightly different XDIM_MEMBERSET selection, before *INCLUDE'ing the core CurrConv logic).
    There is only this one *RUNLOGIC command in either of the logics -- no nesting, no sequential execution.
    My problem: it works perfectly fine from CostCenter, but not from Sales.
    I can see in the CostCenter logic debug log the complete CurrConvCostCenter data selections. On the other hand, in the Sales logic debug log, the log ends with the posting of LC values to Consol.
    When I remove all the earlier steps from the Sales logic, I can see that the problem is related to the fact that Consol's entity dimension is called "Entity" and in Sales it is "EntitySls".
    --> "Invalid Dimension : EntitySls"
    I tried referencing the Entity dim as follows (as per the admin guide) -- didn't work.
    // From Sales -- Run the Consol curr conv
    *RUNLOGIC
    *APP=CONSOL
    *DIMENSION Entity = %ENTITY_SET%
    *LOGIC=CurrConvSales
    *ENDRUNLOGIC
    --> "Invalid Dimension : EntitySls"
    I also tried the following (based on the Destination_App syntax), hoping it was an undocumented savior -- didn't work.
    // From Sales -- Run the Consol curr conv
    *RUNLOGIC
    *APP=CONSOL
    *RENAME_DIM EntitySls=Entity
    *LOGIC=CurrConvSales
    *ENDRUNLOGIC
    --> "Invalid Instruction: *RENAME_DIM EntitySls=Entity"
    And I can confirm that both CostCenter & Consol use the same "Entity" dimension, so that's why it works in one case and not the other.
    Does anyone have a solution?
    Regards,
    Tim

    Thanks for the replies, guys.
    Joost, I tried a few more *DIMENSION options (both EntitySls and Entity) and none of these seem to work.
    Marcel, that workaround is certainly a creative approach! If it comes to that extreme, I may use this option. However, I did want to include this in the default logic of the Sales app. My other options are either to replace EntitySls with Entity (a pretty massive undertaking at this point -- it'd be nice if this limitation were documented in the admin guide...) or else have the users execute the logic manually as a batch process.
    In the meantime, I recreated this in ApShell & filed a message with Support.
    What was also odd about this is that, when the ONLY command in the logic file is the RUNLOGIC command, I get an error message about invalid dimension. But when there are other commands (such as *DESTINATION_APP to transfer data from sales to consol), those execute cleanly... and then there's no error message relating to the RUNLOGIC. So it was a bit of a challenge to identify the problem.
    I haven't tested this to see what other dimensions have this same limitation. My instict tells me it's only entity/category/time that need to have the same dimension names, but I'll certainly test that before I design another set of apps where I'll want to do this auto-synchronization.
    If anyone else has info on that point, I'd be grateful to hear more.
    Regards,
    Tim

  • Is it possible to call Distiller and Acrobat?

    Hey there again...
    Following my question in http://forums.adobe.com/thread/1449735?tstart=0 , I need to use the 2 PSs I've made, convert them to PDF and concatenate both of them in a single PDF file.
    What I need to know is:
    do I need to go to Applescript to invoque Distiller and Acrobat?
    Or is it possible in ExtensionScript to call Distiller and Acrobat to execute this?
    If it is possible to do it in ExtensionScript how may it could be done?
    Thanks again for the help!!

    No, you can’t do this in ExtensionScript. The only version where you can communicate with Acrobat from InDesign directly via ExtensionScriptis is InDesign 5.0.3, Acrobat 8.0.0 (tested in Windows XP SP3). Here is an example.
    But it is possible to trigger an Acrobat JS from AS. I guess you can print two ps-files to Distiller’s hot folder.
    Another script may monitor the hot folder on a certain interval, say, every minute: this can be done in AS. When the PDFs in the “Out” folder are ready, the Acrobat JS merges them saving it to another folder and deleting the original PDFs.

  • How to execute a system command with call executable in teststand 4.2.1?

    Hi All,
          how to execute a system command with "call executable" step in teststand 4.2.1?
          example as i want to quit a application.using "taskkill /f /im xxx.exe".And execute other system command(DOS).
    BR
    Johnny

    Hi, 
    I want to run netstat -an | find "8080" command from command prompt using call executable in test stand. after that i would like take the std output to local variable. 
    Attachments:
    callsettings.jpg ‏404 KB

Maybe you are looking for

  • Can iCloud on a Windows 7 PC be used with two different Apple accounts at the same time?

    Can iCloud on a Windows 7 PC support two different Apple accounts at the same time?

  • Moved iTunes from pc to iMac...now have missing file links!

    Hi all. Just bought a new iMac and want to transfer my iTunes library and music to it from my pc. On my pc I had all my music consolidated and organised by itunes, and I transferred the entire itunes folder (music, library, etc) to my iMac via an ext

  • AIRasterizeSuite- Rasterize and Overprint Preview

    Hi, I'm using the AIRasterizeSuite to obtain a raster of the entire document which matches what you see in Illustrator. This is working fine and produces an RGBA raster.  When I select View->Overprint Preview it changes what you see in Illustrator bu

  • How to pass datetype parameter in Sql Select Statements to

    public void Mountain()                String dat=lastcollecteddatestr.substring(0,2);                String mon=lastcollecteddatestr.substring(3,5);                String yr=lastcollecteddatestr.substring(6,10);                try                    

  • Why can't I open new tabs in firefox 4?

    I upgraded from firefox 3 to firefox 4 when it asked me to do so. The upgrade has not gone right - I have a mixture of the two versions, with the menu across the top as in 3 but the toolbar as in 4. There isn't a button to open a new tab (I can use c