Author: vickey_dw
Subject: Need Suggestion on COBOL program
Posted: Thu Jan 05, 2017 10:55 pm (GMT 5.5)
Hi All,
I have written a COBOL program which has three cursors.Requirement was to read data from one SQL(cursor1) and based on values retrieved from cursor1 read cursor2,cursor3 and the write data to output file after performing some Computations.
I have written logic to read first cursor1 and based on retrieved values read cursor2,perform computation, write output file for cursor 2 till end of cursor2. And then for same values of cursor1 read cursor3 till end and write simultaneously.
My program is working perfectly fine and i an getting expected output.
But in my shop before code moved to production it has to pass SONAR.
And this sonar report is saying this program this has complexity much higher that authorized.
I believe i am getting this complexity message because of loops involved in program.
It will be a great help if you can suggest me better ways to write this program and remove this high complexity problem.
Thanks
Vickey
Subject: Need Suggestion on COBOL program
Posted: Thu Jan 05, 2017 10:55 pm (GMT 5.5)
Hi All,
I have written a COBOL program which has three cursors.Requirement was to read data from one SQL(cursor1) and based on values retrieved from cursor1 read cursor2,cursor3 and the write data to output file after performing some Computations.
I have written logic to read first cursor1 and based on retrieved values read cursor2,perform computation, write output file for cursor 2 till end of cursor2. And then for same values of cursor1 read cursor3 till end and write simultaneously.
My program is working perfectly fine and i an getting expected output.
But in my shop before code moved to production it has to pass SONAR.
And this sonar report is saying this program this has complexity much higher that authorized.
I believe i am getting this complexity message because of loops involved in program.
It will be a great help if you can suggest me better ways to write this program and remove this high complexity problem.
Thanks
Vickey