Duplicate Field Delcaration

Hi,

First of all, I am running out of time due to the continuous failures for no reason!!!

This time I have this:

------ Build started: Project: BusinessLogic, Configuration: Debug Any CPU ------

* Compiling "C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Accounts\AccountServiceMaintenance.cbl"

* Compiling "C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Accounts\AccountsReports.cbl"

* Compiling "C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Accounts\AccountTypeMaintenenace.cbl"

* Compiling "C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Customers\CustomersReports.cbl"

* Compiling "C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Customers\LoginService.cbl"

* Compiling "C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Customers\RertieveCustomer.cbl"

* Compiling "C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Transactions\BalancesReports.cbl"

* Compiling "C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Transactions\ExecuteTransaction.cbl"

* Generating CoreBanking.Accounts.AccountServiceMaintenance

* Generating CoreBanking.Accounts.AccountsReports

* Generating CoreBanking.Accounts.AccountTypeMaintenenace

* Generating CoreBanking.Customers.CustomersReports

* Generating BusinessLogic.Customers.LoginService

* Generating CoreBanking.Customers.RertieveCustomer

* Generating CoreBanking.Transactions.BalancesReports

* Generating CoreBanking.Transactions.ExecuteTransaction

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9695) : error : Duplicate field declaration: '_MF_control'

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9707) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9716) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9724) : error : Duplicate field declaration: '_MF_WSBLOCK'

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9727) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9746) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9762) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9779) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9791) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9807) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9823) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9840) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9856) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9873) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9885) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9901) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9917) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9934) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9950) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9967) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (9983) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10000) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10016) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10033) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10049) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10066) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10082) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10098) : error : Duplicate method declaration

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10109) : error : Duplicate field declaration: '_MF_LITBLOCK'

C:\Users\Jack\AppData\Local\Temp\_cd13324_2\AccountServiceMaintenance.il (10110) : error : Duplicate method declaration

C:\Users\Jack\documents\visual studio 2012\Projects\AdvancedDatabases\BusinessLogic\Transactions\ExecuteTransaction.cbl (30,1-2) : error COBCH0857 : System error - failure during ILASM phase

Done building project "BusinessLogic.cblproj" -- FAILED.

Build FAILED.

========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

I can't figure out a way to solve it!! I tried to remove the ILSMARTLINKAGE directive and it builds and succeeds but whenever I add ILSMARTLINKAGE it just fails! I did clean and build and nothing changed!

Here is AccountServiceMaintenance which is the firs program to be compiled if I remove it the infection goes to the next one like a cancer!

      

program-id. AccountServiceMaintenance as "CoreBanking.Accounts.AccountServiceMaintenance".


      

data division.

      

working-storage section.

      

      

linkage section.

      

copy 'Records\AccountServiceRecord'.

     

* Account Service Record

      

      

01  account-service-record.

      

    03  service-id      pic 9(10).

      

    03  service-name     pic X(35).

      

    03  description     pic X(150).

      

   

      

      

77  operation-code  pic X(10).

      

77  result-code     pic X(50).


      

procedure division using by value operation-code, by reference account-service-record returning result-code.

      

    copy 'DatabaseConnection'.

      

    evaluate operation-code

      

        when 'create'

      

            perform create-account-service

      

        when 'update'

      

            perform update-account-service

      

    end-evaluate.

      

    goback.

      

      

create-account-service.

      

    exec sql

      

        inesert into account_service(service_name, description) values(:service-name, :description)

      

    end-exec.

      

    exec sql

      

        commit

      

    end-exec.

      

    exec sql

      

        disconnect current

      

    end-exec.


      

update-account-service.

      

    exec sql

      

        update account_service set service_name = :service-name and description = :description

      

        where service_id = :service-id

      

    end-exec.

      

    exec sql

      

        commit

      

    end-exec.

      

    exec sql

      

        disconnect current

      

    end-exec.


      

sql-error-routine.

      

    move 'Unsuccessful Operation' to result-code.

      

   

      

end program AccountServiceMaintenance.

Please Help me out in this, I think the programs seems to be good form syntax perspective but, I don't know what's going on now!

 

Best Regrads

Parents
  • Sorry, I had forgotten that things have changed somewhat in the 2.2 Update 1 version of the product.  With the Update 1 version you should find that, instead of all the cryptic messages that you report, you will get a simple message: ILSMARTLINKAGE class 'xxx' has multiple definitions.

    Obviously this is better, but doesn't help you a great deal.

    So, when the project contains multiple programs referring to the same named linkage record (and ILSMARTLINKAGE is on), currently the compiler will give 'duplicate class' type errors, because it is attempting to generate multiple versions of the same ILSMARTLINKAGE class.

    One way of avoiding this is to use the additional ILSMARTNEST directive.  This causes these ILSMARTLINKAGE classes to be generated as nested classes within the class generated for the individual procedural COBOL program, and therefore disambiguates them.

    The only downside to this is that, for instance, a C# program that wants to call different COBOL programs using the same linkage records will have to construct instances of different classes for each program.

Reply
  • Sorry, I had forgotten that things have changed somewhat in the 2.2 Update 1 version of the product.  With the Update 1 version you should find that, instead of all the cryptic messages that you report, you will get a simple message: ILSMARTLINKAGE class 'xxx' has multiple definitions.

    Obviously this is better, but doesn't help you a great deal.

    So, when the project contains multiple programs referring to the same named linkage record (and ILSMARTLINKAGE is on), currently the compiler will give 'duplicate class' type errors, because it is attempting to generate multiple versions of the same ILSMARTLINKAGE class.

    One way of avoiding this is to use the additional ILSMARTNEST directive.  This causes these ILSMARTLINKAGE classes to be generated as nested classes within the class generated for the individual procedural COBOL program, and therefore disambiguates them.

    The only downside to this is that, for instance, a C# program that wants to call different COBOL programs using the same linkage records will have to construct instances of different classes for each program.

Children
No Data