Skip to main content

Micro Focus Developer > Micro Focus Visual COBOL 3.0 for Visual Studio 2013 > General Reference > Library Routines > File and Filename Routines

In the doc, under the sub-heading "Interpreting the return code as a file status code",

... it has an pseudo-example, thus:

 

 01 file-status      pic xx comp-x. 
 01 redefines file-status. 
     03 fs-byte-1  pic x. 
     03 fs-byte-2  cblt-x1-compx 
   . . . 
     call "CBL_xxx_xxx" using parameters 
     if return-code not = 0 
        move return-code to file-status 
           . . .

What does the cblt-x1-compx mean?  If it is shown incorrectly or incompletely, how should it be shown?

Thanks

Micro Focus Developer > Micro Focus Visual COBOL 3.0 for Visual Studio 2013 > General Reference > Library Routines > File and Filename Routines

In the doc, under the sub-heading "Interpreting the return code as a file status code",

... it has an pseudo-example, thus:

 

 01 file-status      pic xx comp-x. 
 01 redefines file-status. 
     03 fs-byte-1  pic x. 
     03 fs-byte-2  cblt-x1-compx 
   . . . 
     call "CBL_xxx_xxx" using parameters 
     if return-code not = 0 
        move return-code to file-status 
           . . .

What does the cblt-x1-compx mean?  If it is shown incorrectly or incompletely, how should it be shown?

Thanks

That is a typedef definition that can be found in the file cbltypes.cpy.
It equates to:
01 cblt-x1-compx pic x comp-x typedef.

The example is incomplete in that in order to use the prototypes you need to add a copy statement for cbltypes.cpy at the top of your program.

The alternative is just to define a data-item as pic x comp-x.