Friday, August 27, 2010

BCS Source Code Mass Changes

View Documentation For BCS Source Code Mass Change Utility

This workbench utility allows the user to make global changes to a Delphi 2010 source code application. A keyword pair is stored in a database that identifies original source code values an associated replacement values. Standard data entry techniques may be used to identify the pair values however there are a set to tools available to facilitate usage by employing two text documents with cut and paste technology implemented.

Once your keyword pairs are in place go to the primary options menu and select the “Generate New Copy Of Code” option to begin the update process.

First the user must select the input and destination sub directories. Once this is successfully completed the tool reads the input source code applies all available changes and produces the updated source code in the destination sub directory. Associated batch and resources files are also accommodated with this tool.

Once the outputs desired functionality is verified and valid the newly created source code may placed in any desired location.

While this tool was designed to apply mass changes to Delphi 2010 source application code it's implementation will work with any text file or group of text files!

Then the user selects a input sub directory and an output sub directory. The output sub directory will contain the version reflecting the changes applied by the utility.

To use the workbench tools to populate the change pairs in the database first highlight the desired text in the original document. Invoke the pop up menu and select its option and the information is populated into the next available record in the database. Next in the updated document highlight the replacement text value, invoke the pop up menu and select its option and the replacement text field is populated. If the desired text does not appear simply open up a new line and begin typing. Once the replacement text in entered the highlight it and proceed as normal. No changes to documents used by the workbench are saved!

Update in place feature is available but is not recommended. We recommend applying application changes to location other than the source input location. That way if problems arise you will have a preserved copy of your input source code or document.

Labels: , , , , , ,

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

Thursday, August 14, 2008

Google Site Map Creator Part One

The Google site map assists the Google spider when it is time to crawl your web site. The first task of the Google Map Creator is to collect the URL’s required for your web site. These URL’s must be unique (not duplicated) so I use a sorted string list collection to store the URL’s. The sorted string list is programmed to ignore duplicate entries and to sort all URL’s in ascending alphabetical sequence.

There are basically two ways to insert the URL’s and that is a single URL at a time and a way to process a file of URL’s.

The scFill procedure creates the sorted string list collection then the information is loaded from a text file. Either the AddOne or LoadFile procedure adds a single URL or adds a file containing URL’s respectively. Finally the scFree procedure stores the sorted unique URL list into a text file for subsequent use.

A couple of other procedures that ease the functional use of the component are populating a list box and populating a memo control that contains the finished site map.

Sunday, August 3, 2008

Find Links

I have authored numerous video products and tutorials which leverage the capabilities of full motion video and media streams.

In the same vain I have developed media players that are encapsulated in master pages for existing web sites (skins etc.).

There are times when I employ video from You Tube but want to use my own video players and skins.

I have developed an application that browses and finds all the links in a web page. The workbench portion of the web page allows for further surfing and documenting each web page visited.

The importance of this feature is that this datum can then be stored in a DBMS for subsequent use and can also be used as an input vehicle to update repositories serviced by .NET platforms.

If you have ever used the DataList control in the .NET platform 2.0 through 3.5 you already know that it is easier to pass the Title and URL information to the Hyperlink control stored in the DataList template. To build the Title and URL information dynamically is a non trivial task. It is less painful and easier to have those activities performed outside the auspices of the DataList control.

There are unlimited applications for this level of technology. Any activity employing URLs and hyperlinks can be adapted to use this level of solution.