gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] To correct OpenCOBOL 1.1 Programmers Guide page 5-


From: Fred Mobach
Subject: Re: [open-cobol-list] To correct OpenCOBOL 1.1 Programmers Guide page 5-2 ?
Date: Wed, 7 Mar 2012 21:16:43 +0100
User-agent: KMail/1.9.10

On Wednesday 07 March 2012 20:10:04 vince wrote:
>
> On Wednesday 07 Mar 2012 14:11:50 Fred Mobach wrote:
> > While reading time and again the OpenCOBOL 1.1 Programmers Guide
> > paragraph 5.1. FD - File Description I question now if in the
> > RECORD clause the entry [ FROM integer-5 [ TO integer-6 ]
> > CHARACTERS is indeed optional. So I tested both options (according
> > to diff :
> > 25c25
> >
> > and the program without the FROM ... to  ... entry results in an
> > error message at runtime:
> > libcob: Record overflow (STATUS = 44) File : 'outfile'
> >
> > N.B. The same program without the entry FROM integer-5 [ TO
> > integer-6 ]CHARACTERS results in the same runtime error message
> > sited above.
>
> It is beginning to feel that the record you are reading in is larger
> than the declared size according to the 01 record description which
> is exactly what error 44 means.

Thank you, I'm afraid I'm fairly new to openCOBOL (not new to COBOL 
however, since 1970).
The sources / input file and a README are still available at 
http://data.mobach.nl/opencobol/fdclause/with-or-without-fromto.tgz
The records in the input file are 52 bytes (including the EOL) and in 
the recordarea of the source they are specified as :
       fd  outfile
           record is varying in size
           from 4 to 256 characters
           depending on rec-length-out.
       01  rec-out-record.
           03  rec-out-byte            pic x(0001) occurs 256.
Corresponding specifications without the  from 4 to 256 characters 
results in the errors indicated. However, Gary informed me that the 
presence of the OCCURS...DEPENDING ON can also result in this error.
-- 
Fred Mobach
website : https://fred.mobach.nl
 .... In God we trust ....
 .. The rest we monitor ..


reply via email to

[Prev in Thread] Current Thread [Next in Thread]