For Programmers: Free Programming Magazines  


Home > Archive > Cobol > November 2005 > Pinwheel for a report









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Pinwheel for a report
Jeff

2005-11-18, 7:55 am

Not sure if anyone knows aout this. I used to work for a company that
ran Cobol in a unix environment and theuser used wyse-60 terminals.
Anyway, we had some very long reports that ran and it looked as if the
"computer" was not doing anything. A fellow programmer has this neat
little WS-Table that created a pinwheel that would spin on the screen.
It used these characters / | \ and had a counter etc. I can not
remember for the life of me how he did it. Any ideas? Thanks for your
help!!!

2005-11-18, 7:55 am

In article <1132318159.804408.28790@g14g2000cwa.googlegroups.com>,
Jeff <jmoore207@hotmail.com> wrote:

[snip]

>Anyway, we had some very long reports that ran and it looked as if the
>"computer" was not doing anything. A fellow programmer has this neat
>little WS-Table that created a pinwheel that would spin on the screen.
>It used these characters / | \ and had a counter etc. I can not
>remember for the life of me how he did it. Any ideas?


I've seen such things... I think you present in sequence characters like
the -, \, |, / and back to -, all in the same position. It's cute but
I've found that if the user has to 'watch television' it is better to
supply actual data, like the 'counter etc' you mention, updating a line in
the manner of:

Processed 1000 recs
Processed 1000 recs.
Processec 1000 recs..
Processed 1000 recs...
Processed 2000 recs

.... etc. E'en better, when possible, is 'Processed 1000 of 7,528 recs' or
the like.

DD

Jeff

2005-11-18, 7:55 am

Actually, I am doing this on a screen full of items. I was just going
to do it at line 24 col 1. I should have been clear. I thought it was a
report, but it is actually a screen that is full of data and it takesa
while to retrieve as it reads like 4 files to populate the screen. Your
right it is like -, \, etc. Thanks for your help!!!

2005-11-18, 7:55 am

In article <1132321262.756813.200230@g14g2000cwa.googlegroups.com>,
Jeff <jmoore207@hotmail.com> wrote:
>Actually, I am doing this on a screen full of items. I was just going
>to do it at line 24 col 1. I should have been clear. I thought it was a
>report, but it is actually a screen that is full of data and it takesa
>while to retrieve as it reads like 4 files to populate the screen. Your
>right it is like -, \, etc. Thanks for your help!!!


No prob... so in addition to what you have it seems you want to
incorporate something along the lines of:

Evaluate True
When cond-1
Display '-' at 2401
When cond-2
Display '' at 2401
When cond-3
Display '|' at 2401
When cond-4
Display '/' at 2401
End-Evaluate

.... or, ideally, something like this built into the logic for your other
screen-displays so that you don't increase the wait-time by burning more
CPU.

DD

Michael Mattias

2005-11-18, 6:55 pm

<docdwarf@panix.com> wrote in message news:dlkkmh$r93$1@reader2.panix.com...
> In article <1132318159.804408.28790@g14g2000cwa.googlegroups.com>,
> Jeff <jmoore207@hotmail.com> wrote:
>
> [snip]
>
>
> I've seen such things... I think you present in sequence characters like
> the -, \, |, / and back to -, all in the same position.


Yup, that's how you do it.. Based on something like (record number MOD
somenumber) = 0 you send (DISPLAY) the next character. Or you can use a
timer if available on your operating system.



MCM




Donald Tees

2005-11-18, 6:55 pm

Jeff wrote:
> Not sure if anyone knows aout this. I used to work for a company that
> ran Cobol in a unix environment and theuser used wyse-60 terminals.
> Anyway, we had some very long reports that ran and it looked as if the
> "computer" was not doing anything. A fellow programmer has this neat
> little WS-Table that created a pinwheel that would spin on the screen.
> It used these characters / | \ and had a counter etc. I can not
> remember for the life of me how he did it. Any ideas? Thanks for your
> help!!!
>


Like this?

REVOLVING-WHEEL-FOREVER.
DISPLAY "|" WITH NO ADVANCING.
DISPLAY "/" WITH NO ADVANCING.
DISPLAY "-" WITH NO ADVANCING.
DISPLAY "\" WITH NO ADVANCING.
GO TO REVOLVING-WHEEL-FOREVER.

Donald
Judson McClendon

2005-11-18, 6:55 pm

