batch file problem

ken weiland ken_weiland at yahoo.com
Thu Jun 7 18:09:57 CDT 2012


in your example you are doing the following
I have done a lot of mbatch qtp and quiz files with no problems

if seems you are calling a quiz routine inside a qtp routine
then means you would need 2 exits are the end
c:
> cd \foambin
> rem QTP auto=C:\FOAMbin\XFSPR20D < %PHTEMP%\FFSPARAM.dat
-- calling qtp at this point
> QTP
> execute C:\FOAMbin\XFSPR20D
> 02
> @
> @
> @
> 
-- calling quiz at this point but have not exited the qtp process
> execute C:\FOAMbin\XFSPR20Z

this exits the quiz process that was started
> exit

-- you are calling a quiz routine while still withing the qtp call
> QUIZ auto=C:\FOAMbin\XFSZR20Z
-- your are now back to qtp routine

-- question why are you running XFSPR20Z twice?


let know if my thinking  is correct 
- you commented out the qtp auto that would have started qtp and shut it down after it ran
 and now call qtp  manually
thus you have to add an exit qtp 

it looks like the batch stream is not correct
qtp auto...
quiz auto ...

or 

qtp
 execute ....
exit

quiz
 execute ...
exit

or

qtp
 execute .....

 quiz
 execute ....
 exit

exit







--- On Thu, 6/7/12, powerh-l-request at lists.sowder.com <powerh-l-request at lists.sowder.com> wrote:

