Archive for CA Plex

MD5 Hash Encryption in CA Plex

Occasionally you will need to perform a one way hash for passwords. This post shows how to do it using the MD5 algorithm in CA Plex with some java source code.

For background on this, check out this link.

First, create a source code object that looks like this:


Here is the code to cut and paste:



String passwordToHash = &(1:).toString();
String generatedPassword = null;
try {
// Create MessageDigest instance for MD5
MessageDigest md = MessageDigest.getInstance(“MD5”);
//Add password bytes to digest
//Get the hash’s bytes
byte[] bytes = md.digest();
//This bytes[] has bytes in decimal format;
//Convert it to hexadecimal format
StringBuilder sb = new StringBuilder();
for(int i=0; i< bytes.length ;i++)
sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));
//Get complete hashed password in hex format
generatedPassword = sb.toString();
catch (NoSuchAlgorithmException e)



WCF Service Design

In this post, I want to outline two concepts that may help you to create a better service architecture for CA Plex WCF services. First, we should make sure the interfaces are decoupled from the business logic in order to make sure that a change to business functions will not affect the interface used by clients. The second suggestion will make your WCF service more compatible with REST principles and will allow for easier transformation to REST-based services.

Decouple interfaces from business logic

In order to decouple the business logic, we use an adaptor pattern. We create a wrapper function for each method on the interface and define separate input and output parameter fields scoped to the wrapper function.


The following images show a simple example using the “SalesSystem” model shipped with CA Plex. On the IOrder interface, we define a method “GetOrderHeader”. This method is implemented by Function “Order.Header.Adaptor.GetOrderHeader”.




Design for stateless operation

Make sure the exposed methods do not require a session (server application state per client). The standard BlockFetch pattern relies on server state (open cursor).

To get more than one instance from a collection, we still have to hard code the number of instances that will be returned as a page from a service (CA Plex limitation). A PageFetch pattern’s interface has to be designed similar to the one shown below:


Navigation through pages is by PageNumber.

If there are any questions regarding this post please feel free to contact me at

2E/Plex Conference

We just finished the 2E Plex conference yesterday. I found it to be an outstanding event.  For those of you that could not attend I will be sharing some of the ideas that I taught in the Advanced 2E Workshop in future posts.  I also want to share some of my impressions of the conference.

I have to say that I found the culture to be changing at CA.  During the last couple years I have seen some change but the change was more exposed at the conference. I found the 2E / Plex teams at CA to be very open and approachable about what we, the customers, want to see in the products.  One session involved all of us customers, getting the opportunity to vote on what features we want to see next.  So we are having a voice in the future of 2E and Plex.

CA also seemed to be more motivated to make the products better now and into the future.  There is commitment in the CA teams to make 2E and Plex better work with current technologies and to adjust to technology changes in the future.

Finally, congratulations to Simon for his excellent work in making the changing Agile process a successful process for 2E and Plex.  I believe his successful adaptable application of Agile to 2E and Plex will help CA produce quality products for us to use years into the future.

CA 2E Modernization – One Step at a Time Conquering the Modernization Mountain

“The journey of a thousand miles begins with a single step.”

Lao Tzu

The push to modernize has made people believe they have to leap from the base to the top of the IBM i modernization mountain.  At the basecamp, you find you can’t deliver on key business requirements.  The framework simply won’t get you there.  So, you are motivated to climb.  Some possible approaches include:

  1. Rewriting the application in Java, .Net or PHP
  2. Replacing the application with a commercial applications
  3. Migrating the code using automated tools
  4. Rewriting the user interface with a modern html/css/javascript front-end
  5. Utilizing a screen scraper to modify the existing user interface into a modern html/css/Javascript front end.

They’re each viable options.  But every one of them comes with some good and bad characteristics.  In truth, there is no silver bullet.  But it doesn’t have to be as daunting as it looks.  The mountain can be scaled in steps.  At CM First, we have found this the most cost-effective and business-effective approach.

Ideally, you will want your entire application to be migrated to CA Plex because then you can reap significant benefits.  From atop this new mountain, the development ‘vista’ includes:

  • Cross-platform code generation
  • A customizable web front-end
  • Mobile app generation from existing code
  • Simple web services implementation

But the CA Plex move is another huge leap; not everyone is equipped to scale the mountain in this way.  Moving to CA Plex is the right move, but, by planning a simpler course, you can get where you want to be with lower risk and less cost.


First migrate application to the web with Web Option.    Web Option is tightly integrated with 2E and is a flexible approach to web-enable your screens to give you a strong corporate web presence.  Any CA 2E programmer can generate web pages/applications with Web Option with no additional skills needed.  Then, having achieved one key goal, you can begin to  migrate the model to CA Plex.  The final leg of the journey will bring you to the summit where you can build full-feature web and mobile applications with CA Plex and CM WebClient.  Prevent altitude sickness for your users and developers by taking a measured approach to modernization.


CA Plex/2E Global User Community Webcast Oct 16, 2012 10 am EDT

Please check out the CA Plex/2E Global User Community Webcast on Tuesday, October 16, 2012 at 10am EDT.


