Highlighted
Trusted Contributor.
Trusted Contributor.
214 views

COBCH0217S Preceding item at this level has zero length

Jump to solution

Hi,

my (maybe 25 years old) Copy starts with

01 L-VD-Daten sign leading separate.
02 MOVE-LVDDATEN.

03 Gesamt.
05 VNR PIC S9(8).

...

Trying to compile it in Visual Cobol 5 CobolCopyBook-Project/COBOL-JVM-Poject I am getting 'COBCH0217S Preceding item at this level has zero length' .

Is there maybe any directive to avoid this ?

Sincerely,

Herbert

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Hi Herbert,

This can't work with visual Cobol 5.x
do you have the rm directive? (for RyanMac Compiler)

Use this, that will be better and must works:

01 L-VD-Daten.
    02 MOVE-LVDDATEN.
         03 Gesamt.
              05 VNR PIC S9(8)  sign leading separate.

Why you want to have the sign separate? leading or trealing!

I hope this will help you.

Claude Greiner

 

 

View solution in original post

0 Likes
3 Replies
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Hi Herbert,

This can't work with visual Cobol 5.x
do you have the rm directive? (for RyanMac Compiler)

Use this, that will be better and must works:

01 L-VD-Daten.
    02 MOVE-LVDDATEN.
         03 Gesamt.
              05 VNR PIC S9(8)  sign leading separate.

Why you want to have the sign separate? leading or trealing!

I hope this will help you.

Claude Greiner

 

 

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Specifying options like SIGN IS LEADING SEPARATE at the 01 level is part of standard ANSI COBOL, and has the effect that all numeric items within the group have the specified sign format.

I found that the code did compile fine with VC 5.0, so I suspect that we are missing some context.  Can you try compiling just the following as a separate program?

 

01 L-VD-Daten sign leading separate.
02 MOVE-LVDDATEN.
03 Gesamt.
05 VNR PIC S9(8).

      move 3 to vnr

      display vnr

 

It should compile fine, and when you run it you should see the following display:

 

+00000003

 

If, as I suspect, this all works, then I think you will have to give us a bit more of the program that's showing the problem.

 

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Thanks for your rapid answers !

I created new Copybook-JVM-Java projects, now it works fine ...

Maybe some difference in the compiler configuration 😕 ?!

 

Herbert

 

 

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.