List of Listings


Chapter 6: The Nuts and Bolts of .NET Programming

Listing 6-1: Legacy Mainframe COBOL Code
Listing 6-2: COBOL .NET Program Showing Fields Being Declared
Listing 6-3: VB .NET Code Showing Two Approaches for the Declaration of Three Data Items
Listing 6-4: VB .NET Code Showing a Numeric Literal Being Moved into the Data Items
Listing 6-5: A COBOL .NET Sample Program Demonstrating the Use of Basic Syntax
Listing 6-6: A VB .NET Sample Program Demonstrating the Use of Basic Syntax
Listing 6-7: A Portion of the Original Sample DefineDataTypesSampleCobol Code
Listing 6-8: MSIL Code Snippet Taken from the ILDASM Utility Display

Chapter 7: The .NET Framework

Listing 7-1: Legacy COBOL Code Snippet Showing a Group Item Definition
Listing 7-2: The DayOfWeek Enumeration Declaration in C#
Listing 7-3: The DayOfWeek Enumeration Declaration in VB .NET
Listing 7-4: A COBOL .NET Sample Program Demonstrating the Use of the .NET Framework Objects
Listing 7-5: The Class Viewer Showing MyFirstClass
Listing 7-6: A VB .NET Sample Program Demonstrating the Use of the .NET Framework Objects
Listing 7-7: The Class Viewer Output Display
Listing 7-8: A Portion of the COBOL .NET Project File
Listing 7-9: The VB .NET Project File

Chapter 8: The .NET Common Language Runtime

Listing 8-1: COBOL .NET Example of How the CLR Promotes Aged Objects
Listing 8-2: VB .NET Example of How the CLR Promotes Aged Objects
Listing 8-3: COBOL .NET Code Snippet from the BoxingExampleCOBOL Project
Listing 8-4: VB .NET Code Snippet from the BoxingExampleVB Project
Listing 8-5: MSIL Snippet for COBOL .NET Showing the Box Command Being Performed
Listing 8-6: MSIL Snippet for VB .NET Showing the Box Command Being Performed
Listing 8-7: COBOL .NET PerfmonCobol Example
Listing 8-8: VB .NET PerfmonVB Example

Chapter 9: Creating and Using Objects

Listing 9-1: Output from the Class Viewer for System.Object
Listing 9-2: COBOL .NET Code Snippet Showing a Constructor
Listing 9-3: COBOL .NET Code Snippet Showing How to Instantiate an Object
Listing 9-4: Class Viewer Output of the System.ValueType Class
Listing 9-5: The StringBuilderExampleCobol Project
Listing 9-6: Console Display Output of the StringBuilderExampleCobol Project
Listing 9-7: The StringBuilderExampleVB Project
Listing 9-8: The Lines Written to the Console Display for the StringBuilderExampleVB Program
Listing 9-9: A Portion of the MSIL for the COBOL .NET Sample Application
Listing 9-10: A Portion of the MSIL for the VB .NET Sample Application
Listing 9-11: The ValueTypeSampleCobol Program1.cob File
Listing 9-12: The ValueTypeSampleCobol mybarInt.cob File
Listing 9-13: The ValueTypeSampleCobol mybarStr.cob File
Listing 9-14: Console Display Window Output from ValueTypeSampleCobol
Listing 9-15: The ValueTypeSampleVB Application
Listing 9-16: Console Output Display for ValueTypeSampleVB
Listing 9-17: A Portion of System.Object As Shown in the Class Viewer Tool Output

Chapter 10: A New Perspective Toward Data

Listing 10-1: A Pseudo-Code COBOL .NET Snippet Showing Traditional File Access Syntax
Listing 10-2: VB .NET Pseudo-Code Snippet Showing a Traditional Approach of Accessing a Text File
Listing 10-3: The Methods of the System.IO.File Class
Listing 10-4: The Methods of the System.IO.TextReader Class
Listing 10-5: The System.IO.TextWriter Class
Listing 10-6: VB .NET Project SystemIOExampleVB Demonstrating the Use of the System.IO Namespace
Listing 10-7: COBOL .NET Project SystemIOExampleCobol Demonstrating the Use of the System.IO Namespace
Listing 10-8: MetaDataExampleVB.exe Project Demonstrating the Use of the System.Reflection Namespace to Obtain Metadata
Listing 10-9: MetaDataExampleCobol.exe Project Demonstrating the Use of the System.Reflection Namespace Objects
Listing 10-10: A Portion of the Metadata Captured from the mscorlib.dll Assembly

