Saturday, September 6, 2008

BCS Change All Text Utility

The BCS Change All Text Utility is a nifty utility that allows the user to access and change all text within files with a specific text file extension.

This utility is handy for changing all occurrences of a specific text pattern to a different text pattern. When managing web site it is common to use the designation of localhost for the web domain while development and testing is underway.

Once the developer is satisfied with the design and appearance of the web page it is time to upload the final product to the web server for production purposes. When the user uploads the page as is it probably will not work because localhost maps out across the internet to IP address 127.0.0.1. That IP address will not function properly on the World Wide Web. A domain that will map a correct IP address on the web must be supplied.

One approach would be to open a text editor and repeat find and replace until all occurrences of the desires text target localhost is changed to a more realistic domain. Instead of employing this time and labor intensive process

I decided the need for such a text changing utility would be useful to my programming and web development efforts.

Several years ago one of my mentors told me to "be consistent". If you misspell a word make sure it is misspelled the same through out the entire document. Having been an information manager he knew of search and replace techniques. He also knew it would be easy to the update the document if the misspelling was consistent across the document.

The first task this utility accomplishes is to list all the files the targeted sub directory. Then each file specification is checked for its extension and if the extension matches the user defined extension that file is the opened and the text to search for is replaced with the replacement text.

Afterwards the updated content of the file is rewritten to the targeted file specification. This process is then repeated until all the files in the list are examined and the appropriate changes are made for all likely candidates.

This feat is actually accomplished by using collection of string objects and a string replace object. A method to "load from file" is invoked to populate the collection of strings. Then a "Text" property is used to view the file contents as one long string of information (text). Another string replace object is used to perform the actual string replacements. Finally the "save to file" method is invoked and the long string of updated information is stuffed back into the file specification from which it came.

There is a tutorial available to see the actual tool in action. Hundreds of files are updated in the blink of an eye.

Please feel free to visit my website for additional information at the URL listed below.

Mr. Arch Brooks, Software Engineer

http://archbrooks.com

Article Source: http://EzineArticles.com/?expert=Arch_Brooks

BCS Ace Reporter Code Generator

The Ace Reporter Professional Edition is a superior report generation sub engine that is data aware and has interfaces for report preview and printing to any printer connected to the target platform. Because it is a native Visual Control Library (VCL) component for Delphi that allows you to easily create complex banded reports. Additionally cross tab reporting and perfunctory summary reporting capabilities are available. TwoPass report capability lets you display Page X of Y, or do complex calculations. Ace Reporter Pro allows users to easily create complex banded reports that are linked directly into your programmed executable modules. Languages currently supported include Delphi and C++ for the windows personality.

Typically a form is used to hold the report or reports produced via Ace Reporter Pro. Multiple reports may reside in a single form but for clarity I decided to keep a one to one relationship with forms and reports. If additional reports need to be added to the form simply go to the Ace Reporter tab and drag the Ace Reporter component onto the form and release. That action creates another instantiation of a report.

The BCS Ace Reporter Code Generator dynamically generates the aforementioned form with instance of the Ace Reporter report included. The generated source code also has the required code to create, load and execute the associated form and thusly the report in the windows environment. The report heading may also be changed from default assignments to something that may be more appropriate for the targeted report. This feature rich capability is available to allow the user flexibility without changing the form or report object. This approach offers a greater level of stability and maintainability for the newly generated form and housed report.

While designing your application you generally will identify a certain number of reports required to successfully achieve the desired functionality of assigned task. As an example if you require ten reports to complete the assignment simply go to the code generator key in a prefix, then identify a starting number, then identify the number of reports. Finally the target path of the generated code must be identified and click the Execute control. These controls are on the Report Generation Option Tab (which is the default). Optionally the Report Headings Tab may be clicked to change the default report heading values. Of course the headings should be changed prior to clicking the Execute control.

The start number allows the user to add reports at a later time using the same criterion. The first execution the start number is 1 and if we generate 10 reports source code for reports 1 thru 10 would be generated. If subsequently five more reports are required simply return of the code generator with the same prefix and a start number of 11 and the number of reports is 5 then reports 11 thru 15 are generated. This process is repeated until all required reports are generated.

This feature is designed expressly for this purpose and is achieved by strictly enforcing a viable naming convention for identifying generated reports.
It takes only a few seconds to generate ten or one hundred fully functional reports. Without the code generator this activity could take weeks and possibly months to fulfill.

Please feel free to visit my web site at the following URL below.

Mr. Arch Brooks, Software Engineer
http://archbrooks.com

VCL

There is a tutorial that shows the BCS Ace Report Pro code generator in action

Article Source: http://EzineArticles.com/?expert=Arch_Brooks

Access Data Source .NET 2.x Through 3.5

