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:
Pete Eggers <[log in to unmask]>
Reply To:
Date:
Mon, 25 Jun 2007 11:22:07 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (73 lines)
This only works for 1 input value.  You could use "echo BOB >>
progparm" to add a second value, and so on, but everytime the program
runs, it will reopen "progparm"  file, and read "MARY" each time.

You really need the while loop to be in the program itself.
***  OR  ***
Make "progparm" file a message file (kinda slick from a geek point of view!).

Pete


On 6/25/07, Robert Mills <[log in to unmask]> wrote:
> Mike,
>
> PROG1 is consuming a record from the stdin each time it is run. If you
> have any lines after the showclock it will have consumed them each time
> it looped.
>
> The following will work:
>
> !echo MARY > progparm
> !while var1 > 0 do
> !  pause 1
> !  PROG1 < progparm
> !endwhile
> !showclock
>
>
> regards,
>
> Robert W.Mills
> Systems Development Manager
> Pinnacle Arvato
> (020) 8309 3604
>
>
> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
> Behalf Of Michael Caplin
> Sent: 25 June 2007 13:06
> To: [log in to unmask]
> Subject: [HP3000-L] WHILE LOOP
>
> 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 *
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

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

ATOM RSS1 RSS2