Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I display a rolling counter? 2

Status
Not open for further replies.

asks

Programmer
May 10, 2001
8
NZ
I want to continually display time while a long process is going on so that the time appears to ticking over like a clock. Don't know how to display my time field so it basically overwrites the previous display making it look like like time is passing. Any thoughts?
 
Ask,

I think it's:

DISPLAY 'your text' WITH NO ADVANCE

If NG try NO ADVANCING

Jack
 
Jack,

The No Advancing option will only keep the cursor where it is and not position it on the next field/line. It's effect is to diplay the counter seperately again and again and you end up lots of different messages each showing the time.
 
Asks,

What environment, compiler, etc. are you using? Can you assign sysout directly to your terminal?

Jack
 
ACUCOBOL on a PC running Windows 98.
You could be onto something with that suggestion.
 
Thanks Betty,
I've checked this and there is no option for Rows and Columns.
 
You can probably use the WITH NO ADVANCING then, if you have a mechanism for defining a hex value in a character variable. If you can, you could declare an item like
this:

01 CARRIAGE-RETURN PIC X VALUE X'0D'.

Then in your DISPLAY, simply code:

DISPLAY CARRIAGE-RETURN whatever-else-you-want WITH NO ADVANCING.

If you can't create the hex value in your COBOL, you can probably use a REDEFINES to get the last half of a small binary item with a value of 13.

Hope this helps

Betty Scherber
Brainbench MVP for COBOL II
 
Thanks Betty,

That solution appeals to me.
I'll try it tonight.
 
Please have a look at extract from Acucobol (Versin 4.3) Online Help :

DISPLAY src-item

Format 1

DISPLAY src-item displays an individual field to the screen.

DISPLAY { {src-item}
{OMITTED }

[ UPON new-window ]

Remaining phrases are optional, can appear in any order.

AT screen-loc

AT LINE NUMBER line-num

AT {COLUMN } NUMBER col-num
{COL }
{POSITION}
{POS }

SIZE length

WITH NO ADVANCING

{ERASE} [TO END OF] {LINE } (VAX, ICOBOL)
{BLANK} {SCREEN}

{ERASE} [EOS] (RM)
{BLANK} [EOL]

WITH {BELL}
{BEEP}

{UNDERLINED}
{HIGHLIGHT }
{HIGH }
{BOLD }
{LOWLIGHT }
{LOW }
{STANDARD }

WITH {BLINKING}
{BLINK }

{REVERSE-VIDEO}
{REVERSE }
{REVERSED }

SAME

WITH {COLOR } color-val
{COLOUR}

{FOREGROUND-COLOR } IS fg-color
{FOREGROUND-COLOUR}

{BACKGROUND-COLOR } IS bg-color
{BACKGROUND-COLOUR}

SCROLL [UP ] [ BY scrl-num {LINE } ]
[DOWN] {LINES}

OUTPUT {JUSTIFIED} {LEFT }
{JUST } {RIGHT }
{CENTERED}

WITH {CONVERSION}
{CONVERT }

CONTROL cntrl-string

UPON CRT

} ...

Regards

Dixi
 
Betty,

Unfortunately the Display of the Carriage Return character didn't work. Don't know why, I would have thought it would be O.K. It actually shows on the screen as a square symbol shaded white so it is displaying and I ensured the correct "0D" was being used.
Thanks


 
Dixi,

Thanks for that, I'll check it out tonight.
 
Thanks to Dixi and Betty,

Works a treat now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top