cobol >> Cobol / Linux / X-Windows

by Paul » Sun, 15 Feb 2009 12:53:13 GMT

Oh how do I get myself into nasty little messes like this?
A friend of mine was laid off from his job (damn bank!)
and is now getting in pretty desparate straights. So he took
a consulting job - on spec no less - and has been handed a mess.

His project is to port some old PrimeOS (!!) Cobol code to Linux.
So I gave him an x86 box with Linux and OpenCOBOL installed on it.
And he was off. Till the buggers he contracted with sprung a surprise on
him - they are demanding that he produce a Linux GUI.

(damn bank! damn bank#2!)

Does anyone have any experience with hooking OpenCOBOL into
XWindows? And if so, would you be willing to share a few tips
with me on how to go about doing it??

Ill help him do this someway or another, by hooking in C wrapper
routines if I have to, but I sure would like to avoid taking all the time
to do that if there is a faster way. I am a bit in overload myself right
now... :(

<mutter> PrimeOS! In 2009. To XWindows!
Unbelievable...<cuss>*(*&@&#!</cuss></mutter>
Thanks
-Paul



cobol >> Cobol / Linux / X-Windows

by William M. Klein » Sun, 15 Feb 2009 14:26:38 GMT


Have you tried asking this at:
http://www.opencobol.org/

If anyone could help you, I would think they might. There is also a list for
the project that might have some ideas. See:
https://lists.sourceforge.net/lists/listinfo/open-cobol-list

*OBVIOUSLY* if the end-user (bank) were to pay for it, going with one of the
"commercial" compilers (e.g. Fujitsu, Micro Focus - or the "AcuCOBOL" part of
Micro Focus) would give him INSTANT support for GUI's under Linux. However,
those are not cheap.

--
Bill Klein
wmklein <at> ix.netcom.com







cobol >> Cobol / Linux / X-Windows

by Paul » Sun, 15 Feb 2009 18:44:29 GMT

On 2009-02-15 00:26:38 -0600, "William M. Klein"
< XXXX@XXXXX.COM > said:


I scanned the web site Bill, but I didn't find a good answer. A good
bit of religion, but
nobody that had actually used it. Besides, I am far more used to seeing
real answers
from this group. :)

I would move him to MicroFocus in an instant, but the customer won't
pay, and $22K
per server is a bit high for my charity budget at this point. Besides,
I am not at all
sure Microfocus is even supporting GUI under LInux- they seem to be pretty
Windows Centric lately- with .NET being their primary target.

Thanks -Paul




Cobol / Linux / X-Windows

by HeyBub » Mon, 16 Feb 2009 01:52:36 GMT




When the customer changes the specs, that changes the price.




Cobol / Linux / X-Windows

by billg999 » Mon, 16 Feb 2009 02:03:57 GMT

In article <4997f20d$0$5469$ XXXX@XXXXX.COM >,
Paul < XXXX@XXXXX.COM > writes:

Well, to be sure, the info is a little sketchy but having worked with
Primes quite a bit in a previous life I can guess at the complexity and
UI that the programs might have. That being said, how about just porting
the programs and then putting a TK/TCL frontend on them to provide the
GUI?

bill

--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
XXXX@XXXXX.COM | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>


Cobol / Linux / X-Windows

by Richard » Mon, 16 Feb 2009 02:58:09 GMT




As long as he is paid by the hour and can push the 'go live' date out
appropriately as the changes to the spec arrive then he probably can
spin this out until retirement (or even after).



Generally text mode screens are 'program driven', that is the program
determines the sequence of interactions with the user. GUIs are
usually event driven, the user indicates what should happen.

This is not just changing the face of the application, it is changing
the way the program works, and often means a rewrite unless the
program was written originally to cope with such a change.

For GUIs on Linux I use Glade, but I haven't done this with Cobol yet,
I do it with Python. Glade has a designer which draws the screens and
generates an XML file of these. The program then 'just' has to call
glade to draw the screens and link the events to code. With Python/
Glade it just works on Linux, Windows, and my pocket computer.

I would be more inclined with Cobol to make the system run as web-
based 'in the cloud', The GUI will be frames and forms in tables with
Ajax validating the fields and lookups back to the OpenCobol code
running under Apache.

Of course this is also a complete rewrite and uses several languages
(HTML, JavaScript, Cobol).



Cobol / Linux / X-Windows

by Paul » Mon, 16 Feb 2009 09:37:00 GMT

On 2009-02-15 12:03:57 -0600, XXXX@XXXXX.COM (Bill Gunshannon) said:


That is an excellent idea- you wouldn't happen to have an example of doing just
that laying around you would be willing to share would you? :)

I had forgotten about TK/TCL. That might just be the very best way to do it.

-Paul



Cobol / Linux / X-Windows

by Paul » Mon, 16 Feb 2009 09:40:00 GMT

On 2009-02-15 11:52:36 -0600, "HeyBub" < XXXX@XXXXX.COM > said:



If it was me, especially in this case, it would cancel the whole deal.
(damn bank!)

But Kyle ain't me, and he has two small kids and a mortgage. I won't comment
on why he would work for people so - dishonorable. He feels that he is very
desperate. (damn bank!)

-Paul



Cobol / Linux / X-Windows

by Paul » Mon, 16 Feb 2009 09:43:59 GMT

On 2009-02-15 12:58:09 -0600, Richard < XXXX@XXXXX.COM > said:



MMM- an Ajax based screen does have a lot of advantages. It is pseudo
conversational, and much more similar to a green screen than a normal
GUI. Probably less rewrite in the code.

I think a couple of us could put together web screens quickly enough,
and OpenCOBOL deals well with web CGI programs.

This is worth thinking. Hopefully they will buy off on that. Maybe then
he could spin it into a client/server on Windows or MacOS or something
he can charge a lot more money for.

Thanks -

-Paul



Cobol / Linux / X-Windows

by docdwarf » Mon, 16 Feb 2009 10:22:15 GMT

In article <4998c3f0$0$5463$ XXXX@XXXXX.COM >,



[snip]


If it were I, in most cases, I would use the subjunctive... and cancel the
deal. I do not contract to paint a shed and then get told 'Oh, and while
you're at it - and and no change in price, of course - do the rest of the
house'.

Contracts (when properly written) protect all parties involved.


He also has specifications - I am assuming this is what is intended by 'on
spec' - and as a result is bound, by law and contract, to meet them...
*not* them and the 'and while you're at it'.

DD


Cobol / Linux / X-Windows

by Rene_Surop » Mon, 16 Feb 2009 14:01:45 GMT

>

Hi Paul,

If I am going to port my Windows (MF) Cobol GUI to Linux, this is
simply no conversion at all. Ubuntu Linux runs with "Wine" application
from within the Linux OS. So simply install the application using
Wine.... of course with MF, you need to install Application Server
module as well.

Tried running MF Cobol application from it and it works well. I do not
know OpenCOBOL though, but if you can manage to have a Cobol-GUI in
Windows using OpenCobol... might as well install it using wine and add
your application. No need of "OS-porting", it is all compatible in
Linux Wine.


Rene


Cobol / Linux / X-Windows

by Vaclav Snajdr » Mon, 16 Feb 2009 18:24:24 GMT

www.magro-soft.com has built an interface between Cobol and Tcl/Tk for GUI.
I know the his version MF-Cobol <--> Tcl/Tk.





--
Vaclav Snajdr


Cobol / Linux / X-Windows

by billg999 » Mon, 16 Feb 2009 21:23:05 GMT

In article <4998c33c$0$5499$ XXXX@XXXXX.COM >,
Paul < XXXX@XXXXX.COM > writes:

Well, I don't, but ecven if I had examples laying aroiund there has hardly
been enough info about the project provided for anyone to post a reasonable
example of how to do it. I just threw that out as an option. Even the
concept GUI is undefined. If a Web interface is considered an acceptable
"Linux GUI" it is even easier as OpenCOBOL works find for CGI.

bill

--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
XXXX@XXXXX.COM | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>


Cobol / Linux / X-Windows

by PR » Mon, 16 Feb 2009 23:22:43 GMT



> P<ul write>: >> >> >>> > > On 2009-02-15 12:03:57 -0600, XXXX@XXXXX.COM (Bill Gunshannon) sai>: >>>>> >> In arti<le <4997f20d$0$5469$ XXXX@XXXXX.COM >net>,>>> >> lt;aul wr>t>>>
> >>> On 2009-02-15 00:26:38 -0600, "William M. K>e>>> <> >>> < XXXX@XXXXX.COM >om.com> >ai>:>>>> > >>>> Have you tried asking thi> >>>> > >>>> http://www.opencobol >or>/>>>> > >>>> If anyone could help you, I would think they might. here is also a lis> >>>> > >>>> the project that might have some ideas.>S>>>> > >>>>https://lists.sourceforge.net/lists/listinfo/open-cobol>li>t>>>> > >>>> *OBVIOUSLY* if the end-user (bank) were to pay for it, going with one o> >>>> > >>>> "commercial" compilers (e.g. Fujitsu, Micro Focus - or the "AcuCOBOL" pa>t>>>> > >>>> Micro Focus) would give him INSTANT support for GUI's under Linux. ow>v>>>> > >>>> those are not c>ea>.>>>
> >>> I scanned the web site Bill, but I didn't find a good answer. A>g>>>
> >>> bit of religion> >>>
> >>> nobody that had actually used it. Besides, I am far more used to s>e>>>
> >>> real an>w>>>
> >>> from this grou>. >)>>>
> >>> I would move him to MicroFocus in an instant, but the customer >o>>>
> >>> pay, and>$>>>
> >>> per server is a bit high for my charity budget at this point. es>d>>>
> >>> I am not a> >>>
> >>> sure Microfocus is even supporting GUI under LInux- they seem to be p>e>>>
> >>> Windows Centric lately- with .NET being their primary ta>ge>.>>>
> >> Well, to be sure, the info is a little sketchy but having worked>w>>h
> >> Primes quite a bit in a previous life I can guess at the complexit> >>d
> >> UI that the programs might have. hat being said, how about just po>t>>g
> >> the programs and then putting a TK/TCL frontend on them to provid> >>e
> >>>GU>?>>>
> >>>bi>l> >
> > That is an excellent idea- you wouldn't happen to have an example of doing>j>st
> > that laying around you would be willing to share would yo>? >)> >
> > I had forgotten about TK/TCL. That might just be the very best way to d> i>.
>
> Well, I don't, but ecven if I had examples laying aroiund there has h>rdly
> been enough info about the project provided for anyone to post a reaso>able
> example of how to do it. just threw that out as an option. ve> the
> concept GUI is undefined. f a Web interface is considered an accep>able
> "Linux GUI" it is even easier as OpenCOBOL works find for>CG>.
>
>>bi>l
> >> --
> Bill Gunshannon e-moc-ra-cy (di mok' ra see) n. hr>e wolves
> XXXX@XXXXX.COM | nd a sheep voting on what's fo> dinner.
> University of Sc>anton |
> Scranton, Pennsylvania | #include >std.disclaimer.h>
Okay Bill - how about a screen that sets up one input field, edit
checked to be numeric, and displays a text message after the user hits
enter.

-Paul



Cobol / Linux / X-Windows

by btiffin » Tue, 17 Feb 2009 04:42:08 GMT

n Feb 16, 10:22m, PR < XXXX@XXXXX.COM > wrote:
> > >> Well, to be sure, the info is a little sketchy but having worked>w>t>> > > >> Primes quite a bit in a previous life I can guess at the complexit> >n>> > > >> UI that the programs might have. hat being said, how about just po>t>n>> > > >> the programs and then putting a TK/TCL frontend on them to provid> >h>> > > >>>GU>?> > > >>>bi>l> > > > That is an excellent idea- you wouldn't happen to have an example of doing>j>s>
> > > that laying around you would be willing to share would yo>? >)> > > > I had forgotten about TK/TCL. That might just be the very best way to d> i>.> >
> > Well, I don't, but ecven if I had examples laying aroiund there has h>r>ly
> > been enough info about the project provided for anyone to post a reaso>a>le
> > example of how to do it. just threw that out as an option. ve> >he
> > concept GUI is undefined. f a Web interface is considered an accep>a>le
> > "Linux GUI" it is even easier as OpenCOBOL works find for>CG>.> >
> >>bi>l> >
>>>>--
> > Bill Gunshannon e-moc-ra-cy (di mok' ra see) n.. hr>e>wolves
> > XXXX@XXXXX.COM | nd a sheep voting on what's fo> >inner.
> > University of Sc>a>ton |
> > Scranton, Pennsylvania | #include >std>di>claimer.h> >
> Okay Bill - how about a screen that sets up one i>put field, edit
> checked to be numeric, and displays a text message aft>r the use> h>ts
> enter.
>
> -Paul

Not replying for Bill. But I've done a little bit with GTK+ for
OpenCOBOL. The plan is a near full on binding to the GnomeToolKit,
but for now. Buttons, Labels, Menus, File Dialog, a Calendar widget
(and a few odds and sods), enough for simple but fully functional
GUIs.

A sample screenshot and some source code can be seen at
http://add1tocobol.com/tiki-index.php?page=GTK+Sample

We've also taken Rildo's Tcl/Tk engine from TinyCOBOL and interfaced
that into OpenCOBOL as well. For that layer most of the GUI work is
squarely on the Tk side.

Cheers,
Brian


Similar Threads

1. Find Microfocus Cobol for linux o for windows

I have an old....ancient version of Microfocus V.3.2.37 and it running
under sco unix 3.2.4
From 2000 I used this version under RedHat Linux using abi-ibcs for the
binaries compatibility.
Now I would change this version so I can install Debian Etch or other,
if this is non possibile Windows XP is the same.
All the software is not graphic I want only runtime, compiler and debug
(animator). OK I would to known how much it cost (about) a version of a
Cobol Microfocus compatible because I want to buy.
Thanks and excuse me for my english

2. Remote Xwindows on a Windows computer.

3. RHEL4 Linux/MF CObol precompiler question-

Hi-

   We're migating our OS from AIX (Oracle 9.2.0.6 & MF Cobol) to RHEL 4
(Oracle 10.2.0.1, also MF Cobol).  Every program that compiles and runs
on AIX seems to do the same on RHEL4. Every program except one, where 
the precompiler seems to be having a problem rejecting some (but not 
all!) sql exec directives:

-----------------------------------------------------------------------------
Error at line 1081, column 12 in file SZBDBRG.pco
            exec sql
...........1
PCB-S-00576, PLS-428: an INTO clause is expected in this SELECT statement
Error at line 1081, column 12 in file SZBDBRG.pco
            exec sql
...........1
PCB-S-00576, PLS-0: SQL Statement ignored
Error at line 1097, column 12 in file SZBDBRG.pco
            exec sql
...........1
-----------------------------------------------------------------------------


the source code segment:
-----------------------------------------------------------------------------
01078       *     move ws-spriden-id to stuid.
01079            move ws-sourceid to ws-instid.
01080
01081            exec sql
01082              select stvsubj_code
01083              from   stvsubj
01084              where  rpad(stvsubj_code,4,' ') =:ws-shrtrce-subjcode
01085            end-exec.
01086            if sqlcode <> 0
01087              move 'N' to inst-validflag
01088              string 'Subject code not found in STVSUBJ table:' ',
01089              ws-shrtrce-subjcode delimited by size into ws-table
0---------------------------------------------------------------------------


Not sure what's going on..any ideas?

thanks in advance...
bill

4. Will Linux on the mainframe kill COBOL?

5. RM/COBOL 6.61.00 for Linux and terminfo

Hi,

I have the hard task of making a legacy cobol application that was
running on a DEC alpha with linux work on a x86 box running centos
linux (the freee variant of Redhat enterprise linux).

After many shell scripts edited, some TERM's experimented I'm now able
to start the application in full color, use the function keys and even
the Up and down directional keys.

The only keys NOT working are the left/right keys.

I've tried it all... infocmp in that old alpha says kcub1 is ^K and
kcuf1 is ^Y (from my head, not sure), in the new x86 they are \E]D and
\e]C, got the values from vi (using the Ctrl+V thing). I tried to set
the TERMINFO envvar to a temp dir, infocmp > myterm.ti, changed those
values (kcub1, kcuf1) to the diff values I've seen but they never
worked.

I've tried using putty and the old software that was being used to
access the alpha -- AniTA, none of them work.

I've also insisted on vt220 (this is the value reported by "echo $TERM"
when I login to the alpha) and then started experimenting others like
xterm, xterm-color, linux, at386, ansi, etc...

There must be a really easy way of making those keys work, anyone could
help me?

Thanks in advance.

6. Cobol Compiler for Linux Kernel 2.0

7. MF Cobol under Linux?

Hello.  We are looking into changing platform for our Micro Focus Cobol 
applications.  We are currently using an IBM AIX 5.3 platform.  Is it 
possible to port all our Cobol programs to run under Linux?  Is there a 
Server Express for Linux? 


8. does graphics cobol for linux exist???