| By Anatoly Krivitsky | Article Rating: |
|
| November 9, 2006 11:00 AM EST | Reads: |
12,207 |
The program is written with VB.Net (compatible with VB.Net 2003 and 2005); VB.Net 2005 professional edition was used to develop and compile the program. However, nothing will prevent you from compiling it using the free Visual Basic 2005 express edition.
To call G77 from Crimson (or VS.Net if it is already installed on your PC), the program emulates the user who is typing within CygWin by doing the following:
- Starting CygWin
- Sending appropriate keystrokes to CygWin for calling G77
- Redirecting G77 standard output and errors (if any) into special variables
- Closing CygWin
- Calling Notepad and filling it out with G77 errors (if any)
Similar functionality probably can be achieved with other languages (for instance, with Java using java.awt.Robot for sending keys and using other means to redirect G77 standard output and errors, etc.), but as we work under Windows XP within this article, you may find that using VB.Net is more convenient. The source code for the program is given in Listing 1.
There are several hard-coded values that are used within the program. Most will be correct (for instance, the hard-coded location for CygWin), but others will need to be adjusted (like the name of your CygWin home directory).
It is assumed that the code (received from the mainframe as described earlier) will be placed under any subdirectory of your CygWin home directory. This assumption works for me. However, the program can easily be adjusted, if needed, to work with a directory from any reasonable location. (Please keep in mind that CygWin, like any software, has its own limitations.)
Use of the program within Crimson and VS.Net 2005 is simple and illustrated in Figures 1 and 2. What you need to do is put the executable file of the program (the name used in this article is: SendingKeysToCygwinAndRedirectOut.exe) under some directory of your choice that you may want to include in Windows XP path (in this article, it is C:\G77Start). Next, include the needed calls in your Tools | Conf. User tools for Crimson (See Figure 1) or Tools | External tools for VS.Net 2005 (See Figure 2). In this article, the menu text for the call is G77start. At this point, you may call G77 within CygWin from Crimson or from VS.Net 2005 by selecting Tools | G77start, and you will see the results in Notepad.
To test this technique, you may use my file for performance measurement (dwhet.f from www.myjavaserver.com/~akrivitsky/G77.html). First, use it "as is" within Crimson or VS.Net 2005. In this case, no meaningful error message will be returned. Second, copy this file to dwhet_error.f, and, within Crimson or VS.Net 2005, type the word "error" in the place of your choice. In this case, you will obtain the appropriate error message from G77.
Note that similar techniques can be applied to programs written in C, or any other legacy application language, with appropriate compilers that exist both in mainframes and CygWin.
What Was Done
The described technology that is
based on free and open sourced CygWin will allow (in many cases) the
migration of legacy applications from mainframes to PCs. The only thing
you need to purchase is Quick327- which is very cheap - if you don't
have it installed already. All other products used for the technology
are either free or require no additional investments, which makes the
described migration budget-friendly.
Resources
Published November 9, 2006 Reads 12,207
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Anatoly Krivitsky
Anatoly Krivitsky has a PhD in computer science and has more than 24 years of working experience in the IT field. He's the author of 20 published papers and books and five patents. For more information, please visit http://www.myjavaserver.com/~akrivitsky/index.html.
- 4th International Cloud Computing Conference & Expo Starts Today
- Publishing Synergy: Blog, Twitter and Ulitzer
- Performance Tuning Essentials for Java
- Cloud Expo New York Call for Papers Deadline December 15
- Google Wave
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Cloud Computing Can Revitalize Your Career as Software Developer
- SOA World Magazine "Readers' Choice Awards" Voting Is Now Open
- Oracle+MySQL Opponents Take to the Barricades
- Virtualization Expo Call for Papers Deadline December 15
- Oracle Faces Growing Price for MySQL
- SpringSource Moving to Spring 3.0
- 4th International Cloud Computing Conference & Expo Starts Today
- Deputy CIO of the CIA to Keynote 1st Annual GovIT Expo
- Publishing Synergy: Blog, Twitter and Ulitzer
- Performance Tuning Essentials for Java
- Cloud Expo New York Call for Papers Deadline December 15
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Google Wave
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Cloud Computing Can Revitalize Your Career as Software Developer
- Oracle-Sun: IBM Reportedly Behind Delay
- Citrix Aims To Cripple VMware’s Cloud Designs
- Oracle Trashes HP Relationship for Sun
- After Ubuntu, Windows Looks Increasingly Bad, Increasingly Archaic, Increasingly Unfriendly
- SCO CEO Posts Open Letter to the Open Source Community
- Simula Labs Launches Hosted Delivery Platform To Enable Enterprise Open Source Adoption
- Where Are RIA Technologies Headed in 2008?
- Source Claims SCO Will Sue Google
- How Open Is "Open"? – Industry Luminaries Join the Debate
- Latest SCO News is Plain Weird
- IBM Tells SCO Court It Can't Find AIX-on-Power Code
- SCO Claims Linux Lifted ELF
- Flashback: Investing in 'Professional Open Source' - Exclusive 2004 Interview with David Skok, Matrix Partners
- HP Starts Pushing Desktop Linux
- Linux Business Week Exclusive: Linux Kernel To Be Re-Written To Counter Microsoft FUD




























