Error handling from MAXL into a batch file

Hello all
I need to know how do we pass a value to a batch file from MAXL script if an error occurs.
I have used the following in my MAXL to catch an error.
========================
login username password on server01;
Iferror 'error';
Define Label 'error';
Exit;
=======================
In the batch file I used:
If %errorlevel% NEQ 0 goto catch
:catch
echo an error occurred during MAXL script
Exit
========================
This doesnt give me any error even the login info is wrong in the MAXL script
Please correct if this is wrong and provide any help if possible
Thanks in advance

Here's the error checking code I used in my last not-DOS-but-we-call-it-that script:
REM     Call MaxL script with parameters
REM The 2>&1 at the end of the below line merges CMD's STDERR into STDOUT
%hyperion_home%\products\essbase\essbaseclient\bin\essmsh.exe %batAutomation%\%esbAppName%\MaxL\%mshScriptName%.msh %esbUsername% %esbPassword% %esbServer% %esbAppName% %mshScriptName% %batDrive% %batAutomation% >>%log% 2>&1
REM     Test for MaxL execution errors
IF NOT %ERRORLEVEL% == 0 (SET errormsg=Error! - MaxL script %mshScriptName%.msh failed with ERRORLEVEL %ERRORLEVEL% & GOTO ERROR)The 2>&1 command at the end of the MaxL script line merges STDOUT and STDERR into an overall log file I used for other processes as well as MaxL. It's great for that purpose, but unfortunately logs the username and password -- this would be overcome by encrypting those values. It was acceptable for the solution so I didn't lose any sleep over it.
Regards,
Cameron Lackpour

