Re: Converting Vplus to .Net - Hewlett Packard

This is a discussion on Re: Converting Vplus to .Net - Hewlett Packard ; So, if I understand correctly, you will replace the HP3K with Fujitsu on the backend? Fujitsu COBOL has a WinForms designer that allows you to basically create the forms very quickly, and they of course run in .NET. You would ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Converting Vplus to .Net

  1. Re: Converting Vplus to .Net

    So, if I understand correctly, you will replace the HP3K with Fujitsu on the backend?

    Fujitsu COBOL has a WinForms designer that allows you to basically create the forms very quickly, and they of course run in .NET.
    You would need to recode small parts of your application to use input and output records (or some similar technique) to the screens.
    But honestly, you would find this far easier than trying to emulate the VPLUS calls - albeit, it is not a terribly difficult task to do so.

    However, I think you might be a but unfamiliar with the Windows world, based upon the code below. You never need to put the program in a loop looking for a keypress like that, you would simply write a code "snippet" and attach it to the handler for the screen. Sounds a little weird, I admit, but quite easy to do.

    Note that you don't need to actually write the GUI screens in COBOL at all; you can do the screens very quickly in Visual Basic or some such and have then call the backend Fujitsu COBOL programs. Visual Basic is *easy* to draw screens in. Very shallow learning curse.


    -Paul



    On Tuesday, October 21, 2008, at 08:26AM, "Dave Vorgang" wrote:
    >Hi All,
    >
    >I have just began working on this project for converting our existing HP3000 Vplus screens to use Fujitsu Cobol on backend and use .Net for the forms.
    >
    >What I plan to do is create routines to emulate the Vplus intrinsics. For example, I have this routine to display the form:
    >
    > Private WithEvents _VFormFile As VplusBaseScreen.BaseFormMain
    >
    > Public Function VshowForm(ByVal comArea As ComAreaDefinition) As Boolean
    > _VFormFile.LoadScreen(_CurrentScreen)
    > _VFormFile.Show()
    > End Function
    >
    >
    >Then, this routine would perform the Vreadfields which basically blocks execution of my application until _KeyEntered = True
    >
    > Public Function VreadFields(ByVal comArea As ComAreaDefinition) As Boolean
    > _VFormFile.Focus()
    > _KeyEntered = False
    > Do Until _KeyEntered
    > System.Windows.Forms.Application.DoEvents()
    > Loop
    >
    > End Function
    >
    >Then, the form will raise events and set _KeyEntered = True when there is user interaction and the main process will catch those events like this:
    > Private Sub _VFormFile_LastKeyPressed(ByVal key As Integer) Handles _VFormFile.LastKeyPressed
    > _KeyEntered = True
    > RaiseEvent LastKeyPressed(key)
    > End Sub
    >The above routine just raises the event back to its caller.
    >
    >This approach actually works but the Do Loop take 25% of the cpu.
    >
    >Now I know this is the HP3000 listserv but I thought I would give it a shot since some may have tried to accomplish what I am trying to do.
    >
    >So, my question is: Is there a better way to accomplish what I'm trying to do? Can/How would I place this on a different thread (if that's a way I should do it).
    >
    >
    >Thanks,
    >
    >Dave Vorgang
    >Senior Programmer / Analyst
    >Medford School District - Information Technology
    >(541) 842-1021
    >mailtoave.Vorgang@Medford.k12.or.usave.Vorgang@Medford.k12.or.us>
    >
    >
    >* To join/leave the list, search archives, change list settings, *
    >* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
    >
    >


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


  2. Re: Converting Vplus to .Net

    Hi Paul,

    We are planning on moving our cobol apps and image databases from hp3000 towindows and using vb.net forms to replace the vplus screens. We will use sql server to replace image.

    The Fujitsu cobol for winforms does not appear to work within visual studioand does not generate IL code. The way Fujitsu names their products is somewhat confusing. The actual product name I think your referring to is 'NetCOBOL for Windows' which, ironically, is not for .Net. Their other product called 'NetCOBOL for .Net' (http://www.adtools.com/products/index.htm) is for .Net.

    So, in my code from the original post, _VFormFile is a base form that all my other forms derive from. The Overridable LoadScreen method simply initializes some information on the form (not yet displayed) and the Show method displayes the form. I need it to somehow block at the Show method and thenin the _VFormFile I raise an event that I capture in the calling routine. I did try using a ShowDialog but I had problems communicating back to the called form.

    Can you elaborate on adding a code snippet that would attach a handler to the screen?

    Thanks you,

    Dave Vorgang
    Senior Programmer / Analyst
    Medford School District - Information Technology
    (541) 842-1021
    mailtoave.Vorgang@Medford.k12.or.us


    -----Original Message-----
    From: Paul Raulerson [mailtoaul.raulerson@mac.com]
    Sent: Tuesday, October 21, 2008 10:21 AM
    To: Dave Vorgang
    Cc: HP3000-L@RAVEN.UTC.EDU
    Subject: Re: [HP3000-L] Converting Vplus to .Net

    So, if I understand correctly, you will replace the HP3K with Fujitsu on the backend?

    Fujitsu COBOL has a WinForms designer that allows you to basically create the forms very quickly, and they of course run in .NET.
    You would need to recode small parts of your application to use input and output records (or some similar technique) to the screens.
    But honestly, you would find this far easier than trying to emulate the VPLUS calls - albeit, it is not a terribly difficult task to do so.

    However, I think you might be a but unfamiliar with the Windows world, based upon the code below. You never need to put the program in a loop looking for a keypress like that, you would simply write a code "snippet" and attach it to the handler for the screen. Sounds a little weird, I admit, but quite easy to do.

    Note that you don't need to actually write the GUI screens in COBOL at all;you can do the screens very quickly in Visual Basic or some such and have then call the backend Fujitsu COBOL programs. Visual Basic is *easy* to draw screens in. Very shallow learning curse.


    -Paul



    On Tuesday, October 21, 2008, at 08:26AM, "Dave Vorgang" wrote:
    >Hi All,
    >
    >I have just began working on this project for converting our existing HP3000 Vplus screens to use Fujitsu Cobol on backend and use .Net for the forms..
    >
    >What I plan to do is create routines to emulate the Vplus intrinsics. Forexample, I have this routine to display the form:
    >
    > Private WithEvents _VFormFile As VplusBaseScreen.BaseFormMain
    >
    > Public Function VshowForm(ByVal comArea As ComAreaDefinition) As Boolean
    > _VFormFile.LoadScreen(_CurrentScreen)
    > _VFormFile.Show()
    > End Function
    >
    >
    >Then, this routine would perform the Vreadfields which basically blocks execution of my application until _KeyEntered = True
    >
    > Public Function VreadFields(ByVal comArea As ComAreaDefinition) As Boolean
    > _VFormFile.Focus()
    > _KeyEntered = False
    > Do Until _KeyEntered
    > System.Windows.Forms.Application.DoEvents()
    > Loop
    >
    > End Function
    >
    >Then, the form will raise events and set _KeyEntered = True when there is user interaction and the main process will catch those events like this:
    > Private Sub _VFormFile_LastKeyPressed(ByVal key As Integer) Handles _VFormFile.LastKeyPressed
    > _KeyEntered = True
    > RaiseEvent LastKeyPressed(key)
    > End Sub
    >The above routine just raises the event back to its caller.
    >
    >This approach actually works but the Do Loop take 25% of the cpu.
    >
    >Now I know this is the HP3000 listserv but I thought I would give it a shot since some may have tried to accomplish what I am trying to do.
    >
    >So, my question is: Is there a better way to accomplish what I'm trying to do? Can/How would I place this on a different thread (if that's a way I should do it).
    >
    >
    >Thanks,
    >
    >Dave Vorgang
    >Senior Programmer / Analyst
    >Medford School District - Information Technology
    >(541) 842-1021
    >mailtoave.Vorgang@Medford.k12.or.usave.Vorgang@Medford..k12.or.us>
    >
    >
    >* To join/leave the list, search archives, change list settings, *
    >* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
    >
    >


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


+ Reply to Thread