CA Plex Release 7.0 has new features to further meet the user community’s requirements for simplifying modernizing applications, simplifying development workflows and integrating web services into their application deployments. Rob Layzell, the CA Plex architect will provide an overview of the major new features available CA Plex 7.0. Please attend and learn how you can take advantage of the .Net Client Generator, the Plex Packager Tool, Web Services Import and WCF Proxy capabilities.

All information is on this link.


Automated Testing for CA Plex and CA 2E

Check out this presentation on using Worksoft Certify to automatically test CA Plex and CA 2E applications. Although the presentation is oriented to CA Plex C++ interfaces, the tool can also be used with CA Plex WebClient, Java, C#, Web, and CA 2E 5250 among others. There is also strong integration with ERP systems like SAP – so if your shop using SAP with CA 2E or CA Plex, you can test apps end to end.

Contact us if we can be of assistance.

Plex 7.0 Released!


.NET Client Application Generator

The major new feature of CA Plex r7.0 is to generate Plex UI designs as managed C# applications. The C# applications use the Windows Presentation Foundation (WPF) operating environment, which is shipped as part of the Microsoft .NET Framework 4.0. The CA Plex .NET Client Generator ships with an updated set of OBASE and Pattern libraries with newly added variants that target each of the client-server configurations. CA Plex .NET runtime supports this .NET Client Generator.

CA Plex has been able to generate applications that target modern languages such as Java and C# for some time now. However, these languages come with some new implementation concepts that are not familiar to many Plex developers who use the RPG or C++ based generators. The main conceptual hurdle lies in the use of namespaces to group common functions.

Plex Packager Tool

The Plex Packager Tool simplifies the process by allowing a Plex developer to specify a set of criteria for automatically creating package information in their model. The set of criteria is stored so that when the packager tool is used over the same model, the package information can be updated based on the rules predefined for that local model.

The Web Services Import feature completes the services support in CA Plex by allowing CA Plex functions to call web services as standard Plex functions. CA Plex has been able to expose server functionality as EJB and WCF Services for a number of releases.

Web Service Import

The Plex Web Service Import Tool lets you import external meta information and use services within a Plex local model. The tool enables you to define the name, which references a Package object, under which the services are organized in the Plex model.

WCF Proxy

The CA Plex r6.0 and r6.1 .NET runtime uses TCP-IP as their only communication protocol with other platforms. While the TCP-IP is suitable for intranet applications, it does not scale for the web or for cloud-based server application deployments. With CA Plex r6.1, it was not possible to call Plex generated client functions and server functions running within IIS.

With CA Plex r7.0, a new WCF call interface has been added to the CA Plex .NET runtime. By deploying the CA Plex .NET Server runtime in a suitable host, you can now deploy your server applications to environments which were previously impossible, such as IIS. WCF call interface also allows you to use any communication protocol which WCF supports, such as HTTP, TCPIP, or Named Pipes.

Matchpoint for Cross Platform CM

Many companies that use the IBM i as well as Windows find Matchpoint an excellent fit. Matchpoint becomes especially useful when a company has both 2E and Plex.  For those of you that have never looked at Matchpoint here is a quick over view of features.


MatchPoint provides an overview of status and activities for each change request. Change requests record data such as status, responsibilities, deadlines, and priorities.


Change requests can be assigned to projects, which allows reporting on a project level. Projects contain information such as project members, timelines and time sheets. With the billing module, project work can be billed directly to the customer based on the recorded hours and expenses.


Customers can be designated as departments within your company or actual external companies. Each change request can be assigned to a customer, which allows for reporting and timesheets on the customer level. It is also possible to assign entire projects to a customer.


Through automation, changes are deployed efficiently and without manual processes.

Increasing quality and security of the managed application.


  1. Definition of environments and locations
  2. Windows File System
  3. IBM System i
  4. IBM System i Remote
  5. Packages


  1. CA Plex
  2. Windows File System
  3. IBM System i


The ISV Module provides great functionality when MatchPoint is used to manage customer installations.


The source code module allows for checkout and check-in functionality for IBM System i source codes. It ensures that only one developer works on a source code at the time. The source code is deployed together with the object. The check-in process creates a version of the source code and makes the source code available for checkout again.


  1. E-mail Notification
  2. Backup
  3. Data Management
  4. Versioning
  5. User Rights
  6. Change Request Dependencies
  7. Object Dependencies
  8. Document Attachments
  9. Complete logging of all actions
  10. Personal Developer Environment
  11. Conflict Detection
  12. Time Sheet
  13. Release/Cumulative PTF
  14. Scheduled Deployments
  15. Source Code Management
  16. User defined process
  17. Export
  18. LibrarySync® for IBM i


The System i Cross Reference Browser displays program and file references for a specified System i object. The references are displayed in a tree and can be expanded for each object in the tree.


The Object Source Analyzer compares objects and their source code by change date, so for every object, there is a current source code.

The objects can be compared to their source files in any specified library. The source code can even be on a different System i server.

See more about Matchpoint and upgrades in Mathpoing 5.1 at: The Matchpoint Website.

© 2013 CM First Group - All rights reserved