Several ISP's support Microsoft SQL Server but many of them have capacity restrictions that do not allow for a robust data driven web application. Many of the ISP's that support MySql have similar restrictions. Those same ISP's do allow access to the Microsoft Access database management system. Of course the Microsoft access databases are unrestricted except to the extent of your available disk space. And with the advent of .NET 2.0 and higher access to the Microsoft Access database is greatly simplified by using the Access Data Source web control.

Simply stated the Access data source provides all the necessary communications to select, insert, update and delete information stored in Access databases by invoking the various SQL dialects available to the .NET platforms 2.x and higher. The target repository is a collection of datum that identifies members of an organization sometimes referred to as a member list. The balance of this article discusses the idiosyncrasies of the main properties of the Access Data Source web control and their utilization.

The DataFile property is as follows:

~/App_Data/me.mdb

This path to the database includes the root path from which it was executed plus a sub directory of App_Data and finally the Access database specification me.mdb.

The select command example is as follows:

SELECT * FROM [me] where uid = ?

This command selects a specific record in the collection that correspondent to the identified uid (user identification) from the [me] (membership entry) data table. Per the data definition of the table the uid (user identification) is an auto increment field.

The insert command example is as follows:

INSERT INTO [me] ([addr], [email], [fname], [ind], [lname], [phone], [pwd], [verf]) values (?, ?, ?, ?, ?, ?, ?, ?)

You will notice the name of the Access table is [me] the Members Entry data table as described minus the uid (user identification) auto increment field.

Parameters for the insert command are addr, email, fname, ind, lname, phone, pwd and verf. The parameters must represent the proper data type and the proper size for the associated data type. Their order must be in the exact sequence as they appear in the insert statement. Typically all parameters in the Access data source are positional.

The update command example is as follows:

UPDATE [me] set [addr] = ?, [email] = ?, [fname] = ?, [ind] = ?, [lname] = ?, [phone] = ?, [pwd] = ?, [verf] = ? where [uid] = ?

Parameters for the update command are addr, email, fname, ind, lname, phone, pwd and verf. The parameters must represent the proper data type and the proper size for the associated data type. Their order must be in the exact sequence as they appear in the update statement. Typically all parameters in the Access data source are positional.

The delete command is as follows:

DELETE * FROM [me] where [uid] = ?

There is one parameter for the delete command and it is uid (user identification).

This command will remove an entry from the data table that equals the uid specified by the uid parameter value.

The commands may be invoked by a .NET data aware web control such as DataGrid or DataList as well as other data aware control including user defined web controls. Also these commands may be invoked independently by using various features of the Access data source control itself.

Please feel free to visit my website by using the following URL. http://archbrooks.com

Arch Brooks, Software Engineer

Article Source: http://EzineArticles.com/?expert=Arch_Brooks

Common Business Oriented Language (COBOL) Source Code Generation

COBOL has been around for quite a number of years. Its use and popularity has given way to some of the newer languages. COBOL's utilization is further enhanced by employing sub programming techniques that rely on the Linkage Section of COBOL.

COBOL source code generation is easily accomplished by using a symbolic stream generator with keyword replacements. To accomplish the COBOL source code generation first create an error free COBOL sub program containing the desired COBOL functionality. As an example we would have a COBOL program to operate on fixed length 80 column images. This technique is also known as Physical Sequential File Access. We then highlight various key portions of the COBOL source code so that they may be tokenized and marked for replacement by and intermediate code processor.

Typically the COBOL sub program would accommodate input as well as output thus allowing for one set of code to be used for both input and output of information.

The "RECORD CONTAINS 80 CHARACTERS" clause is changed to read "RECORD CONTAINS <#LRECL> CHARACTERS". The "<#LRECL>" phrase becomes the token and by replacing it with the desired record length of 121 yields a source code program that will operate on logical records with a fixed length of 121 characters.

The FD name of the file description could be tokenized as <#FDNAME> and could be replaced with a desired descriptive name. This process is repeated for as many of the key elements of the COBOL sub program as required that yields the desired code flexibility.

Simply read the skeleton source code into memory and make the necessary replacements of the identified tokens and then save the updated source code to a unique file specification. Afterwards simply compile and link the newly created COBOL source code to yield the newly defined COBOL source code which meets the desired specifications. If the compiler resides on a remote computer simply File Transfer Protocol the source code to the target platform then proceed with the compile and link step. The majority of development is accomplished on the PC and the results are then uploaded to the mainframe for subsequent utilization.

Any processor or environment with the ability or change and replace the identified tokens can be used as the code generator.

Pascal my programming language of choice so much of the code generation work is performed on the windows platform then uploaded to the IBM Mainframe platform. Please keep in mind that I do have access to several PC based COBOL compilers.

Please feel free to visit my website by using the following URL.

http://archbrooks.com

Article Source: http://EzineArticles.com/?expert=Arch_Brooks