Similar Messages

  • Maxl within Windows Batch File

    Hello,
       I am trying to schedule an Automatic Essbase Archiving command . Function is to Disable connects , Archive , Unarchive and Enable connects . I know the Maxl commands which perform this action but just wanted to make sure how to portray this within a Windows Batch file.
    Within the Batch file , abc.bat can I insert those commands . To enter the shell we need essmsh command , but I didnt wanted to get into decrypting , encrypting the ID etc to do that . So is there a way to get it done within the Windows batch file ?
    Thanks !!

    Yes its Straight forward case ,create a batch file which call the maxl script.The batch file should contain the user id and password of Essbase and the maxl script should contain the parameters of Essbase archiving
    The content of batch file for Essbase archiving process
    echo off
    set ESSUSER=admin
    Set ESSPWD=Password
    set ESSSERVER=localhost
    set ESSAPP=Sample
    set ESSDB=Basic
    SET ESSBASE SERVER PATH=D:\Hyperion\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer
    set MaxlScript=D:\Hyperion\Middleware\user_projects\epmsystem1\Essbaseserver\essbaseserver1\bin
    essmsh "D:\Archieve.mxl" %ESSUSER% %ESSPWD% %ESSSERVER%
    ===================================================================================================
    Maxlscript Content for Archieving
    spool on to "D:/bck.log";
    set timestamp on;
    login $ESSUSER $ESSPWD on $ESSSERVER;
    display session all;
    alter system kill request all;
    alter system logout session all force;
    export database $essApp.$essDB all data to server data_file 'd:\alldata.txt';
    alter database $essApp.$essDB force archive to file "D:/sample.arc";
    alter database $essApp.$essDB end archive;
    spool off;
    logout;
    exit;
    Similarly can you create batch files for Cube restoration .I hope the above example helps you
    Thanks,
    Sreekumar Hariharan

  • Why can't I export my newsletter from CS into a pdf file all of a sudden?

    Why can't I export my newsletter from CS into a psf file all of a sudden?

    We can't know. You are not providing any relevant details - program versions, system information, PDF settings used and so on.
    Mylenium

  • File Adapter Error Handling from Batch job

    Dear all,
    I'd like to handle error information by batch job process.
    However I can't find out the error flag from the file adapter.
    My XI setting is below.
    1.FIle to File conversinn by using File adapter
    2.Async setting
    3.Not use BPM
    Anyway,we only want to judge the status for XI process from Batch process like MS-DOS batch.
    Kindly please tell me the detail explanation.
    Regards,
    Masayuki.

    Hi Masayuki,
    Please take a look at these..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/09714d543b11d1898e0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/0971c2543b11d1898e0000e8322d00/frameset.htm
    cheers,
    Prashanth

  • Error handling with Maxl

    Could someone post an example of how they handle errors with a Maxl script. For instance, is there a something similar to the IFERROR in Esscmd? Thanks,Rob

    If you run Maxl from within a perl script, use can test for errors and then, if you encounter one, decide what you need to next. This gives a lot more flexibility than an IFERROR or On Error statement.Jerry

  • Error handling from PCO Query

    Hi,
    In my project I am integrating with a PLC through SAP PCO and OPC server.
    I am currently testing error handling if something fails on any of the involved systems.
    As a first test I stopped the agent instance that I use to read data from the PLC.
    When I try to write through the agent instance with a PCO Quaery I get no errors.
    The 'Success' attribute of the PCO Query is 1.
    The 'LastErrorMessage' attribute is empty.
    The only indication is the 'Output'which contains an error message.
    <?xml version="1.0" encoding="UTF-8"?>
    <Rowsets CachedTime="" DateCreated="2015-03-19T09:58:49" EndDate="2015-03-19T09:58:48" StartDate="2015-03-19T08:58:48" Version="14.0 SP5 Patch 12 (1-okt-2014)">
         <Messages>
              <Message>PoederMagazijn/ATS PLC/General/NewDataReady_InputTypeMessage: java.net.ConnectException: Connection refused: connect</Message>
         </Messages>
    </Rowsets>
    However, the same <Message> tags are used for success messages as well. So there is no clear way to identify an error.
    Is there any other way I can be sure the PCO query was able to write and catch any errors?
    FYI: we are using PCO 2.3 and MII 14.0
    Thanks!

    A small update. I tried again by upgrading the PCO version to 15.0 But still the same.
    I did the following 2 test cases:
    Unplug the UTP cable to the PLC and write data via PCO query
    Disable the agent instance and write data via PCO query
    In both cases the PCO Query returned the following output:
    Success: 1
    LastErrorMessage: <empty>
    The only information that I get is in the results but it is not a good practice to interpret this because I don't know all the possible messages.
    Result for Case 1:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets CachedTime="" DateCreated="2015-03-26T14:13:18" EndDate="2015-03-26T14:13:12" StartDate="2015-03-26T13:13:12" Version="14.0 SP5 Patch 12 (1-okt-2014)">
        <Messages>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/ProductDescription: Unspecified error</Message>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/ProductDescription: Operation failed</Message>
        </Messages>
    </Rowsets>
    Result for Case 2:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets CachedTime="" DateCreated="2015-03-26T12:11:37" EndDate="2015-03-26T12:11:35" StartDate="2015-03-26T11:11:35" Version="14.0 SP5 Patch 12 (1-okt-2014)">
        <Messages>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/OrderQuantityTarget: java.net.ConnectException: Connection refused: connect</Message>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/OrderQuantityConfirmed: java.net.ConnectException: Connection refused: connect</Message>
        </Messages>
    </Rowsets>
    Please advice. I cannot provide any transaction integrity at this time. I would assume this to be one of the base principles of PCO.

  • Scheduling unix shell scripts from windows using DOS batch files

    Hi,
    I want to schedule unix shell scrips using windows scheduled. I have the option of scheduling the DOS batch files. But not able to connect to telnet using DOS. Please let me know if there is an option.
    Regards,
    -Anand

    Drive letters are user specific. When you run jboss it runs as you, with your shared drives. When you run it as a service, it runs as guest or another user so your drive letters are meaningless.
    Either setup the user or use UNC

  • Error Handling from exe.

    I have a runbook that monitors a folder and when any file is dropped into this folder it runs an console application (exe) written in C#. I would like the runbook to send an email on failure and have set up this step but while testing the runbook and forcing
    the application to fail the runbook still completes successfully. 
    From what I understand, if the application runs successfully it should return a exit code of 0. I am seeing large negative numbers in the exit code property when the application should fail but the runbook still completes with a status of successful.
    Any help with catching these failures would be greatly appreciated.
    Thanks

    Hi,
    the author of the Activity decides when the Activity fails. The "Run Program" Activity fails if the program could not be started. In my point of view this is good as it is.
    If the Activity does not fail you have no Published Data in Error summary text. In your" Run Program" the error should be listed in Pure Output.
    You cannot manipulate the completion status of the whole Runbook with one Activity in a supported way. I think also this is not needed.
    You can run C#- and PowerShell-Code with the "Run .Net Script" Activity. I get the Exception in PowerShell with:
    try
    #code that did not interest you here
    catch [Exception]
    return $_.Exception.Message
    Regards,
    Stefan
    www.sc-orchestrator.eu ,
    Blog sc-orchestrator.eu

  • Error message from web - when opening pdf files

    Hi,
    I receive the following error message a lot when I try to open an educational pdf file from the web.  What do I need to do to 1. see, 2. print and 3. save these type of educational pdf files from the web?  I am using a MacBookPro OS X.
    Thanks for your help and sorry I could not find an answer on the forum. 
    Example:  I try to import or download MIT18_06SCF11_Ses3.5sum 2.pdf onto my desktop - which seems successful.  However when I try to open this file, I get the following error message.:
    "Adobe Reader could not open 'MIT18_06SCF11_Ses3.5sum 2.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)."

    Yes i tried following your list of commands and got the same error from MyMathLab by Pearson Publishing or the other link.  I'm beginning to wonder if they are protected. 
    As you probably guess - I am not computer savvy.  I will take my laptop to school tomorrow and ask another student. 
    Thanks for your followup.

  • Exception and Error Handling from SRDemo giving duplicate errors.

    Hi ,
    I used code from SRDemo for Exception Handling and its giving me issue that all the error are get duplicate for every exception .
    I have debug it because of reportErrors(final PageLifecycleContext ctx) invoked twice with same Exception in it .
    Its get duplicated in UI .
    Thanks in advance.

    A small update. I tried again by upgrading the PCO version to 15.0 But still the same.
    I did the following 2 test cases:
    Unplug the UTP cable to the PLC and write data via PCO query
    Disable the agent instance and write data via PCO query
    In both cases the PCO Query returned the following output:
    Success: 1
    LastErrorMessage: <empty>
    The only information that I get is in the results but it is not a good practice to interpret this because I don't know all the possible messages.
    Result for Case 1:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets CachedTime="" DateCreated="2015-03-26T14:13:18" EndDate="2015-03-26T14:13:12" StartDate="2015-03-26T13:13:12" Version="14.0 SP5 Patch 12 (1-okt-2014)">
        <Messages>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/ProductDescription: Unspecified error</Message>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/ProductDescription: Operation failed</Message>
        </Messages>
    </Rowsets>
    Result for Case 2:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets CachedTime="" DateCreated="2015-03-26T12:11:37" EndDate="2015-03-26T12:11:35" StartDate="2015-03-26T11:11:35" Version="14.0 SP5 Patch 12 (1-okt-2014)">
        <Messages>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/OrderQuantityTarget: java.net.ConnectException: Connection refused: connect</Message>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/OrderQuantityConfirmed: java.net.ConnectException: Connection refused: connect</Message>
        </Messages>
    </Rowsets>
    Please advice. I cannot provide any transaction integrity at this time. I would assume this to be one of the base principles of PCO.

  • Help needed Importing a string from labview into matlab for file opening

    Hello,
    I am using labview to allow the user to pick the file to open via the
    open labview measurement file block. Then I take the filename and
    convert it from a path to a string and try to import it into my matlab
    script which I use dlmread() to open my data file. However the
    datafile does not open. I was wondering if anyone would help me with
    this method?
    Thank you,

    Hi Nicole,
    Are you using the Matlab Script Node or the MathScript Node?  I know that dlmread is not currently implement with MathScript (although R&D is looking at implementing further features for future versions of LabVIEW).  Also, I'm not sure which VI you are using to get the file path because there isn't an "Open LabVIEW Measurement File" VI.  There are Read & Write LVM and a simple Open\Create\Replace File VI--are you using one of these?  If you are using the Open File VI, Matlab may be unable to read from the file because it is already locked for editing by LabVIEW. 
    I hope this helps!
    Megan B.
    National  Instruments

  • Error handling while uploading data through Batch Input Session

    I want to upload data from a file to 2 different infotypes at the same time. One is a user defined infotype 9010 and the other is a standard infotype 2010. 9010 infotype has the start and end time whereas 2010 doesn't.While uploading I have put validations to check duplicate entries for infotype 9010 based on the start time and endtime. The duplicate entry is rejected in 9010 but the same gets uploaded in 2010. In 2010 I can't put any validations because there is no start time and end time.  I want to prevent the upload of the entry in infotype 2010 if it is not uploaded in 9010. Please help.

    Doing IMPORT?EXPORT will act like a global variable shared between two separate programs.
    Here is an example:
    In first part, export the values to a memory variable after your conditions satisfy and you want to set a flag, like this ...
        free memory id 'ZFLAG_VAR'. "recomended to clear that variable
                            " before start, you dont need to declare it
        data: l_flag type c.
        if my_condition = 'true'.
          l_flag = 'X'.
          export l_flag to memory id 'ZFLAG_VAR'.
        endif.
    In second part, you can
    import l_flag from memory id 'ZFLAG_VAR'.
    if l_flag = 'X'.
       write: 'hmmmm ... the flag was marked, so my condition was true in last part'.
    endif.
    Edited by: Rob Burbank on Nov 25, 2009 3:12 PM

  • I am trying to extract metadata from essbase into a flat file using ODI.

    I have 2 questions in this regard :
    Some of the account members storage property is missing in the extract.the reason which i suspect is due to the parent child sorting that did not happen while extracting.How do i do this.I do not see this option when i select IKM hyperion Essbase Metadata to SQL....
    I have many account members that have more than one UDA's upto 5 UDA's.But in my extrcat only one UDA appears.How do i incorporate all the UDA's in a single column,sperated by a comma,the extract file as such is semicolon seperated,mainly because of this reason and some alias descriptions have comma's in the source system
    ODi is extracting metadata in a descending order.How do i change it to sort records in parent child order
    Thanks,
    Lingaraj
    Edited by: user649227 on 2009/06/10 6:50 AM

    Hi,
    There was an issue with early versions of the KM around the storage property, this has since been resolved. I recommend upgrading to the latest release of ODI or have a look through the patches.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How do you add an icalendar event link from outlook into your InDesign file?

    I have created a button on a xmas invite that allows people to automatically add the event into their outlook calendars - but i am just trying to work out how to add the link in.
    If someone could help it would be greatly appreciated.
    thanks

    Perhaps you can ask on an Android site or visit the app support website....

  • Call ggsci using batch file from windows- get error

    i create a script to use ggsci, start manager, extract and replicat.
    i have success doing this in my linux.
    here is one of my script : start_ext1.sh
    cd /u01/app/oracle/ggs
    ./ggsci <<EOF
    start manager
    start ext_s
    exit
    EOF
    clear
    i have an error when i do this using batch file from windows.
    here is the batch file :
    @echo off
    cd C:\putty
    plink.exe -ssh -2 -P 22 [email protected] -pw oracle "./start_ext1.sh"
    every time i try to enter ggsci when i run that batch file, i get this error :
    ./ggsci: error while loading shared libraries: libnnz10.so: cannot open shared object file: No such file or directory
    i didn't get this error when i run the script in linux.
    is there anybody can help me?
    thanks a lot!

    problem solved!
    add : . ./.bash_profile before enter ggsci.
    it's worked! :)

Maybe you are looking for