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-18, 12:46 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
| |
| Frederico Fonseca 2004-12-18, 12:46 pm |
| On Sat, 11 Dec 2004 17:14:31 GMT, Buck Black <Buck.Black@virgin.net>
wrote:
>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.
First suggestion is DON'T DO IT.
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.
Apart from the above it would help if you told us what you expect to
achive with this conversion to Screen Section, and also whether you
are staying with the RM/COBOL compiler or if you are swapping to other
vendor.
Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
| |
| Richard 2004-12-18, 12:46 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.
| |
| Buck Black 2004-12-18, 12:46 pm |
| On Sat, 11 Dec 2004 18:01:05 +0000, Frederico Fonseca
<real-email-in-msg-spam@email.com> wrote:
>On Sat, 11 Dec 2004 17:14:31 GMT, Buck Black <Buck.Black@virgin.net>
>wrote:
>
>First suggestion is DON'T DO IT.
>
>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.
>
>Apart from the above it would help if you told us what you expect to
>achive with this conversion to Screen Section, and also whether you
>are staying with the RM/COBOL compiler or if you are swapping to other
>vendor.
>
>
>
>
>Frederico Fonseca
>ema il: frederico_fonseca at syssoft-int.com
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.
|
|
|
|
|