"Donald Tees" <donald_tees@sympatico.ca> wrote:
> Jeff wrote:
>
> Like this?
>
> REVOLVING-WHEEL-FOREVER.
> DISPLAY "|" WITH NO ADVANCING.
> DISPLAY "/" WITH NO ADVANCING.
> DISPLAY "-" WITH NO ADVANCING.
> DISPLAY "\" WITH NO ADVANCING.
> GO TO REVOLVING-WHEEL-FOREVER.



No, like this: ;-)

IDENTIFICATION DIVISION.
PROGRAM-ID. FunWheel.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 TIME1 PIC 9(08) COMP.
77 TIME2 PIC 9(08) COMP.
77 LOOPS PIC 9(01) COMP.
77 SUB PIC 9(02) COMP.
01 THE-TABLE.
03 THE-VALUES.
05 FILLER PIC X(09) VALUE " | * ".
05 FILLER PIC X(09) VALUE " / * ".
05 FILLER PIC X(09) VALUE " *- ".
05 FILLER PIC X(09) VALUE " * \".
05 FILLER PIC X(09) VALUE " * | ".
05 FILLER PIC X(09) VALUE " * / ".
05 FILLER PIC X(09) VALUE " -* ".
05 FILLER PIC X(09) VALUE "\ * ".
03 THE-LINE PIC X(09).
PROCEDURE DIVISION.
DoItToIt.
DISPLAY " " WITH BLANK SCREEN
ACCEPT TIME1 FROM TIME
PERFORM VARYING LOOPS FROM 4 BY -1 UNTIL LOOPS < 1
PERFORM VARYING SUB FROM 1 BY 9 UNTIL SUB > 64
MOVE THE-VALUES(SUB:9) TO THE-LINE
DISPLAY THE-LINE(1:3) AT LINE 10 COLUMN 39
DISPLAY THE-LINE(4:3) AT LINE 11 COLUMN 39
DISPLAY THE-LINE(7:3) AT LINE 12 COLUMN 39
DISPLAY LOOPS AT LINE 13 COLUMN 40
DISPLAY " " AT LINE 01 COLUMN 01
MOVE TIME1 TO TIME2
PERFORM UNTIL TIME1 > TIME2 + 15
ACCEPT TIME1 FROM TIME
END-PERFORM
END-PERFORM
END-PERFORM
DISPLAY " " WITH BLANK SCREEN
STOP RUN.

Executable at: ftp://sunvaley.com/COBOL/FunWheel.zip
--
Judson McClendon judmc@sunvaley0.com (remove zero)
Sun Valley Systems http://sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."


Jeff

2005-11-18, 6:55 pm

Thanks Judson! Now I just have to figure out how to use it my loop. It
performs a paragraph varying I from 1 by until > cntr.

Robert Jones

2005-11-18, 6:55 pm

Another approach is a cross between Doc Dwarf's first response and the
pinwheel

If you have a few characters to spare on the screen you could instead
show a single increasing number. I would prefer a sequence such as
1,2,4,8,16,etc, since that shows when a program is having a hard time
of even getting started while avoiding too many displays/interruptions
to the main work of the program. The displayed number would be
incremented on every execution of the procedure which is looping to
undertake the task in hand, and tested against the previous value * 2
to determine when to display the next value. The displayed count could
be in a different colour/display scheme to the main part of the screen.

Robert

2005-11-18, 6:55 pm

In article <1132340262.484095.315460@g14g2000cwa.googlegroups.com>,
Robert Jones <rjones0@hotmail.com> wrote:
>Another approach is a cross between Doc Dwarf's first response and the
>pinwheel


Wow... a counter, a pinwheel *and* a cross? Sounds like a holiday
fireworks display!

DD
Jeff

2005-11-18, 6:55 pm

Thanks for all your great ideas! I am going to try them this wend.
Yall have a good wend!

HeyBub

2005-11-19, 6:55 pm

Jeff wrote:
> Thanks for all your great ideas! I am going to try them this wend.
> Yall have a good wend!


Remember, the purpose of the "pinwheel" (or the GUI equivalent: "Progress
Bar") is to reassure the user that the program hasn't croaked in some
fashion: dead, infinite loop, etc. A pinwheel is nifty, but for longer
processes some measure of progress might be more meaningful.

For text-based systems, I'd go for "xx%"

On one of our systems, we have an event that fires every two seconds during
startup, displaying a different message:

Checking with the queen.
Tightening nuts.
Topping off the tank.
Polishing the silver.
Lining up the ducks.
Setting pot to boil.
Starting engines.
etc.

There's about fifty of these, picked at random.

Totally unprofessional. Our customers love it.



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com