Loading ...
Sorry, an error occurred while loading the content.

Re: Problem Passing a Variable to a Bat File

Expand Messages
  • mskea1
    Hi, Don t know what version of the agent you are using but I had a similar problem last year with v6.2 (FP1 ?). Applied the fix pack 2 and the script started
    Message 1 of 10 , Sep 1, 2008
    • 0 Attachment
      Hi,

      Don't know what version of the agent you are using but I had a
      similar problem last year with v6.2 (FP1 ?). Applied the fix pack 2
      and the script started working again - not sure if it was a code or
      configuration problem.

      Regards
      Mark


      --- In Control-X@yahoogroups.com, "osafr71" <orlando.ramos@...> wrote:
      >
      > Hi Rob.
      >
      > The scripts who are using more than one variable are running ok, but
      > the one who only have 1 variable it abort´s because Control-M won't
      > pass the variable.
      >
      > In another scripts i have :
      >
      > set user=%1
      > set empresa=%2
      >
      > On Job definition have :
      >
      > Parm1=kaspa
      > Parm2=010
      >
      > and it works fine. But if i want to use only one variable:
      >
      > set empresa=%1 and Job definition Parm1=010, won't work
      >
      > Regards,
      >
      > osafr71
      >
      > --- In Control-X@yahoogroups.com, "Rob Neal" <rob.neal.chuh@> wrote:
      > >
      > > Try moving the set parameter that's getting the variable to the
      1st set.
      > >
      > >
      > > Thanks,
      > >
      > > Rob Neal
      > >
      > > AAIT - University of Phoenix / BMCS-CE - Control-M for Distributed
      > > Systems
      > >
      > > Control-M 2nd Level Support
      > >
      > > Technical Analyst -State Farm Insurance Companies
      > >
      > > Corporate South P-2
      > >
      > >
      > >
      > > ________________________________
      > >
      > > From: Control-X@yahoogroups.com [mailto:Control-
      X@yahoogroups.com] On
      > > Behalf Of osafr71
      > > Sent: Friday, August 29, 2008 17:36
      > > To: Control-X@yahoogroups.com
      > > Subject: [Control-X] Problem Passing a Variable to a Bat File
      > >
      > >
      > >
      > > Hi there.
      > >
      > > I got a problem to pass a variable to a Bat file on a Windows
      machine.
      > > It's a little strange, because i can pass 2, 3, 4 ,5 and even 9
      > > variables on the Step Panel using Parm1, Parm2, etc... . But if i
      use
      > > only 1 variable it won't pass to the Bat file.
      > >
      > > Ex: 9 Variables ( OK )
      > >
      > > REM
      > > ----------------------------------------------------------
      > > REM -- Parametrizacao
      > > REM
      > > ----------------------------------------------------------
      > >
      > > call param_edfsysut_m.bat
      > >
      > > set empresa=%5
      > > set pwd_ora=%1
      > > set instancia=%2
      > > set pwd_pwc=%3
      > > set instancia_pwc=%4
      > > set sistema_fonte_cod=%9
      > >
      > > Ex: 1 variable
      > >
      > > REM
      > > ----------------------------------------------------------
      > > REM -- Parametrizacao
      > > REM
      > > ----------------------------------------------------------
      > >
      > > call param_edfsysut_m.bat
      > >
      > > set RET_CODE=0
      > > set proc=edfsysut_hist_empresa_mensal
      > > set empresa=%1
      > >
      > > It,s 2 scripts but running the same machine, user, etc... all
      > > definitions are equal.
      > >
      > > Someone have an idea why the script with one parameter won't Run
      as i
      > > expected?
      > >
      > > The result is the bat file abort's with no passing variables.
      > >
      > > SYSOUT
      > >
      > > set RET_CODE=0
      > >
      > > set proc=edfsysut_hist_empresa_mensal
      > >
      > > set empresa=
      > >
      > > Thanks in advance
      > >
      >
    • osafr71
      Hi, good morning. I did what you told and it s the same result. Now i tested again but with 2 variables, and it work s. It seems that he doesn t like just one
      Message 2 of 10 , Sep 1, 2008
      • 0 Attachment
        Hi, good morning.

        I did what you told and it's the same result.

        Now i tested again but with 2 variables, and it work's. It seems that
        he doesn't like just one variable.

        REM
        ---------------------------------------------------------------------------------
        REM -- Parametrizacao
        REM
        ---------------------------------------------------------------------------------

        call param_edfsysut_m.bat

        set empresa=%1
        echo %1
        echo %2

        set RET_CODE=0
        set proc=edfsysut_hist_empresa_mensal

        SYSOUT:
        set empresa=9999

        echo 9999
        9999

        echo 010909
        010909

        set RET_CODE=0

        set proc=edfsysut_hist_empresa_mensal

        As you can see on the Sysout, it puts PARM1 and PARM2.

        Ideas are welcome.

        Regards,

        Orlando Ramos



        --- In Control-X@yahoogroups.com, "Rob Neal" <rob.neal.chuh@...> wrote:
        >
        > Try moving the set parameter that's getting the variable to the 1st set.
        >
        >
        > Thanks,
        >
        > Rob Neal
        >
        > AAIT - University of Phoenix / BMCS-CE - Control-M for Distributed
        > Systems
        >
        > Control-M 2nd Level Support
        >
        > Technical Analyst -State Farm Insurance Companies
        >
        > Corporate South P-2
        >
        >
        >
        > ________________________________
        >
        > From: Control-X@yahoogroups.com [mailto:Control-X@yahoogroups.com] On
        > Behalf Of osafr71
        > Sent: Friday, August 29, 2008 17:36
        > To: Control-X@yahoogroups.com
        > Subject: [Control-X] Problem Passing a Variable to a Bat File
        >
        >
        >
        > Hi there.
        >
        > I got a problem to pass a variable to a Bat file on a Windows machine.
        > It's a little strange, because i can pass 2, 3, 4 ,5 and even 9
        > variables on the Step Panel using Parm1, Parm2, etc... . But if i use
        > only 1 variable it won't pass to the Bat file.
        >
        > Ex: 9 Variables ( OK )
        >
        > REM
        > ----------------------------------------------------------
        > REM -- Parametrizacao
        > REM
        > ----------------------------------------------------------
        >
        > call param_edfsysut_m.bat
        >
        > set empresa=%5
        > set pwd_ora=%1
        > set instancia=%2
        > set pwd_pwc=%3
        > set instancia_pwc=%4
        > set sistema_fonte_cod=%9
        >
        > Ex: 1 variable
        >
        > REM
        > ----------------------------------------------------------
        > REM -- Parametrizacao
        > REM
        > ----------------------------------------------------------
        >
        > call param_edfsysut_m.bat
        >
        > set RET_CODE=0
        > set proc=edfsysut_hist_empresa_mensal
        > set empresa=%1
        >
        > It,s 2 scripts but running the same machine, user, etc... all
        > definitions are equal.
        >
        > Someone have an idea why the script with one parameter won't Run as i
        > expected?
        >
        > The result is the bat file abort's with no passing variables.
        >
        > SYSOUT
        >
        > set RET_CODE=0
        >
        > set proc=edfsysut_hist_empresa_mensal
        >
        > set empresa=
        >
        > Thanks in advance
        >
      • osafr71
        Hi Mark. I install the FP 2 and resolve my problem. Thank s for the tip. Thank you all Regards, orlando Ramos
        Message 3 of 10 , Sep 1, 2008
        • 0 Attachment
          Hi Mark.

          I install the FP 2 and resolve my problem.

          Thank's for the tip.

          Thank you all

          Regards,

          orlando Ramos

          --- In Control-X@yahoogroups.com, "mskea1" <mark.skeats@...> wrote:
          >
          > Hi,
          >
          > Don't know what version of the agent you are using but I had a
          > similar problem last year with v6.2 (FP1 ?). Applied the fix pack 2
          > and the script started working again - not sure if it was a code or
          > configuration problem.
          >
          > Regards
          > Mark
          >
          >
          > --- In Control-X@yahoogroups.com, "osafr71" <orlando.ramos@> wrote:
          > >
          > > Hi Rob.
          > >
          > > The scripts who are using more than one variable are running ok, but
          > > the one who only have 1 variable it abort´s because Control-M won't
          > > pass the variable.
          > >
          > > In another scripts i have :
          > >
          > > set user=%1
          > > set empresa=%2
          > >
          > > On Job definition have :
          > >
          > > Parm1=kaspa
          > > Parm2=010
          > >
          > > and it works fine. But if i want to use only one variable:
          > >
          > > set empresa=%1 and Job definition Parm1=010, won't work
          > >
          > > Regards,
          > >
          > > osafr71
          > >
          > > --- In Control-X@yahoogroups.com, "Rob Neal" <rob.neal.chuh@> wrote:
          > > >
          > > > Try moving the set parameter that's getting the variable to the
          > 1st set.
          > > >
          > > >
          > > > Thanks,
          > > >
          > > > Rob Neal
          > > >
          > > > AAIT - University of Phoenix / BMCS-CE - Control-M for Distributed
          > > > Systems
          > > >
          > > > Control-M 2nd Level Support
          > > >
          > > > Technical Analyst -State Farm Insurance Companies
          > > >
          > > > Corporate South P-2
          > > >
          > > >
          > > >
          > > > ________________________________
          > > >
          > > > From: Control-X@yahoogroups.com [mailto:Control-
          > X@yahoogroups.com] On
          > > > Behalf Of osafr71
          > > > Sent: Friday, August 29, 2008 17:36
          > > > To: Control-X@yahoogroups.com
          > > > Subject: [Control-X] Problem Passing a Variable to a Bat File
          > > >
          > > >
          > > >
          > > > Hi there.
          > > >
          > > > I got a problem to pass a variable to a Bat file on a Windows
          > machine.
          > > > It's a little strange, because i can pass 2, 3, 4 ,5 and even 9
          > > > variables on the Step Panel using Parm1, Parm2, etc... . But if i
          > use
          > > > only 1 variable it won't pass to the Bat file.
          > > >
          > > > Ex: 9 Variables ( OK )
          > > >
          > > > REM
          > > > ----------------------------------------------------------
          > > > REM -- Parametrizacao
          > > > REM
          > > > ----------------------------------------------------------
          > > >
          > > > call param_edfsysut_m.bat
          > > >
          > > > set empresa=%5
          > > > set pwd_ora=%1
          > > > set instancia=%2
          > > > set pwd_pwc=%3
          > > > set instancia_pwc=%4
          > > > set sistema_fonte_cod=%9
          > > >
          > > > Ex: 1 variable
          > > >
          > > > REM
          > > > ----------------------------------------------------------
          > > > REM -- Parametrizacao
          > > > REM
          > > > ----------------------------------------------------------
          > > >
          > > > call param_edfsysut_m.bat
          > > >
          > > > set RET_CODE=0
          > > > set proc=edfsysut_hist_empresa_mensal
          > > > set empresa=%1
          > > >
          > > > It,s 2 scripts but running the same machine, user, etc... all
          > > > definitions are equal.
          > > >
          > > > Someone have an idea why the script with one parameter won't Run
          > as i
          > > > expected?
          > > >
          > > > The result is the bat file abort's with no passing variables.
          > > >
          > > > SYSOUT
          > > >
          > > > set RET_CODE=0
          > > >
          > > > set proc=edfsysut_hist_empresa_mensal
          > > >
          > > > set empresa=
          > > >
          > > > Thanks in advance
          > > >
          > >
          >
        • Robert Stinnett
          Who says the folks at BMC don t have a sense of humor? For those of you who remember 2001: A Space Odyssey, you will love this new BMC video!
          Message 4 of 10 , Sep 3, 2008
          • 0 Attachment
            Who says the folks at BMC don't have a sense of humor?  For those of you who remember 2001:  A Space Odyssey, you will love this new BMC video!
             
            http://www.bmctv.com/videos/bmc-control-m-yes-it-does-yes-you-can
             
            Robert
             

          Your message has been successfully submitted and would be delivered to recipients shortly.