This will be what I hope will be the first of many posts where I express my humble opinion (IMHO) about something, and you let me know what you think. This will only work if I get feedback from you, the readers of this blog.
I would like to start with source files.
My opinion is that you should keep the source members for all object types (RPGLE, DSPF, CLLE, PF, LF, etc.) in one source file in each library.
Some of my colleagues disagree with this, and keep the various types of source in their own source file.
I know that you can store source in the IFS (Integrated File System) of the IBM i. If you work in an environment where you do that I would like to here what you think are the advantages and disadvantages of doing that.
As I have mentioned before I work on several IBM i servers that have both home-grown and a purchased ERP software. Within the group of senior programmers and Programming Managers there is a difference of opinion on how many source files should be used in each home-grown application.
Method 1 - Classic
Some prefer the classic IBM i arrangement, with the following source files:
- QCBLSRC – CBL members, fortunately there is only in one library with COBOL programs in it.
- QCLSRC – CLP and CLLE members.
- QDDSSRC – DSPF, PF, LF, PRTF members.
- QPNLSRC – PNLGRP source.
- QQMQRYSRC – QMQRY members.
- QRPGSRC – RPG members.
- QRPGLESRC – RPGLESRC, SQLRPGLE members.
In some libraries QRPGSRC and QRPGLESRC have been merged into an expanded QRPGSRC.
Method 2 - All in one
The alternative method is to have one source file in each library that contains all the source members. For example, IMPSRC contains all the source members for the objects in the library IMPLIB.
|Method 1 - Classic||Method 2 - All in one|
|Having separate source files make it easier to look for just, for example, RPGLE members only. I go to QRPGLESRC.||Can easily be done in the WRKMBRPDM command. Just select the type of members you want to display.|
|The QRPGLESRC and QQMQRYSRC source files are different sizes to the others, they have a record length of 112 and 90. The others are all 92.||If you create the single source file with a record length of 112 all of the different types of source members will fit. It makes no difference to the various compilers what size the source member is.|
|I cannot have my display file and program have the same name. This is possible as they are not the same object type.||Why would you want to do that?
IMHO every object should have its own unique name.
|This is just the way it is done on a IBM i, as that is how it was on the System/38 and on the AS400 when it was first launched.||That was 25 years ago! Things change as better and more efficient ways of doing things are found. Your not programming the same way you were when the AS400 first was launched are you?|
IMHO is for Method 2, the all in one source file.
What do you think? Do you agree or disagree with me?
Let me know by submitting a comment below.