Skip to main content

Hello,

I come again to ask for your help to convert a program to Cobol.

There is a version in C # and VB.

Attached is the complete solution with both languages.

There is a .bat file in both Tutorial folders that generates the solution to be used.

Within the solution the program I need is pr04_analyze.

I think that what I send allows me to do what I need.

Thank you again for your help.

Best regards,

Alberto Ferraz

Hello,

I come again to ask for your help to convert a program to Cobol.

There is a version in C # and VB.

Attached is the complete solution with both languages.

There is a .bat file in both Tutorial folders that generates the solution to be used.

Within the solution the program I need is pr04_analyze.

I think that what I send allows me to do what I need.

Thank you again for your help.

Best regards,

Alberto Ferraz

There is an on-line tool that will convert C# to COBOL for you.

https://cs2cobol.microfocuscloud.com/

Just copy in the C# code that you wish to convert and it will generate the equivalent COBOL code.
In some cases, the generated code may require some tweaking in order to get it to run but in most cases it does a fine job.


There is an on-line tool that will convert C# to COBOL for you.

https://cs2cobol.microfocuscloud.com/

Just copy in the C# code that you wish to convert and it will generate the equivalent COBOL code.
In some cases, the generated code may require some tweaking in order to get it to run but in most cases it does a fine job.

Hi Chris,

Thanks for the tip.
I will try the solution. If you have any difficulties, I will contact you.

Best regards

Alberto Ferraz


Hi Chris,

Thanks for the tip.
I will try the solution. If you have any difficulties, I will contact you.

Best regards

Alberto Ferraz

Hi Chris,

I have been using the tool whose link you sent me.

I just couldn't convert the following statement:

"try {CurrentField.GetImage (). Save (Pr22.Imaging.RawImage.FileFormat.Png) .Save (Fieldname " .png ");} catch (Pr22.Exceptions.General) {}".

 

It has been converted into:

"try invoke CurrentField :: GetImage () :: Save (type Pr22.Imaging.RawImage.FileFormat :: Png) :: Save (Fieldname & ".png") catch as type Pr22.Exceptions.General end-try".

The error goes in attachment.

Apparently the type exists (see the other annex).


What I need is to record the image contained in the variable.

Thanks in advance.

Best regards

Alberto Ferraz

 

 

 


Hi Chris,

I have been using the tool whose link you sent me.

I just couldn't convert the following statement:

"try {CurrentField.GetImage (). Save (Pr22.Imaging.RawImage.FileFormat.Png) .Save (Fieldname " .png ");} catch (Pr22.Exceptions.General) {}".

 

It has been converted into:

"try invoke CurrentField :: GetImage () :: Save (type Pr22.Imaging.RawImage.FileFormat :: Png) :: Save (Fieldname & ".png") catch as type Pr22.Exceptions.General end-try".

The error goes in attachment.

Apparently the type exists (see the other annex).


What I need is to record the image contained in the variable.

Thanks in advance.

Best regards

Alberto Ferraz

 

 

 

Do you have a reference to the assembly containing the Pr22.Imaging namespace as part of the references folder of the COBOL project?

Is the type recognized by Intellisense on any other statements?

Try typing in:

invoke type Pr22.

Does Intellisense list the classes within this namespace? 


Do you have a reference to the assembly containing the Pr22.Imaging namespace as part of the references folder of the COBOL project?

Is the type recognized by Intellisense on any other statements?

Try typing in:

invoke type Pr22.

Does Intellisense list the classes within this namespace? 

Hi again,

Yes I have. And there are other calls to Pr22 that are ok.

This particular type is only used in this instruction.

Yes, list but only up to Pr22.Imaging.RawImage.

From here, you don't list anything else (although in the assembly you have this instruction). See annex 02 of the previous topic.

Best regards

Alberto Ferraz


Hi again,

Yes I have. And there are other calls to Pr22 that are ok.

This particular type is only used in this instruction.

Yes, list but only up to Pr22.Imaging.RawImage.

From here, you don't list anything else (although in the assembly you have this instruction). See annex 02 of the previous topic.

Best regards

Alberto Ferraz

Try a sign in between RawImage and FileFormat like:

RawImage FileFormat


Try a sign in between RawImage and FileFormat like:

RawImage FileFormat

Thanks Chris, it's works fine.

Now I will improve the program.

Best regards

Alberto Ferraz


Thanks Chris, it's works fine.

Now I will improve the program.

Best regards

Alberto Ferraz

Hi again,

I have already managed to convert almost everything and the project is on track. I have a situation here that I cannot see how it is.

pr.PresenceStateChanged = PresentStateChanged;

In the converter it gives:

set pr::PresenceStateChanged to pr::PresenceStateChanged PresentStateChanged

but give me an error.

 

Thanks,

Alberto Ferraz

 


Hi again,

I have already managed to convert almost everything and the project is on track. I have a situation here that I cannot see how it is.

pr.PresenceStateChanged = PresentStateChanged;

In the converter it gives:

set pr::PresenceStateChanged to pr::PresenceStateChanged PresentStateChanged

but give me an error.

 

Thanks,

Alberto Ferraz

 

What is the error message you are getting?

You can try the following:

attach method PresentStateChanged to pr::PresenceStateChanged


What is the error message you are getting?

You can try the following:

attach method PresentStateChanged to pr::PresenceStateChanged

Hi Chris,

Thanks for the tip. I've tried it and it doesn't give a compilation error.

Still, I can't get the event to work, but I'll try to understand what's going on.

Thanks again for the help.

Best regards

Alberto Ferraz