Running a *.tcl script via an Expert
I'm trying to build a metadata promotion wizard/expert which will promote metadata from our Dev repository to our QA repository
In order to acheive this, we have created an exp_imp.tcl script which exports a collection from our Dev repository and imports it into QA our QA repository - this works fine if I run it via OMBPlus.bat. However, I would like to incorporate this within an OWB Expert - the problem we are experiencing is that the OMB+ task within the expert doesn't allow us to connect to a different repository (QA repos) without first disconnecting from the current repository (Dev repos) - if we do disconnect the expert will run through to completion, however, the expert window then hangs (presumably, because of the earlier disconnection)
Any help with this would be much appreciated.
Hi skifarm,
It sounds like this message may be more related to the TCL script than to LabVIEW. Could you put a simple command very early in the script that gives some output, to help you determine whether it's a LabVIEW issue? If the command provides the output, then it's probably not a LabVIEW issue. If it doesn't get that far, then that somewhat narrows it down.
Regards,
James R.
National Instruments
Similar Messages
-
Creating a job that runs a Tcl script
Hi,
We currently have a scheduled job running a Tcl script on a 8.1.7 DB. My question is, can I still use the same setup in 10g DB (i.e. creating a job that runs Tcl script)? If I can, how am I gonna do it?
Thanks,
howieIt depends on how you scheduled the job in 8.1.7 DB.
By Cronjob? Yes you can do the same to connect to 10g
By DBMS_JOB?. Yes you can do it in 10g and in addition, can improve it with DBMS_SCHEDULER
Via OEM? Yes in can use Enterprise Manager to create a Job that runs the Script. -
To run a tcl script in ombplus
how do i run a script in ombplus
when i give a command ompplus.bat test.tcl the script doesnt run.
it is given in a doc that in INTERACTIVE SHELL the SOURCE should be set as test.tcl
and then ombplus.bat test.tcl command should be given in the ombplus command line.
what is interactive shell in ombplus.
and how to run a tcl script in ombplus.What is in the script?
Try starting ombplus - you get cmd window and then type:
eg.
source c:/test.tcl
and so on... -
Running a TCL script through EEM every 60 seconds
I have a script written in the TCLSH of IOS, I can test this script from the shell using the following commands
LAB-RTR#tclsh
LAB-RTR(tcl)#source flash:test.tcl
NO CALLS
Is there a way I can run this test.tcl script every 60 seconds on the router.
SCRIPT test.tcl
proc get_ints {} {
set syslog [open "syslog:" w+]
#puts "BEFORE\n"
set check ""
set int_out [ exec "show voice call status\n" ]
#puts "INTOUT $int_out\n"
set mylist [regexp -nocase -line -inline {(^([0-9]*|No) active calls? found)} $int_out]
#puts "MYLIST $mylist\n"
foreach int $mylist {
#puts "INT $int\n"
if {$int == "No"} {
puts " NO CALLS\n";
puts $syslog "NO CALLS"
} elseif {[string is integer -strict $int]} {
puts "$int CALLS\n";
puts $syslog "$int CALLS"
} else {
#puts "GARBAGE\n";
close $syslog
#puts ""
puts [eval get_ints]Hey Joseph, Thanks for all your help. I have one last question, so now that I am running my script every 60 seconds if there is an issue I send multiple traps to our monitoring system. Is there any way you can keep track if the trap was already sent I will not send another trap again.
One way I can think of is using a loopback interface. But I would prefer not shutting down the loopback interface just to keep track of what my script is doing.
IF issue {
IF Loop1 is up {
don't send trap
} ELSE {
bring Loop1 up
Send Trap
} ELSE (No issue) {
shutdown Loop1 -
How do I run a shell script via AppleScript?
Seems obvious, "do shell script" but that doesn't work for me.
I have an Automator app which runs a shell script, I'd like to take that into an AppleScript. My AS doesn't run the shell script. Perhaps "do shell script' is expecting the script to be located elsewhere? The rest of my AS runs fine, but the shell script doesn't.
repeat with i from 1 to count of items in exportFolder
do shell script
"exiftool -overwrite_original -Photoshop:CopyrightFlag='True'"
done
end repeat
As I say this works within an Automator app, what changes do I need to make it work in AppleScript?
Thanks!Camelot wrote:
repeat with i from 1 to count of items in exportFolder
What is 'exportFolder'? Where is it defined?
Thanks, 'exportFolder' is defined earlier in the script. The purpose of the script - which is run from within Aperture - is to rename the selected images, export them (to the 'exportFolder'), reset the version name and, using ExifTool, add metadata which Aperture does not write to exported JPEGs.
I have a version of this which works in Automator but I couldn't see any clues there on setting the path to ExifTool.
Here's the full (modified) script. Currently it returns an error
Result:
error "No file specified" number 1
so I now need to understand if I can use 'exportFolder' (defined at the start) to tell Finder which folder to use.
-- Creating filenames by making Version Name from the IPTC Headline and Filename (with hypens where spaces exist). The Aperture Version Name is used to create the file's name on export. Once exported the Aperture Version Name is reset to its original.
tell application "System Events"
set exportFolder to (choose folder with prompt "Choose an export folder")
end tell
tell application "Aperture"
set theSel to (get selection)
if theSel is {} then
error "Please select an image or two!."
else
repeat with theImg in theSel
-- Creating a new Aperture Version Name which will become the exported file's filename.
tell theImg
set headline to (get value of IPTC tag "Headline" of theImg)
set AppleScript's text item delimiters to " "
set theTextItems to text items of headline
set AppleScript's text item delimiters to "-"
set headline to theTextItems as string
set AppleScript's text item delimiters to {""}
set objectName to (get value of IPTC tag "ObjectName" of theImg)
set newVersion to (headline & "-" & objectName) as string
set name of theImg to newVersion
end tell
end repeat
-- Exporting the files as JPEGs to chosen folder/Project Name using the Version Name as a filename
export theSel using export setting "JPEG - Original Size" to exportFolder
-- Resetting the Aperture Version Name back to filename using IPTC Title (which should be the file's filename without suffex).
repeat with theImg in theSel
tell theImg
set title to (get value of IPTC tag "ObjectName" of theImg)
set name of theImg to title
end tell
end repeat
end if
end tell
--Using ExifTool to set Photoshop Copyright Status etc
tell application "Finder" to set theFiles to files of exportFolder as alias list
repeat with eachFile in theFiles
do shell script "/usr/bin/exiftool -overwrite_original -Photoshop:CopyrightFlag='True' -Photoshop:URL='http://davidgordon.co.uk/'" & quoted form of POSIX path of eachFile
end repeat
display dialog "Done that!" with icon note buttons "OK" default button 1 giving up after 10 -
Running the deinstall script via SQLPlus
Hi folks,
There are plenty of examples in the forum of how to run the apex install scripts by reading the contents of APEX_APPLICATION_SUPP_OBJ_SCR. I can't find where the contents of the deinstallation script is stored. Has anyone discovered this?
I would like to be able run the deinstall script followed by all of the install scripts from a single SQL script to speed up development?
Any help appreciated.
Cheers
DaveI have somewhat of a similar process, where I asked on the ASP.NET forums, as I needed my users of an Intranet site to be able to have a script run with the click of the button. I was told that it was not possible, as the browser is built to not allow stuff
like this for security reasons.
I haven't heard of a plugin so maybe there are other ways, but what I actually had to do, was create a batch file, and than on my webpage I added an IFrame
<iframe id="myIframe" runat="server"></iframe>
Than either in the html markup you can set the src attribute (I did mine in the code behind), to the directory where the file is at, so for instance \\myserver\fileishere
Obviously the location needs to be shared and allow all users read/execute. This will display the file on the web page, and then the users, just double click it and it executes.
You can possibly have a batch file that calls powershell and the script, but the script will need to be downloaded to the users machine, so it may be easier to find a batch equivallent of your powershell script and use DOS commands
If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
Don't Retire Technet -
Running a Powershell script via IIS on client machine
Hello,
I have a Powershell script that I want to serve to clients that will access my site.
The script is simple - it will terminate Outlook and Communicator and restart in Cleanfreebusy mode.
Researching this has noted that there is an IIS plugin that will allow the running of Powershell scripts?
I would like to ask you, colleagues, is there a way I may be able to do this? That is to allow my clients run this Powershell script without downloading locally.
Many many thanks,I have somewhat of a similar process, where I asked on the ASP.NET forums, as I needed my users of an Intranet site to be able to have a script run with the click of the button. I was told that it was not possible, as the browser is built to not allow stuff
like this for security reasons.
I haven't heard of a plugin so maybe there are other ways, but what I actually had to do, was create a batch file, and than on my webpage I added an IFrame
<iframe id="myIframe" runat="server"></iframe>
Than either in the html markup you can set the src attribute (I did mine in the code behind), to the directory where the file is at, so for instance \\myserver\fileishere
Obviously the location needs to be shared and allow all users read/execute. This will display the file on the web page, and then the users, just double click it and it executes.
You can possibly have a batch file that calls powershell and the script, but the script will need to be downloaded to the users machine, so it may be easier to find a batch equivallent of your powershell script and use DOS commands
If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
Don't Retire Technet -
Runnig TCL script manually?
We are running a TCL script via a cron job with no issue, every 2 minutes and it working like a bomb.
When i try run the script manually via the event manager run xxx.tcl it say that it is not registered?
When i check the sh event manamger policy registed it says it is?
Any ideas?
Regards
NoelYou don't need kron or Tcl for this. You can use the built-in config archive feature of IOS:
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gtrollbk.html#wp1100253
If you do want to go the scheduled route with EEM, start a new thread for your issue. -
Embedded Event Manager - SNMP - run TCL script
I would like to run a tcl script on a router using snmp. I understand Embedded Event Manager can do this but haven't found what I need to run that. Can someone point me in the right direction?
Yeah, you could do this, but it depends on your version of IOS. You will need EEM 3.1 or higher (15.0) to be able to intercept SNMP GET requests. Then, you could do something like:
event manager applet snmp-trigger event snmp-object oid 1.9.9.9.9 type gauge sync yes istable no action 1.0 policy my_tcl_policy.tcl action 2.0 snmp-object-value event-id _event_id gauge 0 next-oid 1.9.9.9.9.0 action 3.0 exit 1!snmp-server manager
Then, when you query 1.9.9.9.9.0 on the device, the Tcl policy "my_tcl_policy.tcl" should execute, and the snmp-trigger applet policy will return a value of 0.
Please support CSC Helps Haiti
https://supportforums.cisco.com/docs/DOC-8895
https://supportforums.cisco.com -
Running tcl script in parallel with vi code
i need to run a tcl script from within a vi but i don't want to be blocked by tcl script. right now when i call tcl script within my vi using "system exec" vi, the rest of the code in my vi does not get executed until tcl script exits. i need to run tcl script in parallel.
an equivalent operation in unix can be done by running a script in background using &.
any ideas how to do it in labview.Go to your help menu and select Show Context Help. Move your mouse over the function. You'll now see the help for the function and you can read what the input called 'wait until completion? (T)' means.
-
Help with tcl script with labview
I am trying to run a program using tcl script via labview.
Currently I am using wish80 tcl to run it. And it works fine.
I tried using example I found on NI website called Run Tcl Script.vi
I will attach the vi and the tcl file. Hope someone will have a idea what I am doing wrong.
Thanks
please change the testpairs2.txt to testpairs2.tcl as it is not letting me attach as tcl.
Attachments:
Run Tcl Script1.vi 27 KB
testpairs2.txt 1 KBHi randyram,
try the referenced labview example with your parameters. I guess there are some changes on the OS. (actual OS with LV6.1 to XP) :-)
LabView Online Help:
"Refer to the Calling System Exec VI in the labview\examples\comm directory for an example of using the System Exec VI."
Mike -
Error while trying to add a SQL Script via DB02
Good Morning and happy Sysadmin day to everyone,
I have the following Problem regarding DB2 9.5
I'm trying to run a SQL Script via DB02 in an ERP 6.0 System.
I'm using DB02 -> Jobs -> SQL Script Maintenenace -> Add
Then there is a Textfield "Script Name". When i'm using the F4-Help I'm getting the following error Message:
List box value range for field DYN_SED-SCRIPT_NAME could not be created
Message no. DB6PM004
Any suggestions what might be the Error?
Thanks in Advance
MarcoAre you trying to create a new Model or trying to import a Model ?
-
Do I run a shell script (bsh) via PL/SQL stored procedure?
Hello guys,
Do I run a shell script (bsh) via PL/SQL stored procedure?
For example:
procedure X is
(variables)
begin
-- Read file data
vFileHandle := utl_file.fopen('/mnt/novell/', 'file.txt','r');
exception
when 'INVALID READ FILE' then
(I've to try running script to mount a Novell partition.);
end;
I've to installed Oracle 9.0.1 on Suse Linux.
Please, any ideas or hints ...
Thx and regards.You might be able to us the HOST command, I think you'd have to run it via dbms_sql, check this page for more details, not sure if it'll be of help but its worth a try..
http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a82950/ch8.htm
Cheers
Rob -
How to run .tcl scripts with VTK?
I have a bunch of .tcl scripts that use VTK. How do I run them? I have tcl/tk/vtk installed, but when I try to run `tclsh script.tcl` it outputs errors about VTK. On other distros i saw a binary named `vtk` that could run .tcl scripts out of the box. Is there something like this on Arch?
Thanks.Hi, vtk is in community. It should supply the tcl bindings. I once was the maintainer when it was in AUR. It works here with the tcl examples that come with the vtk package. Have not tested the version in community yet.
-
Tcl proc with input argument run from UNIX script...how
Environment:
OWB 10g Client on Windows XP Professional
Repository - 9.2.0.4 on UNIX (AIX 5.2)
Target - 9.2.0.4 on UNIX (AIX 5.2)
I need a little tcl advice, please!
I have a tcl script (proc, I guess) that takes one argument, in this case a mapping name.
I would like to execute this tcl script from a UNIX shell script and pass the name of the mapping as an argument to the UNIX shell script. Something like:
OMBPlus.sh omb_deploy.tcl $1
where omb_deploy.tcl is the script that has all the OMBPlus commands in it to create the deployment plan and execute it.
I'd like to pass the mapping name as a command line argument to the UNIX shell script but it doesn't like it.
When I execute the script as above, I don't see any output and the mapping does not get deployed.
So, I need a little help on two (2) issues:
1- How do I generate a log file of the output of the tcl script?
2- How do I pass the mapping name as an argument to the UNIX shell script?
For #1 I have tried using the 'open logfilename w' at the top of the tcl script but it produces no output.
I saw another example from this forum where the author used a 'putslog' command in the script. I can't find any documentation on that command, what does it do?
That same script set a global OMBLOG variable at the top of the script and used the 'putslog' command in the body.
Is OMBLOG some special reserved word for logging? I couldn't find anything on it.
I'm trying to learn tcl but struggling to put all the tcl stuff together with all the OMBPlus stuff and make it all work is getting the best of me.
Any assistance, with examples (I learn best from them), is greatly appreciated.
GaryWell duh!
I ended up just logging everything from the UNIX shell script and letting the tcl script write everything to stdout.
I also finally found the $argv parameter and have used that to pick up the name of the mapping being passed to OMBPlus.
It seems to be working so far.
Gary
Maybe you are looking for
-
Trigger Problem, need help in 8i
SQL> Create table a (sno char(3), kkk varchar2(30)); SQL> Create or replace trigger T$a before insert on a for each row begin if :new.sno = 'FFF' then select nvl(max(sno),0)+1 into :new.sno from a; end; SQL> insert into a select 'FFF', cont_no from g
-
Bad Stats on threads for unanswered questions
There seems to be a bug in the thread view for unanswered questions that says This question is not answered. Helpful answers available: 5. Correct answers available: 1. for any unanswered questions. The 5 and 1 numbers are fixed text and never change
-
Is there a way to know how many minutes left from ...
Is there a way to know how many minutes left from your subscription from the Skype phone app?? Thanks!
-
Storage clause for locally manged tablespace with unifom size extents
in oracle 9i PERSONAL EDITION I HAVE CREATED A TABLESPACE TEST1 AS LOCALLY MANAGED WITH UNIFORM SIZE AS 256K.MY DB_BLOCK_SIZE IS 4K I HAVE CREATED A TABLE XYX IN THE TEST1 TABLESPACE WITH THE STORAGE (INITIAL 52K NEXT 52K) WHEN I QUERIED THE DBA_EXTE
-
Inserting Queries(3.1 version)
Hi, I want to insert 4 queries into workbook , i dont want to insert full query just wanted to insert one value field from all the queries in header . is that possible , if yes please tell me how to do it in 3.1 version i would appriciate your help T