Skip to main content

Issue with convert visual cobol

  • April 22, 2023
  • 7 replies
  • 0 views

ashakanta pradhan

Hi Team,

I am trying to convert the RM COBOL program to visual cobol 8.0 but getting the below error.

Please advise.


#COBOLVISUALCOBOLMIGRATION

7 replies

Chris Glazier
Forum|alt.badge.img+2

Hi Team,

I am trying to convert the RM COBOL program to visual cobol 8.0 but getting the below error.

Please advise.


#COBOLVISUALCOBOLMIGRATION

Hi,

Are you using the directives either RM or DIALECT"RM"?

These directives turn on certain RM compatibilities.

There is a section in the documentation which covers this here


ashakanta pradhan
  • Author
  • Participating Frequently
  • April 22, 2023

Hi,

Are you using the directives either RM or DIALECT"RM"?

These directives turn on certain RM compatibilities.

There is a section in the documentation which covers this here

I am using Microfocus. i have attached the project properties/setting below.

I want to convert the program into the Microfocus VISUAL COBOL 8.0.

Please advise.


Chris Glazier
Forum|alt.badge.img+2

I am using Microfocus. i have attached the project properties/setting below.

I want to convert the program into the Microfocus VISUAL COBOL 8.0.

Please advise.

Yes this is using DIALECT"MF" which supports the Micro Focus COBOL dialect which does not support the CONVERT and other phrases of the ACCEPT statement. These are RM compatible extensions to the language. In the box labeled DIALECT change Micro Focus to RM and try again.

This is all covered in the documentation link that I provided.


ashakanta pradhan
  • Author
  • Participating Frequently
  • April 22, 2023

Yes this is using DIALECT"MF" which supports the Micro Focus COBOL dialect which does not support the CONVERT and other phrases of the ACCEPT statement. These are RM compatible extensions to the language. In the box labeled DIALECT change Micro Focus to RM and try again.

This is all covered in the documentation link that I provided.

Thanks for your reply. But I want to know if at all these RM cobol code will be converted to Visual cobol completely. Thats what i am trying. May be I need to use the Visual cobol specific syntax that should be fine. 

Like I changed CENTRY-DATE to DATE YYYYMMDD.

If not then i will TRY using the dialet option.


ashakanta pradhan
  • Author
  • Participating Frequently
  • April 22, 2023

Thanks for your reply. But I want to know if at all these RM cobol code will be converted to Visual cobol completely. Thats what i am trying. May be I need to use the Visual cobol specific syntax that should be fine. 

Like I changed CENTRY-DATE to DATE YYYYMMDD.

If not then i will TRY using the dialet option.

I TRied using RM/COBOL and is not showing the CONVERT Error. But would like to know if there is any way that can use the microfocus visual cobol dialet to fix the compilation issue.

and another issue i am seeing around RETURN-CODE which says its a reserve word. and THis time its erroring in both dialet. could you please let me know how should i fix it.

THANKS, Very much.


Chris Glazier
Forum|alt.badge.img+2

I TRied using RM/COBOL and is not showing the CONVERT Error. But would like to know if there is any way that can use the microfocus visual cobol dialet to fix the compilation issue.

and another issue i am seeing around RETURN-CODE which says its a reserve word. and THis time its erroring in both dialet. could you please let me know how should i fix it.

THANKS, Very much.

The Micro Focus Dialect does not support RM compatibility natively. You can try settiing the dialect"MF" and then adding the directive RM in the additional directives field on the COBOL Properties page but you are likely to get other errors for incompatibilities with behavior. when running the application. DIALECT"RM" provides the higest degree of portability with existing RM programs but the RM directive can help with some of the syntax errors.

RETURN-CODE is a reserved word in COBOL, If you wish to use it as a data item then you can add the directive:     

REMOVE"RETURN-CODE"


ashakanta pradhan
  • Author
  • Participating Frequently
  • April 22, 2023

The Micro Focus Dialect does not support RM compatibility natively. You can try settiing the dialect"MF" and then adding the directive RM in the additional directives field on the COBOL Properties page but you are likely to get other errors for incompatibilities with behavior. when running the application. DIALECT"RM" provides the higest degree of portability with existing RM programs but the RM directive can help with some of the syntax errors.

RETURN-CODE is a reserved word in COBOL, If you wish to use it as a data item then you can add the directive:     

REMOVE"RETURN-CODE"

Thanks SO much.