Hi Friends,
In this chapter, i will try to touch logic part of the COBOL programming where the generic purpose which suits business purposes.
Generally in business terms we will get the need of conditions where we have to use the values to decide the flow of the program.In this case we have the IF we use one value then we will code the logic accordingly otherwise we will use ELSE to code other part , similarly we can use EVALUATE to increase the performance of the flow according to business needs.While using EVALUATE some condition for business need we will compare the source item and depending upon the values which we expect for that item we will code the logic in separate sections for each value we receive to it.
To handle the repeated values for one genre,we can use the ARRAY to make the flow to get the values at once like in case of dealing with data to flow. Data has to flow in the form of file to tables,we will handle that data by defining the category as what is the name, how many fields it will have, how many times we are going to use them. If we have one row and number of columns or number of rows and one column data we can have the use of single dimensional ARRAY, other wise if it has to deal with multiple,we can use multi dimensional ARRAY.
To analyse the data flow at once we will have the use of CURSOR concept, where we can read one row of the data according to our needs and use that in the flow of the logic and handle that data to write into different files according to the business needs.
In day to day business, we need to use of so many existing logic at any point of time due to the need.
In this case we can code the logic part and save that in the form of one program, use it in any program we code using CALL command. It will bring the logic that we have already stored into our current program.Generally it was used in the part of creating error messages,checking some business codes.
While using these types of things we have to declare the structure of files, fields which will be used in most of the template programs, here comes the use of COPY command in program.We will maintain the structure of regularly used file structures,fields in one copy book and we can use it in program whenever needed.
Will write other concepts in other parts...Thanks for visiting my blog...:)
In this chapter, i will try to touch logic part of the COBOL programming where the generic purpose which suits business purposes.
Generally in business terms we will get the need of conditions where we have to use the values to decide the flow of the program.In this case we have the IF we use one value then we will code the logic accordingly otherwise we will use ELSE to code other part , similarly we can use EVALUATE to increase the performance of the flow according to business needs.While using EVALUATE some condition for business need we will compare the source item and depending upon the values which we expect for that item we will code the logic in separate sections for each value we receive to it.
To handle the repeated values for one genre,we can use the ARRAY to make the flow to get the values at once like in case of dealing with data to flow. Data has to flow in the form of file to tables,we will handle that data by defining the category as what is the name, how many fields it will have, how many times we are going to use them. If we have one row and number of columns or number of rows and one column data we can have the use of single dimensional ARRAY, other wise if it has to deal with multiple,we can use multi dimensional ARRAY.
To analyse the data flow at once we will have the use of CURSOR concept, where we can read one row of the data according to our needs and use that in the flow of the logic and handle that data to write into different files according to the business needs.
In day to day business, we need to use of so many existing logic at any point of time due to the need.
In this case we can code the logic part and save that in the form of one program, use it in any program we code using CALL command. It will bring the logic that we have already stored into our current program.Generally it was used in the part of creating error messages,checking some business codes.
While using these types of things we have to declare the structure of files, fields which will be used in most of the template programs, here comes the use of COPY command in program.We will maintain the structure of regularly used file structures,fields in one copy book and we can use it in program whenever needed.
Will write other concepts in other parts...Thanks for visiting my blog...:)
No comments:
Post a Comment