For Programmers: Free Programming Magazines  


Home > Archive > Cobol > December 2004 > SCREEN SECTION processing in RM/COBOL









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 SCREEN SECTION processing in RM/COBOL
Buck Black

2004-12-15, 3:55 pm

I am currently involved in a project to convert a suite of RM/COBOL
programs to a SCREEN SECTION based format. Currently all screens, and
screen handling routines, are implemented entirely within the
procedure division.

I would like to be able to assign attributes to screen section items
dynamically (colors, for the most part) and to be able to determine
which field in the screen has control on accepts and displays.

Any ideas on how to do this in RM/COBOL?

I would be extremely grateful for any suggestions.


TIA
Richard

2004-12-15, 3:55 pm

> I would like to be able to assign attributes to screen section items
> dynamically (colors, for the most part)


I am not sure that one can with SCREEN SECTION. I always did
field-by-field processing just using ACCEPT/DISPLAY AT and changed
colour by routines at appropriate places. Typically I would have:

IF ( Field-Number = 4 )
PERFORM Screen-In
DISPLAY field4 AT field4pos
ACCEPT field4 AT field4pos
PERFORM Screen-FG
DISPLAY field4 AT field4pos
if exit-key move 99 to field-number
else if back-key subtract1 from field-number
else
check field4 ......
if ok add 1 to field-number
end-if end-if
END-IF

This was suitable for being code generated from a text layout file.
The Screen-In, Screen-FG, Screen-BG, etc would change the colour being
used by a DISPLAY or ACCEPT to whatever the user had chosen for his
settings for that system. It is still very useful for mult-company
sites because the users set up different colours for each company.

This is implemented different ways depending on the version of Cobol,
terminal types etc, and goes back to when I was using serial terminals
on Concurrent-DOS (where the 'colours' may be bold, half-bright,
inverted etc) so the termiinal type still includes ANSI, VT52. I think
it uses CALL x"A7" for IBM screens with MF, for others it DISPLAYs a
control string.

> and to be able to determine
> which field in the screen has control on accepts and displays.


If you are accepting several fields at once then with MF you could use
CURSOR IS Cursor-Position in SPECIAL-NAMES and this can be set to the
cursor position required at the start of an ACCEPT and it reports where
the cursor was at the end of the ACCEPT. It may be available with RM.

This doesn't prevent other fields being entered, but it does put the
cursor where required.

James J. Gavan

2004-12-15, 3:55 pm

Buck Black wrote:

>On Sat, 11 Dec 2004 18:01:05 +0000, Frederico Fonseca
><real-email-in-msg-spam@email.com> wrote:
>
>
>
>
>An example of the kind of functionality we are looking to implement is
>to redisplay a screen when a value entered via that screen fails a
>validation check; to return control *directly to the field containing
>the errant value* (possibly changing the color attributes to white
>text/red background, for example).
>
>We would also like to implement a moving bar menu *without accepting*
>the screen at any point, prior to selecting a menu option thru an
>exception key press.
>
>I know its possible to do any of this very easily using Acucobol
>products.
>
>Unfortunately, this is not an option. We're stuck with the RM system.
>
>Thank's for your suggestions.
>
>
>
>

OK so you are staying with RM/COBOL. I just double-checked the Liant
site and see that when you refer to Screen-Section you are talking
something very close to the current 2002 Standard. From the RM examples
I see that you can test for function and Escape key etc.

Background - I used a very *old* version of RM both on Radio Shack and
PCs, (now no longer supported by Liant). My statements were just
ACCEPTS, DISPLAYS with White on Black. Screen colouring was achieved by
screen painting tools, the latest being Flashup - but that just
'painted' a screen image - your data still showed as White on Black..

How far do you want to go with this - just 'tart' up your screens to
highlight errors, etc., or are you after further flexibility.
Suggestions already made - use WOW or SP2. Plus - *even more
importantly* - from Pete - segregate you Screens into separate CALLs to
ancillary programs.. Back when I used it my Procedures were an
inter-mingled mess of Business Logic and screen instructions. I've
learned better since :-) .

Depends, as I said above, how far you want to go. If you just want to
'add a bit of colour' - and you will have to check with Tom Morrison of
Liant - my old compiler had a colour routine, which I never used :-

O/S : MSDOS 2.n, RM/COBOL V 2.0 and the Doc # CT032, which is about
routines written in Assembler. Example COBOL code :-

CALL 'COLORCNG.COM' USING FOREGROUND-COLOR, BACKGROUND-COLOR.
CALL 'BORDERCNG.COM' USING BORDER-COLOR

If still available and compatible with your latest RM compiler, (and O/S
of course) - that might do the trick as a 'quickie'. Failing that, then
I would suggest you most certainly are looking at new code to
accommodate either WOW or SP2. Whichever route you go - consider hiving
off your screen routines.

Jimmy, Calgary AB
Tom Morrison

2004-12-15, 3:55 pm

"Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message
news:t9dmr0p5ses3kr2dp5h5p50de16hasmtss@
4ax.com...
> On Sat, 11 Dec 2004 17:14:31 GMT, Buck Black <Buck.Black@virgin.net>
> wrote:
>
> First suggestion is DON'T DO IT.


Totally agree! This would accomplish the shift from one 1970s user
interface to another.

