Topic
2 replies Latest Post - ‏2013-10-23T12:22:33Z by Taboulai
Taboulai
Taboulai
2 Posts
ACCEPTED ANSWER

Pinned topic Problem with microsoft visual studio Cobol

‏2013-10-22T21:37:50Z |

Hello,
 
I can not compile my cobol functions with microsoft visual studio Cobol.
I have a file that uses another procedure contained in a file:
 
Subroutine call:
Creating a New Project in console mode under Microsoft Visual Studio COBOL:
Main program (caller) (appel-pg-PP.cbl)


  IDENTIFICATION DIVISION.
           program-id. appel-pg-PP.
           
       ENVIRONMENT DIVISION.
       DATA DIVISION.
           
           working-storage section.
               1 entier1 pic 99 value 0.
               1 entier2 pic 99 value 0.
               1 entier3 pic 999 value 0.
           
           screen section.
               1 a-plg-titre line 2 col 20 'Test sur entier'.
               1 a-plg-res3.
                   2 line 18 col 3 'Le resultat dans le pg principal somme : '.
                   2 a-entier3 pic 999 from entier3.
               1 a-plg-res1.
                   2 line 14 col 3 'le 1er nombre : '.
                   2 a-entier1 pic 99 from entier1.
               1 a-plg-res2.
                   2 line 15 col 3 'le 2eme nombre : '.
                   2 a-entier2 pic 99 from entier2.
                   
       procedure division.
               display a-plg-titre
               compute entier1 = 10
               compute entier2 = 20
               display a-plg-res1
               display a-plg-res2
               call 'somme' using entier1 entier2 entier3 end-call *>APPEL du sous-prog SPPsomme
               display a-plg-res3
           goback.
       end program appel-pg-PP.





Creating a new file naming is cbl sum:
 
Program called (somme.cbl)


       IDENTIFICATION DIVISION.
           program-id. somme.
           
       DATA DIVISION.
           linkage section.
               1 val1 pic 99.
               1 val2 pic 99.
               1 val3 pic 999.
           screen section.
               1 a-plg-res.
                 2 line 12 col 3 'Le resultat somme dans sous prog : '.
                 2 a-val3 pic 999 from val3.
                   
       procedure division using val1 val2 val3.
           compute val3 = val1 + val2
           display a-plg-res
           goback.
       end program somme.

 








The error caused when the compilation is:

Le 1er nombre : 10
Le 2eme nombre : 20Unhandled Exception : COBOLProgramNotFound
%d        error message text not fount [somme]
  at System.Object    MicroFocus.COBOL.Program.Controle.CallReturningObject<UInt32   callConvention,System.String program,System.Object[] parameters, MicroFocus.COBOL.Program.IObjectControl pgInstance>
  at Int64 MicroFocus.COBOL.Program.Control.Call<UInt32 callConvention,System.String program,System.Object[] parameters,MicroFocus.COBOL.Program.IObjectControlpgInstance>
  at Int32 appel-pg-PP.appel_pg_PP<> in C:\Users\Twister\Programmation\COBOL\InitiationCobol\60sousProgramme\40sousProgramme\SsProg\SsProg\appel-pg-PP.cbl :line 33
  at Int32 appel-pg-PP._MF_ENTRY<>






If someone could clarify me, it stops me completely
thank you very much



Sophie
 

  • wmklein
    wmklein
    75 Posts
    ACCEPTED ANSWER

    Re: Problem with microsoft visual studio Cobol

    ‏2013-10-22T23:53:21Z  in response to Taboulai

    I don't think there is anything called "Microsoft Visual studio COBOL".  I do see a reference to "MF" in one of your error messages.  Any chance you are using "Micro Focus Visual Studio COBOL"?  If os, I suggest you post your question in one of their forums, not the IBM one.

    • Taboulai
      Taboulai
      2 Posts
      ACCEPTED ANSWER

      Re: Problem with microsoft visual studio Cobol

      ‏2013-10-23T12:22:33Z  in response to wmklein

      Sorry, I actually use the Microsoft Visual Studio COBOL software, only the COBOL dialect through Micro Focus.

      Thank you, I'll direct me to another forum.