Highlighted
Absent Member.
Absent Member.
1095 views

Screen Sections Borders

Jump to solution

First time working with screen sections. Used to be in a mainframe environment. 

Testing a very simple program. Using Visual COBOL for Eclipse. Works within the PC environment but not in the UNIX environment. 

For Windows.

┌────────────────────────────────┐
│                                │
│ Empl nr: 0000                  │
│                                │
│ Password:                      │
│                                │
└── Staff number and Password ───┘

For Unix,  the borders are messed up.

ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
3                                3
3 Empl nr: 0000                  3
3                                3
3 Password:                      3
3                                3
@DD Staff number and Password DDDY

Program is re-compiled in the UNIX environment.

Program source

$set preprocess(window1)
IDENTIFICATION DIVISION.
PROGRAM-ID. MFSCREENTEST.
AUTHOR. RP.
DATE-WRITTEN. NOV 16.
ENVIRONMENT DIVISION.
DATA DIVISION.
working-storage section.
78 note-height value 6.
78 note-width value 32.
78 no-of-chars value note-height * note-width.
01 note-window pic x(10).

01 note-data value " - - ".
03 note-char pic x occurs no-of-chars.

01 data-from-screen.
03 sc-stf-key pic 9(04).
03 sc-password pic x(10).

01 WORKAREAS.
05 WS-ACCEPT-2 PIC ZZ.

screen section.
01 input-data highlight.
03 line 3 column 6 value " Empl nr: ".

03 scr-in-stf-key line 03 col 17
pic 9999 to sc-stf-key.
03 line 5 column 6 value " Password: ".
03 scr-in-password line 05 col 17 NO-ECHO
pic x(10) to sc-password.

01 note-screen pic x(no-of-chars)
using note-data prompt " ".

procedure division.

* call "cbl_debugbreak"

* Put a blank window on the screen with a border and title
display window, line 4, column 14, lines note-height,
size note-width, boxed, erase
* Define a reference for this window so that it can be removed
* and the previous display restored
pop-up area is note-window
bottom centered title "Staff number and Password"

* Fill the window with the contents of note-screen
display note-screen

display input-data
accept scr-in-stf-key
accept scr-in-password

close window note-window.

stop run.

What must I do to get the borders to display correctly in the UNIX world? Rest of the program does work as it should. Its just the borders. 

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Screen Sections Borders

Jump to solution

Hello RiaanP:

On Unix/Linux, terminal emulation must be configured in order for the borders and line-drawing to work.  The configuration depends on which terminal emulator you are using.

Set the environment variable TERM to an appropriate value in the environment of the user (for example in the user's .profile), and also make appropriate settings in the terminal emulator's configuration.  Here is a link into the documentation:

documentation.microfocus.com/.../GUID-F5E9CB1E-242E-4FD6-A2CF-BA121856063A.html

Here is a documentation link to the general topic of the Terminfo Database and Terminal Devices on UNIX/Linux:

documentation.microfocus.com/.../BKCYCYTERM.html

Let me know whether these suggestions work.  If not, open a support incident through your login at supportline.microfocus.com.  Specify the version of Visual COBOL you are using, and the version of UNIX/Linux, and the particular terminal emulator.

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Screen Sections Borders

Jump to solution

Hello RiaanP:

On Unix/Linux, terminal emulation must be configured in order for the borders and line-drawing to work.  The configuration depends on which terminal emulator you are using.

Set the environment variable TERM to an appropriate value in the environment of the user (for example in the user's .profile), and also make appropriate settings in the terminal emulator's configuration.  Here is a link into the documentation:

documentation.microfocus.com/.../GUID-F5E9CB1E-242E-4FD6-A2CF-BA121856063A.html

Here is a documentation link to the general topic of the Terminfo Database and Terminal Devices on UNIX/Linux:

documentation.microfocus.com/.../BKCYCYTERM.html

Let me know whether these suggestions work.  If not, open a support incident through your login at supportline.microfocus.com.  Specify the version of Visual COBOL you are using, and the version of UNIX/Linux, and the particular terminal emulator.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.