Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to make COBOL-DB2 Code Flexible

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
santosh.iim

New User


Joined: 20 Apr 2006
Posts: 9

PostPosted: Fri Sep 09, 2011 8:29 pm    Post subject: How to make COBOL-DB2 Code Flexible
Reply with quote

Hi -

We are trying to get rid of Business rules from COBOL Modules. These Business rules seem to consume effort of many developers since they change once every Quarter. The Management is looking for a permanent solution to remove Business Rules . All of them are IF Checks and subsequent MOVE conditions based on IF conditions, there are nested IF's as well.

One solution would be to insert the IF's into a DB2 Table and later read them and somehow design the program so as to understand them..

We have practically seen that Business Logic can be inserted into DB2 Tables using BAL (Basic Assembler Language), which can be accessed using BAL/COBOL and later be loaded as a module and executed at run time. We are moving out of BAL ....

So, we are looking to make COBOL-DB2 code flexible to accomodate all future changes...
Any suggestions Please
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Sep 09, 2011 9:08 pm    Post subject:
Reply with quote

Hello,

Is this code re-usable? Can the code from one quarter be used in some later quarter?

Quote:
These Business rules seem to consume effort of many developers since they change once every Quarter. The Management is looking for a permanent solution to remove Business Rules
The effort will still be required if the "code" is placed in some kind of db2 table or elsewhere. . .

Some of my clients have addressed this by having the logic be set up so that it can handle any situation and the specifics read from one or more tables. This requires that the processing code be set up for every possible logic combination or elsde the re-compiles would still be necessary.

Others have generated source code that is to be compiled when needed (i.e. quarterly).

Much of what you might do will be determined by site standards (will compiles on the fly be permitted?).
Back to top
View user's profile Send private message
santosh.iim

New User


Joined: 20 Apr 2006
Posts: 9

PostPosted: Fri Sep 09, 2011 10:25 pm    Post subject: Yes
Reply with quote

Most code remains resuable...but there could changes with MOVE statements. The data may vary, it may have constant literals etc..

Compiles on the fly are not permitted. Instead they are looking to insert code in DB2 which can be executed on Fly..


I heard Dylakor can do this.Not sure..!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Sep 09, 2011 11:19 pm    Post subject:
Reply with quote

Hello,

Quote:
Instead they are looking to insert code in DB2 which can be executed on Fly..
Depending on how this is done, it will most likely take as much time as the current method. . .

Someone will still have to interpret the "business requirement" and translate to the "code in db2".
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Fri Sep 09, 2011 11:23 pm    Post subject:
Reply with quote

Some of this ground was covered in: http://ibmmainframes.com/viewtopic.php?t=55542&highlight=compiler
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Sat Sep 10, 2011 12:02 am    Post subject:
Reply with quote

don.leahy wrote:
Some of this ground was covered in: http://ibmmainframes.com/viewtopic.php?t=55542&highlight=compiler


Thought I've seen this same concept before ...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Sep 10, 2011 12:28 am    Post subject: Reply to: How to make COBOL-DB2 Code Flexible
Reply with quote

looks like some people want to rewrite SAP
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Sat Sep 10, 2011 5:03 am    Post subject: Reply to: How to make COBOL-DB2 Code Flexible
Reply with quote

Can you give a couple of concrete examples of what you are trying to achieve?

If you intend to have some sort of actual program code, which can be maintained in a DB2 table and then "interpreted" in some way, then you have many questions to resolve about how that will fit into the standard sort of "development cycle". If you have code in a table, you can't have someone just change it and "hope that it works".

At the other end of that particular spectrum you have "a bunch of flags in a table". This is effectively a highly simpliefied interpreted code, but even then you have to do it really well and really thoroughly and stringently verify the code combinations (simplifying further by rejecting illogical combinations) before the bunch of flags can be operated upon in the system.

Interpreted code in production for forecasting, simulating, OK. Very specific tasks which have no impact on the current day-to-day running.

Interpreted code for day-to-day running doesn't give me any sort of warm feeling at all.

If nothing else, consider source management. How does that take account of the DB2 data? For any sort of impact analysis you'd need source plus the state of the interpreted code at the time in question. Would you "cut" a new version of production every time the interpreted code changes?

Dick has already outlined two scenarios. First, you have something which deals with everything possible (and that is no simple development feat). Dick hasn't gone into details, but I'm sure the implementation of changes is handled rigorously. There is still effort involved in effecting a change.

Second, something to generate code according to the table so that the amount of development coding is reduced. Of course all the testing/implementation effort remains.

If the "Business Rules" are simple/can be simplified, the first scenario might be a possibility, but don't kid youself that the changeover to a new quarter will be effortless. You can never completely test an interpreted system where the code can change*, so you have to test each instance of it which will actually be used, in this case, each quarter.

