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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RMCOBOL 85 usage of BACKGROUND-COLOR 2

Status
Not open for further replies.

SiouxCityElvis

Programmer
Jun 6, 2003
228
US
I am trying to use a DISPLAY statement with the BACKGROUND-COLOR attribute.

Example:
DISPLAY "HELLO WORLD" LINE 1 POSITION 1 BACKGROUND-COLOR = CYAN.

I get a 0414 compiler error with RMCOBOL 85 compiler version 5.27.00 for IBM RS/6000 for AIX 3.2 stating "statement has wrong format".

I don't know if this is due to my version of RMCOBOL 85 or what, but I've worked on RMCOBOL 85 in other shops on maintenance projects and was able to display using colors.

Anyone run into a similar challenge or know of a solution?

I did a keyword search of Background color attribute and didn't have any luck.

Thanks.
-David
 
a) correct
b) no. Terminfo entries are compiled using the terminfo compiler which is normally "tic". I am not sure which one is in AIX, but if you do "man terminfo" you should get the required information.
c) Almost. As I mentioned in one of the posts and if you use my file you should do
TERM=ansicobol;export TERM

d) If AIX has that command it will change your background color based in the value after the command which is
tput setb 1 (spaces between tput, setb and "1")

No blank screen, just a new line.

As for compiling the entry, if you set the variable
TERMINFO=$HOME/terminfo
(export TERMINFO after you set it)
and create the directory terminfo in your home directory, you can issue the command yourself without affecting the remaining of the system. You should have authority to do it this way.
 
fredericofonseca:

I couldn't get a clean compile.
I did the man terminfo but it said no entry for terminfo, tried it with terminfo.aix and said the same thing.

I compiled it anyway using tic ansicobol, but received an error that stated exactly:

tic: 1375-116 Line 12: Illegal terminal name - ''.
Terminal names must start with a letter or digit.

The line it is referring to(11) is:
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,

The only ' that I noticed was in LINE 11....

LINE 1 ansicobol|Ansi standard console for RMCOBOL,
LINE 2 am,
LINE 3 bce,
LINE 4 eo,
LINE 5 xon,
LINE 6 colors#8,
LINE 7 cols#80,
LINE 8 it#8,
LINE 9 lines#25,
LINE 10 pairs#64,

LINE 11 acsc=0[I|`ja0fxgqh2jYk?lZm@nEqDtCu4vAwBx3~y;;IIHH<<JJKKMM::LL99NN88UUTT>
>OOQQFF55XX77VVSS==PPRRGG66WW,

LINE 12 bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,

....


Line 11 is all one line, correct??
Any ideas why I'm getting this compile error.
 
My mistake. I forgot that AIX does not use the acsc variable.

Go to the rmcobol installation folder, edit the terminfo.aix and copy the string named &quot;box1&quot;, and use this one instead of acsc
 
I am still asleep!!

It also does not take the setb/setf parameters.
These are also in the terminfo.aix, and should be the ones defined as
colbxx
and
colfxx

If there is anyother error in the compilation just keep removing each individual variable (take note of them) and then post the ones that failed here.
 
I found box1 in the /usr/rmcobol/terminfo.aix file it was &quot;box1=lqkxjm,&quot;.

So, are you saying that I need to put
&quot;box1=lqkxjm,&quot; in place of the whole line 11 which is

acsc=0[I|`ja0fxgqh2jYk?lZm@nEqDtCu4vAwBx3~y;;IIHH<<JJKKMM::LL99NN88UUTT>
>OOQQFF55XX77VVSS==PPRRGG66WW,

????
Now, it would simply be &quot;box1=lqkxjm,&quot; is that correct?
This is in my ansicobol file you want the changes, right?
And remove setf=\E[3%p1%dm,
and setb=\E[4%p1%dm,
correct?

Remember, I was getting the 'tic' compiler error on the following line....
LINE 12 bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,

 
Update:

I got a clean compile by removing the ascs variable in my ansicobol file. This was done by removing the whole line

acsc=0[I|`ja0fxgqh2jYk?lZm@nEqDtCu4vAwBx3~y;;IIHH<<JJKKMM::LL99NN88UUTT>
>OOQQFF55XX77VVSS==PPRRGG66WW,

and replacing it with the box1=lqkxjm variable that was located in the terminfo.aix file.

Then, per your instructions, I commented out the setf and setb variables. Did a tic ansicobol after saving changes and had no errors come up.

Changed my emulator to &quot;ANSI&quot;. Logged off and exited, came back in, verified that my Emulator was still set to &quot;ANSI&quot; and did the TERM=ansicobol;export TERM at the prompt.

Went to run my application.

Problem:

The display statements do not show the values in the middle of the screen as they should, the colors don't show and it exits my program.

Basically what it looks like is that it is showing the display statements, not taking into account the ACCEPT statement for the user's selection off the menu(shown via display statements) and going to my exit subroutine.

Strange.
-David
 
I guess I should just stick with the AT386 emulator mode since it seems to work???
 
Terminal emulation is very trick sometimes. As a gool learning exercise for you I would try and change my terminfo so it works with you. Compare it to the one in the terminfo.aix, and see what is different, and try and figure out why one works and the other doesn't.

And yes you should probably stick with AT386, but you may need to change one of the color settings, as it is possible that you have the wrong AT386 version.
try and do a small COBOL program where you display each one of the colors associated with the color name, and see if they match.
 
Okay. I tried the various colors and they seem to work for the AT386 option.

Thanks for all the help on this.
-David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top