>
> If you need to convert the programs then convert them to something
> else like SP2 from www.flexus.com or eventually COBOL-WOW from
> Liant(RM) www.liant.com.


Either of these two suggestions would do the job.

Another would be to abandon the 'screen' and embrace the 'browser' (and/or
web services) and in the process remove the user interface entirely from
your COBOL legacy applications. You may accomplish this by using the
RM/COBOL based application server:
Xcentrisity Business Information Server (BIS).
http://www.liant.com/products/bis/

Best regards,
Tom Morrison
www.liant.com


Frederico Fonseca

2004-12-16, 8:55 am

On Sat, 11 Dec 2004 18:54:24 GMT, Buck Black <Buck.Black@virgin.net>
wrote:

>On Sat, 11 Dec 2004 18:01:05 +0000, Frederico Fonseca
><real-email-in-msg-spam@email.com> wrote:
>
>
>An example of the kind of functionality we are looking to implement is
>to redisplay a screen when a value entered via that screen fails a
>validation check; to return control *directly to the field containing
>the errant value* (possibly changing the color attributes to white
>text/red background, for example).
>
>We would also like to implement a moving bar menu *without accepting*
>the screen at any point, prior to selecting a menu option thru an
>exception key press.
>
>I know its possible to do any of this very easily using Acucobol
>products.
>
>Unfortunately, this is not an option. We're stuck with the RM system.

If you use either of the products I mentioned you can do this.

I personally prefer SP2 from Flexus, but COBOL-WOW is also good.
Preference has to do with the way you code with them.

With SP2 you can have your programs working in either character mode
or GUI mode, and both products allow you to use a web/think client
mode.

You can download SP2 from www.flexus.com (assuming you have a windows
runtime), and you can ask your COBOL representative for an evaluation
of COBOL-WOW.

>
>Thank's for your suggestions.
>




Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
Pete Dashwood

2004-12-17, 8:55 am


"Tom Morrison" <t.morrison@liant.com> wrote in message
news:9gkvd.43426$Al3.10284@newssvr30.news.prodigy.com...
> "Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message
> news:t9dmr0p5ses3kr2dp5h5p50de16hasmtss@
4ax.com...
>
> Totally agree! This would accomplish the shift from one 1970s user
> interface to another.
>
>
> Either of these two suggestions would do the job.
>
> Another would be to abandon the 'screen' and embrace the 'browser' (and/or
> web services) and in the process remove the user interface entirely from
> your COBOL legacy applications. You may accomplish this by using the
> RM/COBOL based application server:
> Xcentrisity Business Information Server (BIS).
> http://www.liant.com/products/bis/


That would be my favourite here. It doesn't really matter which software is
used (from our point of view <G> ), the important thing is to get a layer
that separates the presentation from the Business Logic.

Pete.



James J. Gavan

2004-12-17, 3:55 pm

Buck Black wrote:

>On Sat, 11 Dec 2004 18:01:05 +0000, Frederico Fonseca
><real-email-in-msg-spam@email.com> wrote:
>
>
>
>
>An example of the kind of functionality we are looking to implement is
>to redisplay a screen when a value entered via that screen fails a
>validation check; to return control *directly to the field containing
>the errant value* (possibly changing the color attributes to white
>text/red background, for example).
>
>We would also like to implement a moving bar menu *without accepting*
>the screen at any point, prior to selecting a menu option thru an
>exception key press.
>
>I know its possible to do any of this very easily using Acucobol
>products.
>
>Unfortunately, this is not an option. We're stuck with the RM system.
>
>Thank's for your suggestions.
>
>
>
>

OK so you are staying with RM/COBOL. I just double-checked the Liant
site and see that when you refer to Screen-Section you are talking
something very close to the current 2002 Standard. From the RM examples
I see that you can test for function and Escape key etc.

Background - I used a very *old* version of RM both on Radio Shack and
PCs, (now no longer supported by Liant). My statements were just
ACCEPTS, DISPLAYS with White on Black. Screen colouring was achieved by
screen painting tools, the latest being Flashup - but that just
'painted' a screen image - your data still showed as White on Black..

How far do you want to go with this - just 'tart' up your screens to
highlight errors, etc., or are you after further flexibility.
Suggestions already made - use WOW or SP2. Plus - *even more
importantly* - from Pete - segregate you Screens into separate CALLs to
ancillary programs.. Back when I used it my Procedures were an
inter-mingled mess of Business Logic and screen instructions. I've
learned better since :-) .

Depends, as I said above, how far you want to go. If you just want to
'add a bit of colour' - and you will have to check with Tom Morrison of
Liant - my old compiler had a colour routine, which I never used :-

O/S : MSDOS 2.n, RM/COBOL V 2.0 and the Doc # CT032, which is about
routines written in Assembler. Example COBOL code :-

CALL 'COLORCNG.COM' USING FOREGROUND-COLOR, BACKGROUND-COLOR.
CALL 'BORDERCNG.COM' USING BORDER-COLOR

If still available and compatible with your latest RM compiler, (and O/S
of course) - that might do the trick as a 'quickie'. Failing that, then
I would suggest you most certainly are looking at new code to
accommodate either WOW or SP2. Whichever route you go - consider hiving
off your screen routines.

Jimmy, Calgary AB
Sponsored Links







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

Copyright 2008 codecomments.com