Register and unregister locations using ombplus script

hi
how to register and unregister the locations using ombplus scripts.
any help would be appreciated.
thanks,
Keka

The deployment script I have posted previously to copy a project mdl over to a new repository for local deployment includes creating a control center, making it the default for your project, creating the locations, assigning them to the control center, and registering them.
Re: importing mappings using OMBPLUS
To unregister a location, first you want to undeploy anything deployed from it to avoid dangling references int he repository, and then unregister the location.
I do that in the following drop_project script that we use to delete an old copy of the project before importing the new version.
#get db connection info
source c:\\omb\\owb_config.tcl
#get standard library
source c:\\omb\\omb_library.tcl
# PVCS Version Information
#/* $Workfile:   ers_owb_drop_project.tcl  $ $Revision:   2.1  $ */
#/* $Author:   michael.broughton  $
#/* $Date:   03 Apr 2008 13:43:02  $ */
#  Connect to repos
# Commit anything from previous work, otherwise OMBDISCONNECT will fail out.
exec_omb OMBCOMMIT
# If already connected, disconnect first.
set print [exec_omb OMBDISCONNECT]
  # Test if message is "OMB01001: Not connected to repository." or "Disconnected."
  # any other message is a showstopper!
if [string match Disconn* $print ]  {
   log_msg LOG "Success Disconnecting from previous repository...."
} else {
   # We expect an OMB01001 error for trying to disconnect when not connected
   if [string match OMB01001* $print ] {
      log_msg LOG "Disconnect unneccessary. Not currently connected...."
   } else {
      log_msg ERROR "Error Disconnecting from previous repository....Exiting process."
      log_msg ERROR "$print"
      #exit
set print [exec_omb OMBCONNECT $OWB_DEG_USER/$OWB_DEG_PASS@$OWB_DEG_HOST:$OWB_DEG_PORT:$OWB_DEG_SRVC USE REPOSITORY '$OWB_DEG_REPOS']
if [omb_error $print] {
    log_msg ERROR "Unable to connect to repository."
    log_msg ERROR "$print" "1"
    log_msg ERROR "Exiting Script.............."
    return
} else {
    log_msg LOG "Connected to Repository"   
return
# Connect to project
set print [exec_omb OMBCC '$PROJECT_TO_DROP_NAME']
if [omb_error $print] {
   log_msg LOG "Project $PROJECT_TO_DROP_NAME does not exist. No Cleanup Required...."
   exec_omb OMBDISCONNECT CONTROL_CENTER
   exec_omb OMBDISCONNECT
   return
} else {
   log_msg LOG "Verified project $PROJECT_TO_DROP_NAME exists"
   exec_omb OMBCC '..'
# Exporting MDL Backup of Project
set print [exec_omb OMBEXPORT TO MDL_FILE '$EXPORT_FILE_PATH/$EXPORT_FILE_NAME' FROM PROJECT NAMES '$PROJECT_TO_DROP_NAME' OUTPUT LOG TO '$EXPORT_LOG_PATH/$EXPORT_LOG_NAME' ]
if [omb_error $print] {
   #We expect to get warnings due to differences in Control center names etc,
   if {[string match OMB05105* $print]} {
      log_msg LOG "MDL File $EXPORT_FILE_NAME exported with warnings"
   } else {
       log_msg ERROR "Unable to import $EXPORT_FILE_PATH/$EXPORT_FILE_NAME. "
       log_msg ERROR "$print"
       log_msg ERROR "Exiting Script.............."
       exec_omb OMBROLLBACK
       return
} else {
   log_msg LOG "MDL File $EXPORT_FILE_NAME exported with no warnings.............."
exec_omb OMBCOMMIT
# Validate to Control Center
set lst [OMBLIST CONTROL_CENTERS]
if [string match *$CONTROL_CENTER_NAME* lst] {
   log_msg LOG "Verify Control Center $CONTROL_CENTER_NAME Exists."
   log_msg LOG "Setting Passwords to enable de-registration"
   log_msg LOG "Connecting to Control Center $CONTROL_CENTER_NAME"
   set print [exec_omb OMBCONNECT CONTROL_CENTER USE '$DATA_LOCATION_PASS' ]
   if [omb_error $print] {
      log_msg ERROR "Unable to connect to Control Center $CONTROL_CENTER_NAME"
      log_msg ERROR "$print"
      log_msg ERROR "Exiting Script.............."
      exec_omb OMBROLLBACK
      return
   exec_omb OMBCOMMIT
   log_msg LOG "Deleting Existing Mappings."
   set print [exec_omb OMBALTER LOCATION '$DATA_LOCATION_NAME' SET PROPERTIES (PASSWORD) VALUES ('$DATA_LOCATION_PASS')]
   exec_omb OMBCOMMIT
   exec_omb OMBCC '$ORA_MODULE_NAME'
   set mapList [ OMBLIST MAPPINGS ]
   foreach mapName $mapList {
      log_msg LOG "Un-Deploying: $mapName"
      set print [ exec_omb OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('DROP') SET REFERENCE MAPPING '$mapName' ]
      if [omb_error $print] {
         exit_failure "Unable to create Deployment plan for '$mapName'"
      set print [ exec_omb OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ]
      if [omb_error $print] {
         exit_failure "Error on execute of Deployment plan for '$mapName'"
      exec_omb OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
      exec_omb OMBCOMMIT
  exec_omb OMBCC '..'
  exec_omb OMBCC '..'
   log_msg LOG "Un-Registering Code Location."
   set print [exec_omb OMBUNREGISTER LOCATION '$DATA_LOCATION_NAME']
   if [omb_error $print] {
      log_msg ERROR "Unable to register Location $DATA_LOCATION_NAME"
      log_msg ERROR "$print"
      log_msg ERROR "Exiting Script.............."
      exec_omb OMBROLLBACK
      return
   exec_omb OMBCOMMIT
} else {
   log_msg LOG "Control Center $CONTROL_CENTER_NAME does not exist - unable to de-register locations."
# Dropping project
exec_omb OMBDISCONNECT CONTROL_CENTER
log_msg LOG "Renaming project $PROJECT_TO_DROP_NAME to $PROJECT_TO_DROP_NEWNAME ...."
set print [exec_omb OMBALTER PROJECT '$PROJECT_TO_DROP_NAME' RENAME TO '$PROJECT_TO_DROP_NEWNAME']
if [omb_error $print] {
   log_msg LOG "Failed to drop project $PROJECT_TO_DROP_NAME...."
   log_msg ERROR "$print"
   log_msg ERROR "Exiting Script.............."
exec_omb OMBDISCONNECTThis script uses the same config and library file given in the other post that I pointed you towards. That is where you will find the definition for exec_omb, for example which is simply a wrapper for OMB+ calls
Now, note that I don't un-deploy any tables, views, sequences etc. We use Designer as our location of record for the data model metadata so our OWB project never deploys any object metadata except for mappings. Your setup may be different, still this should point you in the right direction.
Cheers,
Mike

Similar Messages

  • PO for item of service Level short and long text using sap script

    Please let me know how to do the PO for item of service Level short and long text using sap script.
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on May 5, 2009 10:25 AM

    Hi ,
          In the transaction related to PO select the path goto->header texts and then details of the texts like ID,objectname,language,name.Pass all theses details to 'READ_TEXT '   FM. Then you will get text lines described for a perticular Po ,similarly for item also.
    Thanks,
    Suma.

  • Register and unregister logfiles

    Hi @all
    i have done a system copy with copy and paste the required files from on server to an second. To create an central instance I have start the sapinst with properties from a systemcopy (maxdb) He create an Database Instance with a wrong the wrong log and datafiles How register and unregister I the data and logfiles to start the database without the 9050 Error (cannot access File)
    KG
    Martin

    Hi Lars,
    and thx for your helpfully answer.
    KG
    Martin

  • How to register and unregister Mbean server when jvm is crashed.

    Hi All,
    how to register and unregister Mbean server when jvm is crashed with specifying like internal error(xxxxxxxxxxxsome number)
    I am getting error NameAlreadyBindExcetion when i call the below method in my program, how to unregister and register again, can any one can help on this topic?
    internalConnectorService.start();
    regards
    Prasad.Nadendla

    Looks like your server object is already bound and registered and your trying to re-register the same...
    is that a corba server? if yes, you'd be able to check that with the NamingService tools

  • How to capture an image and save it using action script

    Hello,
    I need to know if is posible to capture an image or a screen region and save it using action scrip.
    Somebody know how to do it ??
    Thanks

    you can capture an image using the bitmapdata class and getPixel().  you can then save that to a bitmap using server-side code like php.

  • Implementing hierarchy in a dimension using OMBPLUS script

    Hi all,
    I am trying to create a dimension with two levels using TCL scripts.
    The first level is 'CHIP' which roll up to 'TOTAL'.
    I'd like to know how I can implement the hierarchy between the two levels.
    It would be great if any of you can help me with the syntax to implement the hierarchy.
    Thanks,
    Anoop

    Hi Anoop
    To add levels use SET REF LEVELS on the hierarchy, for example on dimension DIMX, hierarchy STANDARD;
    OMBALTER DIMENSION 'DIMX' MODIFY HIERARCHY 'STANDARD' SET REF LEVELS ('TOTPROD','CATEGORY', 'PRODUCT')
    Cheers
    David

  • Planning Appl not able to register and unregister with shared services

    Hi All,
    I created a planning application before that I created a datasource. After crearting an application I got an error as Application  not able to register with shared services .
    And also I am facing one more issue that is if I delete any particular planning application at that time I got an error as Application  not able to unregister with shared services.
    I am able to open the planning application through http://<planningmachine>:8300/HyperionPlanning/AppWizard.jsp and its working fine. I am able to open the Shared Services though Workspace but I am not able to find the option for planning application.
    Kindly guide me how to overcome it.
    Thanks and Regards
    ChiDam

    Have you checked the logs? Found something?
    This normally happens when there is issue with Planning app and cluster mapping. For some reason, the application maps to non-existent cluster in Planning system schema resulting in failure of HSS registration. you can manually re associate the cluster using configuration tool and try registering again.
    Cheers..!!

  • To find the Biztalk Active and Dehydrated instances using powershell script

    Hi,
    Has anyone has the power shell script to finf the number of active and dehydrated instances in Biztalk?

    Hi Sujith,
    Following Powershell script would get you the count of Active and Dehydrated instances:
    $a=Get-WmiObject -Class "MSBTS_ServiceInstance" -Namespace 'root\MicrosoftBizTalkServer' | Where-Object { $_.Item -match "$Name" -and $_.Item -ne "" -and ($_.ServiceStatus -eq "1" -or $_.ServiceStatus -eq "2" -or $_.ServiceStatus -eq "8" ) } | measure
    $a.Count
    Here ServiceStatus values for
    "Active" instance is 2 and “Dehydrated”instances is
    8 (and 1 for "Ready to Run" which might help you since you're interested in active instance count)
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Deploying mappings by changing Source/production system using OMB Scripting

    Hi Mark,
    I am now trying to deploy my mappings from DEVELOPMENT environment to PRODUCTION environment.
    Now my mappings are point to DEVELOPMENT Source System and DEVELOPMENT target system. When I deploy these mappings should point to PRODUCTION Source System and PRODUCTION target System.
    I could get some help from the forum for deploying the mappings point to PRODUCTION target system, but I couldnt find any help how to change the Source System Location. I have exported all my mappings (.xml files) in the C:\OWBDeploy directory.
    How do we register and unregister a location using OMB Scripting?
    How to write a batch deployment action without using deployment manager?
    Provide a example to deploy the mappings using OMB script
    for both source and target systems locations.
    I am using Oracle 9.2, OWB 9.2.0.2.8, OWF 2.6 and OMB 9.2.0.2.8.
    Regards,
    Shreedhar

    Below script will deploy all the mappings in a module. It can be used with filter condition like mappings which start with ‘M_D’ or ‘M_F’ also. Above script will deploy mappings very effectively comparing with GUI. Frequent problem in OWB mapping execution ‘ TASK not found’ error will not occur, if we deploy the mappings using above scripts.
    Steps to Deploy All Mappings in a Module
    Start the OMB PLUS from Command Prompt or Start Menu
    Change the context to the respective Project
    Connect to Design Repository
    Register the Location Properties if the deployment is happening first time in the target schema.
    Change the context to the respective Module
    Use foreach and OWBCREATE command to create a Deployment Plan for Droping if any previous deployment for all mappings
    Use foreach and OWBCREATE command to create a Deployment Plan for Newly Deploying the Mapping
    Use foreach and OWBDEPLOY command to run the Drop Deployment Plan
    Commit
    Use for each and OWBDEPLOY command to run the Create Deployment Plan
    Example
    OMBCONNECT mis_owb904_rep/[email protected]:1521:ulyut03s
    OMBCC '/IGMS_MIS_GEMNCAP_FOC'
    OMBCONNECT RUNTIME 'ST_DWH_RUNTIME_FOC' USE PASSWORD ‘MIS_RT_OWNER’
    OMBREGISTER LOCATION 'ST_LOC_CURRENTMISTARGET_FOC' SET PROPERTIES (Host, Port, Service, Schema, Password) \
    VALUES ('10.202.148.176', 1521, 'ULYUT01M','MIS_OWNER', 'MANAGER')
    OMBCC '/IGMS_MIS_GEMNCAP_FOC/CURRENTMISTARGET'
    foreach mappingname [OMBLIST MAPPINGS] {
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$mappingname.DROP' ADD ACTION '$mappingname.DROP' \
    SET PROPERTIES (OPERATION) VALUES ('DROP') SET REFERENCE MAPPING \
    '/IGMS_MIS_GEMNCAP_FOC/CURRENTMISTARGET/$mappingname';}
    foreach mappingname [OMBLIST MAPPINGS] {
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$mappingname.DROP'
    OMBCOMMIT;}
    foreach mappingname [OMBLIST MAPPINGS] {
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$mappingname.CREATE' ADD ACTION '$mappingname.CREATE' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') SET REFERENCE MAPPING \
    '/IGMS_MIS_GEMNCAP_FOC/CURRENTMISTARGET/$mappingname';}
    foreach mappingname [OMBLIST MAPPINGS] {
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$mappingname.CREATE'
    OMBCOMMIT;}

  • Interactive selection using photoshop script

    How to make a script pause till the user makes a selection and continue again using photoshop script?

    You can use two Scripts or one Script that, depending on some predetermined factor, performs two different tasks.
    So you could for example write something into the metadata, a channel, a txt file, … when a Script is run and that information is absent, and if it isn’t have the Script perform something else and remove that again.
    Edit: You probably could also set up the Script Events Manager to check for something on any Selection change and have it run a Script depending on that but I doubt that’s a good idea.

  • Deploy application using ant script vs shell script

    Hi,
    I work with OAS 10.1.2 and I'm using shell script with dcmctl command to deploy EAR into OC4J but I know that ant script do the same things. I want to know if my choice is good or is it better to use ant script ?
    Regards

    This is difficult to decide.
    When you have just a few ear files you deploy once in a while a shell script might be sufficient. When developing more complex systems you should use ant as this is easier to maintain.
    cu
    Andreas

  • How to modify an EXTERNAL_TABLE and MAPPING using OMBplus

    I need to implement a QA--> Production migration technique using OMB+ scripting. We are using source safe for keeping the MDL files.
    As we have insufficient resources both environments are in the same database as different schemas. Configuration is as below;
    Source Schema: DWPROD_TST (test) and DWPROD (production)
    Target Schema: DWEXTRACT_TST (test) and DWEXTRACT (production)
    Source Flat File Module: DWEXTRACT_TST_INPUT (test) and DWEXTRACT_INPUT (production)
    Target Flat File Module: DWEXTRACT_TST_OUTPUT (test) and DWEXTRACT_OUTPUT (production)
    All schemas have their own locations and modules defined. Once a mapping is create in TST environment developers should check in the individual
    mdl files for the object they used for development. From is point the strategy I have follow is like below as I haven't seen a similar scenario before.
    I rename the mdl extensiton .zip. I unzip the file. I take the mdx file extracted and make a text based search/replace for all the test environment modules, locations... etc
    replacing them with production environment names. Then I run the OMB+ script below in order to import and deploy this object. This technique works for table and flat file object
    with slightly different OMB+ scripts. But I can not make it work for external tables and mappings and the reason that I can guess is the Configuration information of the Data File used
    as source for external table and target for the mapping I have developed. I can import the MDX successfully but cant deploy it. When i rigt click the mapping or the external file in OWB GUI
    and click on CONFIGURATION I can see that:
    For the MAPPING : Flat File Operator/(OperatorName)/Target Data File Location is still pointing to TEST environment even tough I have replaced all the TEST environment information with PRODUCTION.
    For the EXTERNAL_TABLE : Data File/(OperatorName)/Data File Location is still pointing to TEST environment even tough I have replaced all the TEST environment information with PRODUCTION.
    Is there any way to modify these LOCATION information for a MAPPING and an EXTERNAL TABLE OMB+. I read though all OWB+ scripting Reference but it sucks or I am so dumb.
    Or if you have an alternative solution for my problem I will be more then happy to read it.
    OMB+ Script for EXTERNAL_TABLE
    OMBCONNECT DWPROD/DWPROD@cakir:1521:orcl USE REPOSITORY 'OWBDB_SYS'
    OMBIMPORT MDL_FILE 'C:\\tfs\\stage\\externaltables\\XTRCT_XTRNL_INPUT_FILE\\XTRCT_XTRNL_INPUT_FILE.mdx' USE UPDATE_MODE MATCH_BY NAMES OUTPUT LOG TO 'C:\\tfs\\stage\\externaltables\\XTRCT_XTRNL_INPUT_FILE\\XTRCT_XTRNL_INPUT_FILE.log'
    OMBCC 'MY_PROJECT'
    OMBCONNECT CONTROL_CENTER
    OMBCOMMIT
    OMBALTER LOCATION 'XTRCT_DWEXTRACT_LOC' SET PROPERTIES (PASSWORD) VALUES ('PASSWORD')
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' ADD REFERENCE LOCATION 'XTRCT_DWEXTRACT_LOC' SET AS DEFAULT
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' SET PROPERTIES (DB_LOCATION) VALUES ('XTRCT_DWEXTRACT_LOC')
    OMBCOMMIT
    OMBREGISTER LOCATION 'XTRCT_DWEXTRACT_LOC'
    OMBCOMMIT
    OMBREGISTER LOCATION 'DWEXTRACT_INPUT'
    OMBCOMMIT
    OMBCC 'XTRCT_DWEXTRACT'
    OMBALTER EXTERNAL_TABLE 'XTRCT_XTRNL_INPUT_FILE' SET REFERENCE DEFAULT_LOCATION 'DWEXTRACT_INPUT'
    OMBCOMMIT
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'TABLE_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE EXTERNAL_TABLE 'XTRCT_XTRNL_INPUT_FILE'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
    OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
    OMBCOMMIT
    OMBDISCONNECT
    OMB+ Script for the mapping
    OMBCONNECT DWPROD/DWPROD@cakir:1521:orcl USE REPOSITORY 'OWBDB_SYS'
    OMBIMPORT MDL_FILE 'C:\\tfs\\stage\\mappings\\XTRCT_PROTOTYPE_XTRCTFILE_000\\XTRCT_PROTOTYPE_XTRCTFILE_000.mdx' USE UPDATE_MODE MATCH_BY NAMES OUTPUT LOG TO 'C:\\tfs\\stage\\mappings\\XTRCT_PROTOTYPE_XTRCTFILE_000\\XTRCT_PROTOTYPE_XTRCTFILE_000.log'
    OMBCC 'MY_PROJECT'
    OMBCONNECT CONTROL_CENTER
    OMBCOMMIT
    OMBALTER LOCATION 'XTRCT_DWEXTRACT_LOC' SET PROPERTIES (PASSWORD) VALUES ('PASSWORD')
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' ADD REFERENCE LOCATION 'XTRCT_DWEXTRACT_LOC' SET AS DEFAULT
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' SET PROPERTIES (DB_LOCATION) VALUES ('XTRCT_DWEXTRACT_LOC')
    OMBCOMMIT
    OMBALTER LOCATION 'XTRCT_DWPROD_LOC' SET PROPERTIES (PASSWORD) VALUES ('PASSWORD')
    OMBALTER ORACLE_MODULE 'XTRCT_DWPROD' ADD REFERENCE LOCATION 'XTRCT_DWPROD_LOC' SET AS DEFAULT
    OMBALTER ORACLE_MODULE 'XTRCT_DWPROD' SET PROPERTIES (DB_LOCATION) VALUES ('XTRCT_DWPROD_LOC')
    OMBCOMMIT
    OMBREGISTER LOCATION 'XTRCT_DWEXTRACT_LOC'
    OMBCOMMIT
    OMBREGISTER LOCATION 'XTRCT_DWPROD_LOC'
    OMBCOMMIT
    OMBREGISTER LOCATION 'DWEXTRACT_INPUT'
    OMBCOMMIT
    OMBREGISTER LOCATION 'DWEXTRACT_OUTPUT'
    OMBCOMMIT
    OMBCC 'XTRCT_DWEXTRACT'
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('CREATE') SET REFERENCE MAPPING 'XTRCT_PROTOTYPE_XTRCTFILE_000'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
    OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
    OMBCOMMIT
    OMBDISCONNECT
    Kind Regards,
    Emrah
    Edited by: cakire82 on Jul 29, 2009 12:57 PM

    If it helps, this is a chunk from a script I have which turned off the parallel loading hint on all targets in a given mapping which was required after we discovered that ANSI cross joins and parallel query do NOT work very well in Oracle 10.
    You can see that I OMBRETREIVE all table operators and then use a foreach loop to cycle through them.
    log_msg LOG  "Altering: $mapName"
    set tablist [OMBRETRIEVE MAPPING '$mapName' GET TABLE OPERATORS ]
    foreach tgt_tble $tablist {
        if [catch { set retstr [ OMBALTER MAPPING '$mapName' MODIFY OPERATOR    '$tgt_tble' SET PROPERTIES (LOADING_HINT) VALUES ('NOPARALLEL ("$mapName")')] } errmsg] {
            log_msg ERROR "Unable to set hint for table $tgt_tble of mapping $mapName "
            log_msg ERROR "$errmsg"
        } else {
            set print [ exec_omb OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('CREATE') SET REFERENCE MAPPING '$mapName' ]
            if [omb_error $print] {
                 log_msg ERROR "Unable to create Deployment plan for '$mapName'"
            } else {
                  set print [ exec_omb OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ]
                  if [omb_error $print] {
                      log_msg ERROR "Error on execute of Deployment plan for '$mapName'"
            OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
            OMBCOMMIT
    }Ignore the exec_omb function as this is just a wrapper I built for OMB+ commands.
    As to passing parameters, look into argc and argv:
    if { $argc > 0 } {
         set i 1
         foreach arg $argv {
              puts "argument $i is $arg"
              incr i
      } else {
         puts "no command line argument passed"
      }You can also write interactive scripts if you prefer too. From earlier in the script above which turned off the parallel hint:
    puts ""
    puts -nonewline "Which mapping do you want to set to NOPARALLEL? "
    set mapName [gets stdin]I've even done loops to allow the user to perform the operation on multiple mappings, and to use pattern matching to determine which mappings to alter:
    set doLoop "1"
    while { [string match "1" $doLoop] } {
        puts -nonewline "What mapping to reconfigure (use name of generated plsql package)? "
        flush stdout
        set mapName [ string toupper [gets stdin] ]
        puts -nonewline "What value do you want to set as the maximum allowed errors? "
        flush stdout
        set eValue [gets stdin]
        set mapList [OMBLIST MAPPINGS '.*$mapName.*']
        if { [llength $mapList] == 0 } {
           log_msg ERROR "No mappings matching search string $mapName"
        } else {
            foreach mName $mapList {
                 puts -nonewline "Update mapping $mName (y/n)? "
                 flush stdout
                 set doThisUpdate [string toupper [gets stdin]]
                if { [string match "Y" $doThisUpdate ] } {
                    if [catch { set retstr [ OMBALTER MAPPING '$mName' SET PROPERTIES (MAXIMUM_NUMBER_OF_ERRORS) VALUES ( '$eValue')] } errmsg] {
                        log_msg ERROR "Unable to modify max errors on Mapping $mName"
                        log_msg ERROR "$errmsg"
                    } else {
                        set print [ exec_omb OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('CREATE') SET REFERENCE MAPPING '$mName' ]
                        if [omb_error $print] {
                            log_msg ERROR "Unable to create Deployment plan for '$mName'"
                        } else {
                            set print [ exec_omb OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ]
                            if [omb_error $print] {
                                log_msg ERROR "Error on execute of Deployment plan for '$mName'"
                        exec_omb OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
                        exec_omb OMBCOMMIT
                } else {
                    log_msg LOG "Skipping update to mapping $mName"
        puts -nonewline "Do Another? (y/n) "
        flush stdout
        set doAnother [gets stdin]
        if { [string match "Y" [string toupper $doAnother] ] } {
            log_msg LOG "User requests more updates"
        } else {
            set doLoop "0"
    }Anyway - there is lots that you can do to parameterize script or make them interactive. Just spend a bit of time working through a couple of TCL tutorials and you'll be well on your way.
    +(Note: script chunks have been edited for clarity of the main point I wanted to illustrate and may contain missmatched braces or other syntax problems.)+

  • Using Office 2013 group policy template to define Trusted Locations and Template Locations doesn't work

    User Configuration/Policies/Administrative Templates
    - Using Office 2013 group policy template to define Trusted Locations and Template Locations doesn't work
    Microsoft Word 2013/Word Options/Security/Trust Center/Trusted Locations
    - Allow Trusted Locations on the network: 
    Enabled 
    - Trusted Location #1: 
    Enabled 
    Path:  //server/sharedfoldername   [Edit:  Path:
    \\server\sharedfoldername]
    Date: June 10, 2013
    Description: Trusted Location
    Allow sub folders: Enabled
    The policy appears to apply to the client correctly by adding the following registry key and values:
    HKEY_CURRENT_USER\Software\Policies\Microsoft\office\15.0\word\security\trusted locations\location1
    allowsubfolders: 1
    date: June 10, 2013
    Description: Trusted Location
    Path:  //server/sharedfoldername  [Edit: Path: 
    \\server\sharedfoldername]
    However, when you open Word Options/Trust Centre/Trust Centre Settings…/Trusted Locations
    There are no trusted locations listed under ‘Policy Locations’
    I have tried setting similar settings for setting the Shared Templates folder location and just like the trusted locations policy, the registry keys are created properly in HKEY_CURRENT_USER\Software\Policies however word doesn’t
    seem to recognize these either.
    This used to work flawlessly using the administrative templates for Word 2007 and 2010. Has anyone been able to get these policies to apply successfully, or know why office doesn’t recognize these settings from the Policies registry
    Key?

    This would have been an easy solution to the issue.  Unfortunately it isn't the problem.  This question was originally posted on another Microsoft site and
    was transferred here and when it was transferred the path's changed from the original post: 
    \\server\sharedfodlername to //server/sharedfoldername.  (I will edit the question to show up as it did in the original post) Not sure how that happened.  This
    is still an issue that I haven't been able to get working correctly.
    As it turns out the 'New from Template' interface Word 2013 has developed is very bulky with large thumbnails and is not very customizable nor practical for an office
    that has a large number of templates.   Because I am unsatisfied with the display and performance of the 'New' template chooser I sought after a solution to change the way word creates a document from a template in another thread: 
    http://answers.microsoft.com/en-us/office/forum/office_2013_release-word/how-can-you-change-the-display-of-templates-in/d49194b9-a6b4-4768-8502-7d7b50e9dd65 working through this issue with Jay we were able to develop
    some VB script with handles a very large number of templates in a list view and it works much faster than the built-in Word interface.  The above thread is how I've worked around trying to define a shared template location and I am quite happy with it.

  • TS3376 I had my iphone set up to be tracked as registered with iCloud and it had been using it for a year one day it said no devices registered and stopped working why???

    I had my iphone set up to be tracked as registered with iCloud and it had been using it for a year today it said no devices registered and stopped working even though i tracked the selected iphone 4 device an hour earlier why did it do this???

    So basically the phone I was tracking was working an hour earlier it had no signal at times when it did pick up a signal it located it easily but an hour later the message came up no devices registered when my friend returned home I Checked the device I was tracking to make sure find my iphone was on but it was off and my friend didnt turn it off so my question is why did it turn itself off???
    Confused?

  • How we can import and run the matlab codes in labview using xmath script.

    hello,
    i have some GUI code in MATLAB and i want to process that codes in labview . tell me about the procedure how we can done this task.
    thanks in advance
    rachana
    Er. (Instrumentation)

    Hello,
    The title of your post asks about using Xmath script.  Is this what you intended?  You can use the Xmath script node in LabVIEW if you have MATRIXx 7.x or earlier installed.  However, the syntax is slightly different from the syntax of The MathWorks, Inc. MATLAB® software.
    In LabVIEW 8.0, we introduced LabVIEW MathScript.  The LabVIEW MathScript syntax is similar to the MATLAB language syntax.  In LabVIEW MathScript, you generally can execute scripts written in the MATLAB language syntax.  However, the MathScript engine executes the scripts, and the MathScript engine does not support some functions that the MATLAB software supports.  In order to reuse code that you have written, open the MathScript Window by going to Tools >> MathScript Window.  You can also use the MathScript node as part of a VI you are writing.  You can find the node on the Programming >> Structures palette.  You can import an existing script by right-clicking the node and selecting "Import..."  You can create inputs and outputs for the script by right-clicking on the node and selecting the appropriate option.  If you wish to call any functions you have written, put them in the MathScript search path.  By default, this is your "My Documents\LabVIEW Data" folder.  In LabVIEW 8.5, you can change the default search path for the main application instance by going to Tools >> Options.
    LabVIEW MathScript does not contain very many GUI functions at this time.  You can use the VI's front panel as your GUI, though, and interact with your program that way.  Let me know if you have other questions about moving your code or about specific functions.
    MATLAB® is a registered trademark of The MathWorks, Inc.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

Maybe you are looking for

  • Images not showing up in Spry Data Set

    I'm hoping someone can help an amateur. I'm trying to use an xml file to display with Spry (Stacked containers with Spotlight, specifically). It a simple parts list, where there would be an image next to a stacked description/part#. The data shows up

  • Read an excel sheet and selected two columns like A and C will plot as a XY Graph (X as a A column and Y as a C column)

    hi sir i am read excel sheet using labview ,but unable to plot the selected colomns,so its needfull ,please find any body to sollution to the problem .i i already did some part ,it is take  too much delay Attachments: CSV File to XY GRAPH 13.lvproj ‏

  • Q10 Low Battery Warning Is there one

    when the battery gets to about 14% it just switches off no warning audible or visual is there one? have i disabled it in error?

  • How to maitain user creation and authorization in Portal from CUA

    Hi , I want to create portal users in CUA i.e. instead of creating users in portal I want to maintain user administration from CUA and also want to assign the required portal roles from CUA what configuration I need to perform. Please help. Sandip

  • 1 1242 per 8,000/sq ft ?

    What would the estimated output power level be when using a 1242 with rubber ducky antennea in warehouse be to get 1 1242 per 8,000/sq ft for use with 7921Gs? I'm guessing 6mw-12mw? I'm guessing that at 50mW I'd have way too much power for 1 1242 per