HP3000-L Archives

October 2008, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Paul Raulerson <[log in to unmask]>
Reply To:
Paul Raulerson <[log in to unmask]>
Date:
Tue, 21 Oct 2008 12:20:52 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (125 lines)
 
Sure Dave. In your case, I recommend Visual Basic to do the forms and then simply call your business logic (written in Fujitsu Cobol that generates .NET code... :) . It is a departure indeed from the very cool way of doing it on an HP3K, but it will get you where you need to go faster.  

Note please- as a general rule I don't think it is a good idea to move to windows solution like this, but that is just my opinion. :) 

Here's a link to download Visual Basic Express (costs  = $0.00). On this page, you will find some pretty cool links, including a getting started video and links to the VB forums.  Do not let the much overused Microsoft jargon fool or confuse you by the way. 

http://msdn.microsoft.com/en-us/beginner/bb964633.aspx

The Windows form designer is what you will probably like the most, at least at first. Your .NEt based COBOL programs will all be callable, with parameters, from any other .NET based language. Or conversely, you will be able to call the screens from COBOL, but I think you will find that working backwards from the screens works the best in Windows.

I'll send you a code fragment of a screen file later this evening, after I get home. 

Yours, 
-Paul






On Tuesday, October 21, 2008, at 11:05AM, "Dave Vorgang" <[log in to unmask]> wrote:
>Hi Paul,
>
>We are planning on moving our cobol apps and image databases from hp3000 to windows 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 studio and 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 then in 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
>mailto:[log in to unmask]
>
>
>-----Original Message-----
>From: Paul Raulerson [mailto:[log in to unmask]]
>Sent: Tuesday, October 21, 2008 10:21 AM
>To: Dave Vorgang
>Cc: [log in to unmask]
>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" <[log in to unmask]> 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
>>mailto:[log in to unmask]<BLOCKED::mailto:[log in to unmask]>
>>
>>
>>* 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 *
>
>

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

ATOM RSS1 RSS2