View previous topic :: View next topic
|
Author |
Message |
frozenblood Warnings : 1 New User
Joined: 16 Oct 2012 Posts: 37 Location: INDIA
|
|
|
|
Hi,
I am currently working on building a logic to extract business rules from a COBOL program. My first step to this approach is to search for all variables being used in a program and trace them backwards to understand how they are getting populated.
I have written a simple REXX to search for variables being used in a program but having difficulties in trying to trace them back to procedure division/initialization and require your help in this regard. Can anyone provide me an idea how I can accomplish this and make it generic. Really appreciate if someone who has tried this in the past can share some thoughts.
Thanks |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
I'm not sure what you're doing makes a whole lot of sense; I really don't think you asking questions so early in the process makes sense since it appears you lack the knowledge needed to do the task properly.
Wouldn't it make more sense to use the compile output? With the proper compile option, the compiler generates a list of variables along with each line the variable is referenced on. You don't have to worry about your REXX code expanding copy books to find variables, as an added bonus of using the compile output. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I agree with Robert. The compiler listing "normalises" things like data-definitions, gives you a cross-reference with an indicator of lines where a field changes, note (real) "nesting" levels for conditions, and much, much, more.
Don't try to write a compiler yourself, in Rexx, when 97% (a guess) of what you want is already in the compiler listing, and your just need to apply yourself to interpreting that. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
Quote: |
Can anyone provide me an idea how I can accomplish this and make it generic |
You don't have to. I would start with Job scheduler to trace it backwards manually ,because the field may be populating by a SORT or any non cobol program so REXX wouldn't know that and you will miss it. We have had a migration project where few jobs were decommissioned and moved to Data warehousing jobs and it took us 4-6 months for few applications to migrate. You fully cannot automate this task. I am not sure who instructed you to do this but you should have reasons and downsides to tell them back why it is risky and waste of time to do this automated. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
define exactly what You/Your-organisation mean by business rules
it' s meaning can range from little
( I would consider a cross reference of the record fields with usage a minimum )
to a full business logic
( there are product who claim to be able to extract down to the algorithmic part of the code ) |
|
Back to top |
|
|
frozenblood Warnings : 1 New User
Joined: 16 Oct 2012 Posts: 37 Location: INDIA
|
|
|
|
enrico-sorichetti wrote: |
define exactly what You/Your-organisation mean by business rules
it' s meaning can range from little
( I would consider a cross reference of the record fields with usage a minimum )
to a full business logic
( there are product who claim to be able to extract down to the algorithmic part of the code ) |
Thanks Enrico. You're correct business rules can encompass wide variety of meanings, I am looking to write a piece of code which will take 'n' variable names as input and run them through a set of COBOL programs to backtrack how they are getting populated and on what conditions. The idea is to then transform these conditions/rules to simple english like sentences and dump to a file which can be given to business analysts to understand the requirements. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
You cannot extract business rules from variables used in a program. Any attempt to do so is just an utter waste of time, and posting such "incompetent PHB" requests here wastes even more time! |
|
Back to top |
|
|
frozenblood Warnings : 1 New User
Joined: 16 Oct 2012 Posts: 37 Location: INDIA
|
|
|
|
prino wrote: |
You cannot extract business rules from variables used in a program. Any attempt to do so is just an utter waste of time, and posting such "incompetent PHB" requests here wastes even more time! |
Thank You for the encouragement. Incompetence is sometimes useful it helps u keep an open mind. 😀 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
I am looking to write a piece of code which will take 'n' variable names as input and run them through a set of COBOL programs to backtrack how they are getting populated
|
that' s not extracting business rules ...
it is just a plain old impact analysis...
Quote: |
and on what conditions.
|
good luck for that
anyway, the chances of getting help on such project are pretty NIL
Quote: |
Incompetence is sometimes useful it helps u keep an open mind. |
if You had cared to read carefully the answer You got it was NOT your competence that was judged
just the INcompetence of the IDIOT - confirm IDIOT - who started the whole thing |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
enrico-sorichetti wrote: |
if You had cared to read carefully the answer You got it was NOT your competence that was judged
just the INcompetence of the IDIOT - confirm IDIOT - who started the whole thing |
And with that comment the thread should be locked... |
|
Back to top |
|
|
|