Chapter 11: Database Programming with .NET

Listing 11-1: A COBOL .NET Pseudo-Code Project Demonstrating Legacy-Type Database Access
Listing 11-2: Sample VB .NET Code Demonstrating the Use of ADO.NET
Listing 11-3: COBOL .NET Sample Code Demonstrating the Use of ADO.NET

Chapter 12: XML in a Managed Environment

Listing 12-1: A Partial Class Viewer Display of the System.Data.Dataset Class
Listing 12-2: Formatted XML
Listing 12-3: A COBOL .NET Sample Project Demonstrating the Use of the ADO.NET Dataset
Listing 12-4: Sample Code from the ReadWriteXMLDatasetExampleVB Project
Listing 12-5: Pseudo-Code Snippet Showing What a COBOL Copybook Might Look Like for the Northwind.Customers Sample SQL Server Table
Listing 12-6: XML Schema for the Northwind.Customers Sample SQL Server Table

Chapter 13: Windows Forms, Web Forms, and No Forms

Listing 13-1: Code Snippet from MyFirstWinFormCobol Showing the Setting of the TextBox1 Text Property
Listing 13-2: A Partial List of the Classes Deriving Directly and Indirectly from the System.Windows.Forms.Control Base Class
Listing 13-3: A Partial Listing of System.ComponentModel.Component's Derived Classes
Listing 13-4: Code Snippets from the WebApplicationSampleCobol Project's WebForm1.aspx.cob File
Listing 13-5: Contents of the WebApplicationSampleCobol Project's WebForm1.aspx File
Listing 13-6: Code from the WebApplicationSampleVBl Project's WebForm1.aspx.vb File
Listing 13-7: The Hierarchy of Classes (ASP.NET Server Controls) Derived from the System.Web.UI.Control Base Class
Listing 13-8: Code Snippets of the Built-in "Hello, World" Sample Web Services

Chapter 14: Adding Value to Your Interface

Listing 14-1: Code Snippets from the Sample Application MyInformativeWinFormCobol
Listing 14-2: A Code Snippet from the Sample Application MyInformativeWinFormVB
Listing 14-3: Code Snippet from the MyInformativeWinFormVB Project Showing the Timer Control Being Used
Listing 14-4: A Code Snippet from the MyWebUseValidationCobol Sample
Listing 14-5: The HTML Generated on Behalf of the Label
Listing 14-6: The HTML Generated As a Result of Placing Each Validation Server Control on the Web Form

Chapter 15: Managing Cache and State for ASP.NET

Listing 15-1: Creating and Passing a QueryString in VB .NET
Listing 15-2: Retrieving a Passed QueryString in VB .NET
Listing 15-3: Creating and Passing a QueryString in COBOL .NET
Listing 15-4: Retrieving a Passed QueryString in COBOL .NET
Listing 15-5: Creating a Persistent Cookie in VB .NET
Listing 15-6: Retrieving a Persistent Cookie in VB .NET
Listing 15-7: Creating a Persistent Cookie in COBOL .NET
Listing 15-8: Retrieving a Persistent Cookie in COBOL.NET
Listing 15-9: Populating a Hidden Forms Field in VB .NET
Listing 15-10: Retrieving a Hidden Forms Field in VB.NET
Listing 15-11: Populating a Hidden Forms Field in COBOL .NET
Listing 15-12: Retrieving a Hidden Forms Field in COBOL.NET
Listing 15-13: The Hidden Control HMTL Generated to Support ViewState
Listing 15-14: Populating View State in VB .NET
Listing 15-15: Retrieving View State in VB.NET
Listing 15-16: Populating View State in COBOL .NET
Listing 15-17: Retrieving View State in COBOL.NET
Listing 15-18: Updating the Application Class in the Global.asax File in VB .NET
Listing 15-19: Retrieving the Application Class in VB .NET
Listing 15-20: Updating the Application Class in the Global.asax File in COBOL .NET
Listing 15-21: Retrieving the Application Class in COBOL .NET
Listing 15-22: Updating the Application Cache Class in VB .NET
Listing 15-23: Retrieving the Application Cache Class in VB .NET
Listing 15-24: Updating the Application Cache Class in COBOL .NET
Listing 15-25: Retrieving the Application Cache Class in COBOL .NET
Listing 15-26: Updating the Session State Class Inside the Global.asax File in VB .NET
Listing 15-27: Retrieving the Session State Class in VB .NET
Listing 15-28: Updating the Session State Class Inside the Global.asax File in COBOL .NET
Listing 15-29: Retrieving the Session State Class in COBOL .NET

