Subject: | |
From: | |
Reply To: | |
Date: | Thu, 21 Dec 2000 15:44:10 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Donna,
In batch, the input command will tend to look to the next line for it's
input, so it will "eat" the "if" statement.... hence your error in batch.
I suggest testing the variable HPJOBTYPE and modify the command file to go
around the input (see :HELP HPJOBTYPE).
I'm sure there are many more fun ways to solve this!
-Dave
> -----Original Message-----
> From: Donna Helriegel [mailto:[log in to unmask]]
> Sent: Thursday, December 21, 2000 3:24 PM
> To: [log in to unmask]
> Subject: Dynamic input
>
>
> Hi All,
>
> I am writing a job in which I need to have user input
> during the job in
> several places. I can do this within a command file, but the
> same logic
> fails when written into a job. Is there a way to do this, or
> should I just get
> the info in advance and pass the parms into the job? I've
> tried a variety
> of other ways, but know I "just don't get it" yet - I am too
> new to this.
>
> Command file logic that works:
>
> 14 echo Broadcasting using branch list '!_blist'.
> 15 echo
> 16 input _a;prompt="Continue (Y/n):"
> command file pauses here
> and waits for user input
> 17 if ups("!_a") <> "Y"
> 18 echo No action performed.
> 19 else
> 20 blah blah blah
>
> Job logic that does not work:
>
> 7 ! input _a;prompt="Is this an EIFA site (Y/N):"
> job does not stop
> for input, just blows on by and complains that the "else" has no "if"
> 8 ! if (ups("!_a")) = "Y"
> 9 ! then blah blah blah
> 10 ! else
> 11 ! blah blah blah
> 12 ! endif
> 13 ! setvar _choice 3
>
> Thanks for any help you can provide, and Happy Holidays to everyone.
>
> Donna Helriegel
> Expeditors International of WA
> Software Support
> (206) 246-3711 x 3562
> fax (206) 246-3197
> [log in to unmask]
>
|
|
|