HP3000-L Archives

June 2007, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Larry Barnes <[log in to unmask]>
Reply To:
Larry Barnes <[log in to unmask]>
Date:
Mon, 25 Jun 2007 11:40:00 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
I'm not sure what you are trying to accomplish here but if you want the
var1 to increase then add the Setvar command after the program runs to
increase the var by some value; in my example below I increase it by 1.

You would also need to initialize the var1 to some value or the while
loop would return an error.
You could also decrease it by some value.
In the example the while loop would never stop looping because the
variable is always greater than zero

!SETVAR VAR1 1
!WHILE VAR1 > 0
!      PAUSE 1
!      RUN PROG1
!      SETVAR VAR1 !VAR1 + 1
!ENDWHILE

>
> I have a while loop that runs a program and the program inside of the 
> while accepts input (cobol accept).
>
> The first time thru, VAR1 = 1 so it pauses and then runs PROG1, which 
> accepts MARY, and then starts over again.  The 2nd time thru, VAR1 is 
> still = 1.  PROG1 runs but it accepts the next command after the end 
> while (SHOWCLOCK).
>
> !WHILE VAR1 > 0
> !      PAUSE 1
> !      RUN PROG1
> MARY
> !ENDWHILE
>
> !SHOWCLOCK
>
> My WHILE experiance is limited.  Any Ideas?
>
> Mike

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2