If my program has lots of unused variable, does it affects my performance, if yes how & why?
Secondly, I have read we should not use GO TO statement. Now, I have too option, either I use a 88 Level variable or a GO TO statement. There are multiple place where I have to transfer control to other para, should I use a 88 Level variable everywhere or can I use Go To. Is there any marked difference in performance between the two.
Last, RMODE is used to place the load module, and data is used to place the working storage data below or above the line. does having different location for data and load module has some advantage over having data part embedded itself in load module.Basically, I want to know, why IBM decided to have two different module for load & data?
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Unused variables make the module bigger.
There is nothing wrong with a GO TO when used appropriately. Many organizations have standards that prohibit the use of GO TO. Others have rules about wen it is acceptable. A few have no rules at all. . .
I'm not sure how you reached the point where your choices were an 88 or a GO TO. . . Not knowing what you have, it is difficult to say if there wouold be a difference in performance.
You need to do more research on your last paragraph. Why do you believe IBM decided to have 2 different modules for "load and data"?
As I understood your first method PARA-A will be executed and each time it will GO TO PARA-B as N>0 will be true. and in
PARA-B If N <= 10
it will perform:
And in your second method you are intializing one flag and according to the value in the flag you are excuting the rest of the instructions.
I think second method will be little bit more efficient than the first method as in the first one you are using the go to statement.But your readbilty will high for the first method than the second one.
Somebody can correct me if I am wrong.