If the "Business Rules" are complex/cannot be simplified, then it might be better to consider (re)generating the affected programs from the table of rules. Still not effortless (all the testing and stuff).

If you are looking to "magic away" effort for implementing change, I doubt that you will find a satisfactory solution.

*you can never completely test anything... but this is worse.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Sep 10, 2011 7:39 pm    Post subject:
Reply with quote

this is pathetic.

the requirement is a major modification of system.

trying to do it on the cheap,
expecting us to provide guidance,

probably take a week to identify what needs to be implemented,
another 2 weeks to design
4 weeks to code/test.

1000 euros/day + expenses.

the fact that your shop has not been able to do this
indicates your shop does not have the capabilities to do it correctly.

and hiding code in db2 tables to be executed is really bs.

as i have said before, i hope that no businesses that have anything to do with my money,
use your services.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7908
Location: Bellevue, IA

PostPosted: Sat Sep 10, 2011 10:54 pm    Post subject:
Reply with quote

At a previous employer, we implemented a system where a PC GUI was used to create the business rules. The output was a sequential file that was then uploaded to a VSAM file. CICS programs read the records from the VSAM file, interpreted the records, and executed the associated logic against the provided input data. So I know what the o/p was asking can be done. But whether or not it should be done is another question.

The driver system took something like a year and a half to develop and debug -- do not underestimate how long it takes to do this right. The rule of thumb I learned in school was that tools such as this take THREE times as long as application programs to develop, and that sounds about right. Operationally, there were a number of issues observed:
1. since the PC GUI basically accepted whatever was provided (no input data was available), the first time errors in the logic could be found was in the processing on the mainframe. The business analysts had a hard time understanding that their PC GUI logic errors were the cause of the failures on the mainframe.
2. Each input record to process required accessing some number (usually 100 to 500) VSAM records. There were continuous complaints from customers about how slow the system ran, even though it was changed to use memory cached records.
3. Making the smallest change required going back to the PC GUI and hence the testing cycle was elongated. Change management processes weren't really designed to handle VSAM records instead of program source / load modules, so the entire change management process pretty much had to be redesigned from scratch.
4. If the business analysts did not correctly code the input record layout, again the first time this could be uncovered was when running input records through on the mainframe. These errors could be subtle (a one-byte difference in length or offset, for example) and sometimes took quite a while to find and fix.
5. Batch processes ran slow as well, as anything affecting the input data had to read and interpret the layout through the VSAM file records.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Sep 20, 2011 2:51 pm    Post subject: Re: How to make COBOL-DB2 Code Flexible
Reply with quote

santosh.iim wrote:
We are trying to get rid of Business rules from COBOL Modules. These Business rules seem to consume effort of many developers since they change once every Quarter. The Management is looking for a permanent solution to remove Business Rules . All of them are IF Checks and subsequent MOVE conditions based on IF conditions, there are nested IF's as well.
The very definition of COBOL, the COmmon Business Oriented Language, itself says that the program written in it will have the Business Rules. If it was not a preferred language of choice, why the platform was developed on zOS using COBOL at first place!

Well, that's the first question comes to mind, however, I can understand this plight when someone from 3 years of graduation+MBA Manager asks you to do it.

I'd been working for an employer, they had some business rules coded in COBOL, however, it was on HP Servers and the system was not so volatile that every fourth quarter needs a change in rules. Whenever, there was a change in rules, they will be checked on a low-cost LPAR and then migrated to HP Servers for testing before going live in Prod. I bet, it is no trivial task to maximize flexibility; the cost is always increased complexity - we had these talks but because of the cost involved it was never under taken. Also, needless to say, what Robert has mentioned can not be avoided and we too , could not avoid all that.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Tue Sep 27, 2011 2:28 pm    Post subject:
Reply with quote

@ dbzTHEdinosauer

>> I hope that no businesses that have anything to do with my money,
use your services <<

Hi brother in arms and old companion in the erverlasting ugly war against iniquitous and backstabbing bits and bytes.

I don't want to destroy your boundless faith in the software of the european banking systems, but as a senior consultant and system engineer working most of the time in leading german banks, i give up hope. Every moment, i think this is the bottom line, there is something out there, that will indoctrinate me better.

Just now, I'm working in an Reengineering-Projekt for finance software with the focus on loan processing at a leading financial institution. I had quite accidentally signed long-term loans years ago by this institution. After some inspections of the main processing software modules now, i terminated the credit and transfered it to another institution. Not with the false dawn, that there, things would be better, but with the absolute certainty not to know anything about the software of this institution. And quite now i'm not wondering any longer, how long it takes me to balance the credit-account.

"1000 euros/day + expenses" Nice proposal !!!
Do you need some professional support ???
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 3 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us