Absent Member.
Absent Member.
1055 views

How to handle special register "TALLY".

I am working on a modernization code where we are upgrading netexpress to visual cobol for visual studio. In one of the code special register character "Tally" is being used which is throwing back error saying that "Operand tally is not declared. 

After doing some search got to know that I need to enable it using either the OSVS or VSC2 compiler directives. Since I have basic idea on cobol and not an expert, so can someone please help me as how to include the compiler directives to get rid of the error.

 

0 Likes
4 Replies
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Replace Tally with a defined numeric field WS-TALLY
0 Likes
Absent Member.
Absent Member.

Any idea what is the value of TALLY. Is it PIC S9(5) or any other value ?
0 Likes
Vice Admiral
Vice Admiral

Have a look at the documentation. TALLYING is different between EXAMINE and INSPECT. EXAMINE uses the internal register TALLY, which has PIC 9(5) COMP; for INSPECT you must specify an elementary numeric data item.
0 Likes
Micro Focus Expert
Micro Focus Expert

You can set the directive either at project level or file level depending on whether you just want to compile that file or the entire project with the OSVS or VSC2 directives.

For file level properties go to the Solution Explorer, right click on the program and on the Property Pages dialog select COBOL and you can select a mainframe dialect, which will set the compiler directives necessary for that particular dialect, or alternatively you can add the required directive to the Additional directives field.

For project level, right click on the project in Solution Explorer and select the COBOL tab. From there it is similar o what I have just mentioned ie you can select a mainframe dialect or add the required directive to the Additional directives field and that will be applied to all of the COBOL programs in the project.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.