> From: powerh-l-request at lists.sowder.com <powerh-l-request at lists.sowder.com>
> Subject: powerh-l Digest, Vol 84, Issue 2
> To: powerh-l at lists.sowder.com
> Received: Thursday, June 7, 2012, 12:47 PM
> Send powerh-l mailing list
> submissions to
>     powerh-l at lists.sowder.com
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>     http://lists.sowder.com/mailman/listinfo/powerh-l
> or, via email, send a message with subject or body 'help'
> to
>     powerh-l-request at lists.sowder.com
> 
> You can reach the person managing the list at
>     powerh-l-owner at lists.sowder.com
> 
> When replying, please edit your Subject line so it is more
> specific
> than "Re: Contents of powerh-l digest..."
> 
> 
> Today's Topics:
> 
>    1. Re:QTP in batch file (job ?) in Windows
> ? (Michel Adam)
>    2. Re:QTP in batch file (job ?) in Windows
> ? (Bob Deskin)
>    3. RE:[Bulk] Re: QTP in batch file (job ?)
> in Windows ?
>       (Ken Langendock)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 7 Jun 2012 13:20:46 -0600
> From: Michel Adam <michel.adam at gmail.com>
> Subject: Re: QTP in batch file (job ?) in Windows ?
> To: power-l <powerh-l at lists.sowder.com>
> Message-ID:
>     <CAC3Ac7uabAgj0XzzMx6aQqDbfjC5M6HXgQRiByRTkSORVb8itQ at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Ken replied as well that it doesn't work.
> 
> Can I get a definitive answer from the folks at Cognos,
> about the example
> on page 138? I include it below. Is it flat out wrong, or
> are there magic
> parameters that would make it work?
> 
> Windows:
> 
> QTP
> SET DICTIONARY MYDICT
> ACCESS FILEA
> CHOOSE FIELDA PARM
> SUBFILE FILEB KEEP INCLUDE FILEA
> GO
> 10
> EXIT
> 
> 
> On the same page are example with VMS and Unix, which all
> seem to imply a
> behaviour similar to that of a 3000 JOB.
> 
> The paragraph on page 137 seems pretty clear:
> 
> *Submitting Jobs as Text Files*
> The text file that you create for your batch job must
> include
> execution-time values (responses) for
> all CHOOSE, DEFINE, and GLOBAL TEMPORARY statement prompts.
> These values
> are placed
> in the file starting on the line below the GO statement (or
> the EXECUTE
> statement, if compiled
> reports or runs are used).
> 
> 
> Should this not work?????
> 
> Michel
> 
> On Thu, Jun 7, 2012 at 12:00 PM, Brian Stephens <bws001 at gmail.com>
> wrote:
> 
> > Windows does read data from the batch file.  After
> it executes a command
> >  it expects it to go away and do its thing. 
> Next line in the batch file is
> > the next command it will execute.
> >
> > Sent from my iPhone
> >
> > On 2012-06-07, at 12:34, Michel Adam <michel.adam at gmail.com>
> wrote:
> >
> > Sorry, that should have been page 137 to 139,
> especially the example on
> > page 139.
> >
> > Michel
> >
> > On Thu, Jun 7, 2012 at 11:28 AM, Michel Adam <michel.adam at gmail.com>wrote:
> >
> >> Hi listers,
> >>
> >> trying to run a batch file and have QTP prompt for
> a few parameters
> >> (after RTFM the QTP manual, page 137).
> >>
> >> QTP will just stop cold and prompt without reading
> the parameters. What
> >> am I missing?
> >>
> >>
> >> The bat file is:
> >>
> >>
> >> c:
> >> cd \foambin
> >> rem QTP auto=C:\FOAMbin\XFSPR20D <
> %PHTEMP%\FFSPARAM.dat
> >> QTP
> >> execute C:\FOAMbin\XFSPR20D
> >> 02
> >> @
> >> @
> >> @
> >>
> >> execute C:\FOAMbin\XFSPR20Z
> >> exit
> >> QUIZ auto=C:\FOAMbin\XFSZR20Z
> >>
> >>
> >>
> >> The 'rem' statement is from a prior attempt, which
> works, of having QTP
> >> execute the run and get the values for the prompts
> from a file
> >> (FFSPARAM.dat).
> >>
> >>
> >> when testing, the results are:
> >>
> >> --------------
> >>
> >> Microsoft Windows [Version 6.1.7601]
> >> Copyright (c) 2009 Microsoft Corporation.  All
> rights reserved.
> >>
> >> G:\>c:
> >>
> >> C:\>cd foambin
> >>
> >> C:\FOAMbin>dir jfsrp20a.bat
> >>  Volume in drive C has no label.
> >>  Volume Serial Number is 8C96-214D
> >>
> >>  Directory of C:\FOAMbin
> >>
> >> 2012-06-07  11:15       
>        264 JFSRP20A.bat
> >>             
>   1 File(s)           
> 264 bytes
> >>             
>   0 Dir(s)   1,863,245,824 bytes free
> >>
> >> C:\FOAMbin>jfsrp20a
> >>
> >> C:\FOAMbin>c:
> >>
> >> C:\FOAMbin>cd \foambin
> >>
> >> C:\FOAMbin>rem QTP auto=C:\FOAMbin\XFSPR20D
> <
> >> C:\Users\madam\AppData\Local\PHTemp
> >> \FFSPARAM.dat
> >>
> >> C:\FOAMbin>QTP
> >> IBM(R) Cognos(R) PowerHouse(R) 4GL  8.41G -
> QTP
> >> (C) Copyright IBM Corp. 1982, 2010
> >>
> >> >
> >>
> >> ------------
> >>
> >> and that is it. QTP just stops there and waits for
> input.
> >>
> >> Is page 137 of the QPT reference manual accurate?
> >>
> >> Michel Adam
> >> michel.adam at gmail.com
> >>
> >
> > --
> > = = = = = = = = = = = = = = = = = = = = = = = = = = =
> =
> > Mailing list: powerh-l at lists.sowder.com
> > Subscribe: 'subscribe' in message body to
> > powerh-l-request at lists.sowder.com
> > Unsubscribe: 'unsubscribe &lt;password&gt;' in
> message body to
> > powerh-l-request at lists.sowder.com
> > http://lists.sowder.com/mailman/listinfo/powerh-l
> > This list is closed, thus to post to the list you must
> be a subscriber.
> > Add 'site:lists.sowder.com powerh-l' to your search
> terms to search the
> > list archive at Google.
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20120607/26076082/attachment-0001.htm>
> 
> ------------------------------
> 
> Message: 2
> Date: Thu, 7 Jun 2012 15:43:26 -0400
> From: Bob Deskin <Bob.Deskin at ca.ibm.com>
> Subject: Re: QTP in batch file (job ?) in Windows ?
> To: Michel Adam <michel.adam at gmail.com>
> Cc: powerh-l-bounces+bob.deskin=ca.ibm.com at lists.sowder.com,   
> power-l
>     <powerh-l at lists.sowder.com>
> Message-ID:
>     <OF96ADE418.2555AB18-ON85257A16.006C3D77-85257A16.006C5927 at ca.ibm.com>
> Content-Type: text/plain; charset="US-ASCII"
> 
> I'll ask QC to test it. I've tried and I couldn't get it to
> work. I'll 
> have to think about what we're missing.
> 
> Bob
> 
> Bob Deskin
> Senior Product Manager
> IBM Cognos Application Development Tools
> IBM Canada
> +1 613-356-5633
> bob.deskin at ca.ibm.com
> http://www.ibm.com/software/data/cognos/products/powerhouse/
> 
> 
> 
> From:   Michel Adam <michel.adam at gmail.com>
> To:     power-l <powerh-l at lists.sowder.com>,
> 
> Date:   2012-06-07 03:22 PM
> Subject:        Re: QTP in batch file
> (job ?) in Windows ?
> Sent by:       
> powerh-l-bounces+bob.deskin=ca.ibm.com at lists.sowder.com
> 
> 
> 
> Ken replied as well that it doesn't work.
> 
> Can I get a definitive answer from the folks at Cognos,
> about the example 
> on page 138? I include it below. Is it flat out wrong, or
> are there magic 
> parameters that would make it work?
> 
> Windows:
> 
> QTP
> SET DICTIONARY MYDICT
> ACCESS FILEA
> CHOOSE FIELDA PARM
> SUBFILE FILEB KEEP INCLUDE FILEA
> GO
> 10
> EXIT
> 
> On the same page are example with VMS and Unix, which all
> seem to imply a 
> behaviour similar to that of a 3000 JOB.
> 
> The paragraph on page 137 seems pretty clear:
> 
> Submitting Jobs as Text Files
> The text file that you create for your batch job must
> include 
> execution-time values (responses) for
> all CHOOSE, DEFINE, and GLOBAL TEMPORARY statement prompts.
> These values 
> are placed
> in the file starting on the line below the GO statement (or
> the EXECUTE 
> statement, if compiled
> reports or runs are used).
> 
> 
> Should this not work?????
> 
> Michel
> 
> On Thu, Jun 7, 2012 at 12:00 PM, Brian Stephens <bws001 at gmail.com>
> wrote:
> Windows does read data from the batch file.  After it
> executes a command 
>  it expects it to go away and do its thing.  Next line
> in the batch file 
> is the next command it will execute. 
> 
> Sent from my iPhone 
> 
> On 2012-06-07, at 12:34, Michel Adam <michel.adam at gmail.com>
> wrote:
> 
> Sorry, that should have been page 137 to 139, especially the
> example on 
> page 139.
> 
> Michel
> 
> On Thu, Jun 7, 2012 at 11:28 AM, Michel Adam <michel.adam at gmail.com>
> 
> wrote:
> Hi listers,
> 
> trying to run a batch file and have QTP prompt for a few
> parameters (after 
> RTFM the QTP manual, page 137).
> 
> QTP will just stop cold and prompt without reading the
> parameters. What am 
> I missing?
> 
> 
> The bat file is:
> 
> 
> c:
> cd \foambin
> rem QTP auto=C:\FOAMbin\XFSPR20D < %PHTEMP%\FFSPARAM.dat
> QTP
> execute C:\FOAMbin\XFSPR20D
> 02
> @
> @
> @
> 
> execute C:\FOAMbin\XFSPR20Z
> exit
> QUIZ auto=C:\FOAMbin\XFSZR20Z
> 
> 
> 
> The 'rem' statement is from a prior attempt, which works, of
> having QTP 
> execute the run and get the values for the prompts from a
> file 
> (FFSPARAM.dat).
> 
> 
> when testing, the results are:
> 
> --------------
> 
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights
> reserved.
> 
> G:\>c:
> 
> C:\>cd foambin
> 
> C:\FOAMbin>dir jfsrp20a.bat
>  Volume in drive C has no label.
>  Volume Serial Number is 8C96-214D
> 
>  Directory of C:\FOAMbin
> 
> 2012-06-07  11:15         
>      264 JFSRP20A.bat
>            
>    1 File(s)       
>     264 bytes
>            
>    0 Dir(s)   1,863,245,824
> bytes free
> 
> C:\FOAMbin>jfsrp20a
> 
> C:\FOAMbin>c:
> 
> C:\FOAMbin>cd \foambin
> 
> C:\FOAMbin>rem QTP auto=C:\FOAMbin\XFSPR20D < 
> C:\Users\madam\AppData\Local\PHTemp
> \FFSPARAM.dat
> 
> C:\FOAMbin>QTP
> IBM(R) Cognos(R) PowerHouse(R) 4GL  8.41G - QTP
> (C) Copyright IBM Corp. 1982, 2010
> 
> >
> 
> ------------
> 
> and that is it. QTP just stops there and waits for input.
> 
> Is page 137 of the QPT reference manual accurate?
> 
> Michel Adam
> michel.adam at gmail.com
> 
> --
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: 'subscribe' in message body to 
> powerh-l-request at lists.sowder.com
> Unsubscribe: 'unsubscribe &lt;password&gt;' in
> message body to 
> powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a
> subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to
> search the 
> list archive at Google.
> --
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: 'subscribe' in message body to 
> powerh-l-request at lists.sowder.com
> Unsubscribe: 'unsubscribe &lt;password&gt;' in
> message body to 
> powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a
> subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to
> search the 
> list archive at Google.
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Thu, 7 Jun 2012 15:47:11 -0400
> From: "Ken Langendock" <ken.langendock at rogers.com>
> Subject: RE: [Bulk] Re: QTP in batch file (job ?) in Windows
> ?
> To: "'Michel Adam'" <michel.adam at gmail.com>,   
> "'power-l'"
>     <powerh-l at lists.sowder.com>
> Message-ID: <005801cd44e6$54954d10$fdbfe730$@langendock at rogers.com>
> Content-Type: text/plain; charset="us-ascii"
> 
> How can I say this without being to being too vague or
> controversial..lol
> 
>  
> 
> NO, It doesn't work on Windows and on Unix/Linux
> 
> I don't care what the manual says.
> 
> The manuals came from the HP/Vax era and I could never get
> that to work.
> 
>  
> 
> Ken
> 
>  
> 
>  
> 
> From: powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com
> [mailto:powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com]
> On
> Behalf Of Michel Adam
> Sent: June 7, 2012 3:21 PM
> To: power-l
> Subject: [Bulk] Re: QTP in batch file (job ?) in Windows ?
> 
>  
> 
> Ken replied as well that it doesn't work.
> 
>  
> 
> Can I get a definitive answer from the folks at Cognos,
> about the example on
> page 138? I include it below. Is it flat out wrong, or are
> there magic
> parameters that would make it work?
> 
>  
> 
> Windows:
> 
>  
> 
> QTP
> 
> SET DICTIONARY MYDICT
> 
> ACCESS FILEA
> 
> CHOOSE FIELDA PARM
> 
> SUBFILE FILEB KEEP INCLUDE FILEA
> 
> GO
> 
> 10
> 
> EXIT
> 
>  
> 
> On the same page are example with VMS and Unix, which all
> seem to imply a
> behaviour similar to that of a 3000 JOB.
> 
>  
> 
> The paragraph on page 137 seems pretty clear:
> 
>  
> 
> Submitting Jobs as Text Files
> 
> The text file that you create for your batch job must
> include execution-time
> values (responses) for
> 
> all CHOOSE, DEFINE, and GLOBAL TEMPORARY statement prompts.
> These values are
> placed
> 
> in the file starting on the line below the GO statement (or
> the EXECUTE
> statement, if compiled
> 
> reports or runs are used).
> 
>  
> 
>  
> 
> Should this not work?????
> 
>  
> 
> Michel
> 
>  
> 
> On Thu, Jun 7, 2012 at 12:00 PM, Brian Stephens <bws001 at gmail.com>
> wrote:
> 
> Windows does read data from the batch file.  After it
> executes a command  it
> expects it to go away and do its thing.  Next line in
> the batch file is the
> next command it will execute. 
> 
> Sent from my iPhone 
> 
> 
> On 2012-06-07, at 12:34, Michel Adam <michel.adam at gmail.com>
> wrote:
> 
> Sorry, that should have been page 137 to 139, especially the
> example on page
> 139.
> 
>  
> 
> Michel
> 
> On Thu, Jun 7, 2012 at 11:28 AM, Michel Adam <michel.adam at gmail.com>
> wrote:
> 
> Hi listers,
> 
>  
> 
> trying to run a batch file and have QTP prompt for a few
> parameters (after
> RTFM the QTP manual, page 137).
> 
>  
> 
> QTP will just stop cold and prompt without reading the
> parameters. What am I
> missing?
> 
>  
> 
>  
> 
> The bat file is:
> 
>  
> 
>  
> 
> c:
> 
> cd \foambin
> 
> rem QTP auto=C:\FOAMbin\XFSPR20D < %PHTEMP%\FFSPARAM.dat
> 
> QTP
> 
> execute C:\FOAMbin\XFSPR20D
> 
> 02
> 
> @
> 
> @
> 
> @
> 
>  
> 
> execute C:\FOAMbin\XFSPR20Z
> 
> exit
> 
> QUIZ auto=C:\FOAMbin\XFSZR20Z
> 
>  
> 
>  
> 
>  
> 
> The 'rem' statement is from a prior attempt, which works, of
> having QTP
> execute the run and get the values for the prompts from a
> file
> (FFSPARAM.dat).
> 
>  
> 
>  
> 
> when testing, the results are:
> 
>  
> 
> --------------
> 
>  
> 
> Microsoft Windows [Version 6.1.7601]
> 
> Copyright (c) 2009 Microsoft Corporation.  All rights
> reserved.
> 
>  
> 
> G:\>c:
> 
>  
> 
> C:\>cd foambin
> 
>  
> 
> C:\FOAMbin>dir jfsrp20a.bat
> 
>  Volume in drive C has no label.
> 
>  Volume Serial Number is 8C96-214D
> 
>  
> 
>  Directory of C:\FOAMbin
> 
>  
> 
> 2012-06-07  <tel:2012-06-07%20%C2%A011> 
> 11:15           
>    264
> JFSRP20A.bat
> 
>            
>    1 File(s)       
>     264 bytes
> 
>            
>    0 Dir(s)   1,863,245,824
> bytes free
> 
>  
> 
> C:\FOAMbin>jfsrp20a
> 
>  
> 
> C:\FOAMbin>c:
> 
>  
> 
> C:\FOAMbin>cd \foambin
> 
>  
> 
> C:\FOAMbin>rem QTP auto=C:\FOAMbin\XFSPR20D <
> C:\Users\madam\AppData\Local\PHTemp
> 
> \FFSPARAM.dat
> 
>  
> 
> C:\FOAMbin>QTP
> 
> IBM(R) Cognos(R) PowerHouse(R) 4GL  8.41G - QTP
> 
> (C) Copyright IBM Corp. 1982, 2010
> 
>  
> 
> > 
> 
>  
> 
> ------------
> 
>  
> 
> and that is it. QTP just stops there and waits for input.
> 
>  
> 
> Is page 137 of the QPT reference manual accurate?
> 
>  
> 
> Michel Adam
> 
> michel.adam at gmail.com
> 
>  
> 
> --
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: 'subscribe' in message body to powerh-l-request at lists.sowder.com
> Unsubscribe: 'unsubscribe &lt;password&gt;' in
> message body to
> powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a
> subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to
> search the list
> archive at Google.
> 
>  
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20120607/8b02ebfa/attachment.htm>
> 
> ------------------------------
> 
> --
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: &quot;subscribe&quot; in message body to
> powerh-l-request at lists.sowder.com
> Unsubscribe: &quot;unsubscribe
> &lt;password&gt;&quot; in message body to powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a
> subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to
> search the list archive at Google.
> 
> End of powerh-l Digest, Vol 84, Issue 2
> ***************************************
> 


More information about the powerh-l mailing list