Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
COBOl program logic

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

New User


Joined: 15 Oct 2009
Posts: 23
Location: Pune

PostPosted: Wed Jul 21, 2010 8:14 pm    Post subject: COBOl program logic
Reply with quote

Hello everyone,

I have to modify a program,

This program reads one input file & based on the cust-ID, it determines the type of customer ( say- cust type- A, B, C etc. This cust-type is retrieved from Db2 tables).
At present, all cust-types are processed with the same logic… Now I need to update the program to process the records with cust-type “A” with special logic & all other types as before…

Problem is that my client is going to change very frequently the processing of different cust type & thus wish to make this process dynamic…
i.e. in future there should not be any software change needed to change the processing of customer type… only Db2 table changes/parameter changes should be needed…

I’ll further clarify, Today I am processing Cust-Type A with special logic & all other types with general logic,
tomorrow I may need to process cust-type B with special logic & all other types with general logic… and all this without changing the program..i .e. only table data/parameters changes are allowed… Please suggest how to approach the problem?

I think we can pass a parameter to program with values of those cust-types which should be processed with special logic, program will read the records and validate the types against these parms & can process them as needed.. please suggest me what other way this can be handled?

Many Thanks & regards, icon_smile.gif
Back to top
View user's profile Send private message

naveensrimf

New User


Joined: 04 Oct 2005
Posts: 31

PostPosted: Wed Jul 21, 2010 8:20 pm    Post subject:
Reply with quote

Hi,

don't change any existing logic.Just delcare Dynamic varaibles and change the program as per new dyanmic varaibles and Add your new functionality.
Back to top
View user's profile Send private message
Deja vu

New User


Joined: 15 Oct 2009
Posts: 23
Location: Pune

PostPosted: Wed Jul 21, 2010 8:41 pm    Post subject:
Reply with quote

Thanks for your quick responce...
Actually I have never dealt with dynamic variable, could you please suggest where to look for more detailed info on this?

naveensrimf wrote:
Hi,

don't change any existing logic.Just delcare Dynamic varaibles and change the program as per new dyanmic varaibles and Add your new functionality.
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: Wed Jul 21, 2010 8:56 pm    Post subject:
Reply with quote

Hello,

As long as all of the customer types can be handled by existing code a solution could be to have an external control table or database table that says which customer type should use which code/routine. There would be one entry per customer type.

If a customer type is to switch from one set of code to another all that needs be done is modify the control table.

If a new set of code is needed to handle something not yet defined, then the process would have to be modified to incorporate the new processing code.
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us