Chapter 16: Reporting and Information Delivery

Listing 16-1: Code to Export a Crystal Reports ReportDocument in Microsoft Word (.doc) Format
Listing 16-2: Code to Export a Crystal Reports ReportDocument in Adobe Acrobat PDF (.pdf) Format
Listing 16-3: Code to Export a Crystal Reports ReportDocument in Microsoft Excel
(.xls) Format
Listing 16-4: Sending E-mail Attachments with System.Web.Mail Managed Classes and SMTP

Chapter 18: Configuration for .NET Applications

Listing 18-1: . The Basic Syntax of Each .NET Directive
Listing 18-2: A Partial Listing of Attribute Classes That Derive Directly from the System.Attribute Class
Listing 18-3: Snippet from the ILDASM Output Showing the Extended Metadata for the AttributesExampleCobol Sample Application
Listing 18-4: Snippet from the ILDASM Output Showing the Extended Metadata for the AttributesExampleVB Sample Application
Listing 18-5: The CustomAttribute.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-6: The DocumentedClass.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-7: The ExampleElements.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-8: The ReflectionDrillDown.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-9: The ReflectionDriver.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-10: A Portion of the Reflection Output As It Is Written to the Console Window for the ReflectionDemoVB Sample Application
Listing 18-11: Child Elements Available for <system.web></system.web>
Listing 18-12: The XML Schema for <appSettings></appSettings>
Listing 18-13: Using the System.Security.Policy.Evidence Class to Access Evidence Information from the Assembly
Listing 18-14: Reviewing the NamedPermissionSets Property
Listing 18-15: Retrieving the Code Groups per Policy Level
Listing 18-16: Executing the System.Security.SecurityManager.ResolvePolicy Method
Listing 18-17: The Permission Aggregate Result
Listing 18-18: The Imperative Approach to Programmatically Configuring Code Access Security

Chapter 19: Using Enterprise Services (COM+)

Listing 19-1: The MyFirstClassLibraryCobol Sample Code
Listing 19-2: Code from the MyFirstClassLibraryVB Sample Project
Listing 19-3: Assembly Attribute Code Used in the AssemblyInfo.vb File for MyFirstClassLibraryVB
Listing 19-4: The Available Attributes from the System.EnterpriseServices Namespace
Listing 19-5: Executing the Regsvcs.exe Command-Line Tool to Register the Serviced Component into COM+
Listing 19-6: The Content of the \bin\MyFirstClassLibraryVB.tlb File As Captured by the OLE/COM Object Viewer Tool
Listing 19-7: Code Snippet from the C:\MyFirstClassLibraryVB.reg File
Listing 19-8: Using the Regasm Tool to Create a Type Library File and Perform the Needed Windows Registry Update
Listing 19-9: The Client Application

Chapter 20: Developing for the Enterprise

Listing 20-1: Code Snippets from the MyMSMQExampleCOBOL Sample Application
Listing 20-2: Code Snippet Taken from the MyMSMQExampleVB Sample Application
Listing 20-3: Code Snippet from the MyMSMQAsyncAndTriggerCOBOL Sample Project
Listing 20-4: Code Snippet from MyMSMQAsyncAndTriggerVB
Listing 20-5: Code Snippet from MyMSMQAsyncAndTriggerVB Highlighting the Code Needed to Initiate Asynchronous Processing
Listing 20-6: The Form Class Constructor Method (New) of the MyThreadingExampleVB Sample Application
Listing 20-7: The Remaining Code from the MyThreadingExampleVB Sample Application
Listing 20-8: After Starting the MyThreadingExampleVB Sample Application, the Information As Written to the TextBox Control Before the Worker Thread Is Started
Listing 20-9: After Starting the Worker Thread, Additional Information Is Captured from the TextBox Control

Appendix B: A Sharp Primer: C# and J#

Listing B-1: Code Snippet from the MyFirstCSharpApplication Sample Application
Listing B-2: Code Snippet from MyFirstCSharpApplication Showing the Procedures DefineDataTypesSample and LogicSample
Listing B-3: The MyFirstJSharpApplication Sample Application



COBOL and Visual Basic on .NET
COBOL and Visual Basic on .NET: A Guide for the Reformed Mainframe Programmer
ISBN: 1590590481
EAN: 2147483647
Year: 2003
Pages: 204

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net