Saturday, 30 June 2012

RPG Programming vs Windows Based Applications

Hi All,


A colleague, he or she shall remain anonymous, said that RPG programs are better then Windows based programs. Windows based applications need to go through the hardening process to ensure that it meets the security guidelines of the company. Symantec ESM is a tool used for the hardening process. There is no need for any hardening for RPG.


RPG or known as Report Program Generator is a legacy system used by most financial institutions such as banks today. It is a structured programming language and it provides accurate and reliable information to bank staff across the world. Its reliability is proven until now. It can be confusing if the RPG program is very complicated. If a RPG program has over thousands of lines of code, you may not be able to find the portion that we need to enhance or change. There are also no indentations in RPG. A maximum 19-20 lines of coding are displayed at a time. To go the next 20 lines, you will press Page Down. You can't see the previous 20 lines already. When there are a lot of nested ifs and loops, it is very difficult to see each section. An example are something like below. It is quite a complicated program


IF
DOW
IF
IF
DOW
.................. (200 lines here)
IF
ELSEIF
ELSE
IF
ENDIF
ENDIF
ENDDO
.................(50 lines of coding here)
ENDIF
................(50 lines of coding here)
ENDIF
ENDO
ENDIF


The modern generation programming languages include .NET, Java, SQL Server and scripting languages such as Javascript and VBScript. These programming languages can be very powerful and used widely in any software development now. A lot of applications are running on Java now but it may also cause performance issues. Running Java applets can sometimes slow down the PC performance. These development languages are quite customisable too. Applications developed using these programming languages have been exposed to security vulnerabilities as well.


My favourite programming languages include C#.NET, Java, Javascript and SQL. RPG may not be my preferred language and I am writing RPG programs in my current job now. Knowing both legacy and modern programming languages are good. Some companies are still using older languages such as COBOL but the programs are still doing their jobs providing accurate and precise information.


Modern programming languages have better Graphical User Interface (GUI) and will make development easier. It is more intuitive and easier to develop. For RPG and COBOL, we need to follow the required declarations and syntaxes determined. We need to declare certain things first before we proceed to write the programs. 


RPG have concepts like file specifications, data structure definitions and calculation specifications (programming). File specifications include declaring whether the files are externally described or internal described files and whether the files are used for input only, output only, or combined (both output and input). This is followed by variable and data structure definitions that include arrays. All these rules need to be specified first before writing any programming logic. 


Different programming languages may have different styles and syntaxes. For myself, I can  write in any programming language that I have learnt. I may not use Java or .NET now but , I am able to use both of it if I refreshed myself with Java or C# knowledge again. I am able to adapt to the language. The learning curve may not be as steep for me partly because I like programming. It will be steeper if it is a brand new language but I should be able to write it within 2-3 months.  I have also looked at HTML5 and CSS3 during my free time but I have not covered it completely.


So which programming language do you prefer? Legacy or object oriented? GUI or non GUI based? Pointers or without pointers? Languages with text editor or without? Web based or non web based? Syntax strict or non-strict languages? Please let me know.


Cheers,


Rogerkoo