I don't mean to be silly, but have you tried:
FD PARM-FILE LABEL RECORDS ARE STANDARD
RECORD CONTAINS 16 CHARACTERS.
01 PF-REC.
05 PF-PROGRESS-DATES.
10 PF-PROG-START-DATE PIC X(8).
10 PF-PROG-END-DATE PIC X(8).
Looking at your input records, this should do the trick, unless there
is more data to each record.
Craig.
Dave Vorgang <[log in to unmask]> wrote in message news:<[log in to unmask]>...
> Yes, you are correct. Removing the record contains and the occurs
> statement fixed the problem.
>
> In fact someone just called before your email and pointed out the same
> thing.
>
> I tested it out and it works fine.
>
> Thanks for your help.
>
>
>
> Dave Vorgang
> Senior (and getting older everyday) Programmer / Analyst
> Medford School District - Information Technology
> (541) 842-1021
> mailto:[log in to unmask]
>
> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
> Behalf Of Robert J. Schlosser
> Sent: Tuesday, September 28, 2004 7:44 AM
> To: [log in to unmask]
> Subject: Re: [HP3000-L] Reading an unnumbered file
>
> Dave,
>
> A couple of questions:
>
> 1) If the record only has two fields, why are eight defined?
> 2) Why is the maximum record length greater that the length of the eight
> fields?
> 3) Why I the file declared as variable length?
>
> Have you tried removing the occurs and the record contains clauses. This
> would then match your input file.
>
> Robert Schlosser
> MPE-CSM
> HP Certified Professional
> Humana / Ochsner
> (504) 219-8134
>
>
>
> Dave Vorgang <[log in to unmask]>
> Sent by: HP-3000 Systems Discussion <[log in to unmask]>
> 09/28/2004 09:27 AM
> Please respond to
> Dave Vorgang <[log in to unmask]>
>
>
> To
> [log in to unmask]
> cc
>
> Subject
> [HP3000-L] Reading an unnumbered file
>
>
>
>
>
>
> I am having a problem reading a file in COBOL which contains the
> following records:
> 2004092420041005
> 2004120320041214
> 2005022520050308
> 2005042920050510
>
> The file type is:
> ACCOUNT= SIS GROUP= DATA
>
> FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
> SIZE TYP EOF LIMIT R/B SECTORS #X MX
>
> VBM150F3 16B FA 4 4 213 16 1 2
>
> The fd is:
> FD PARM-FILE
> RECORD CONTAINS 16 TO 100 CHARACTERS.
> 01 PF-REC.
> 05 PF-PROGRESS-DATES OCCURS 4 TIMES.
> 10 PF-PROG-START-DATE PIC X(08).
> 10 PF-PROG-END-DATE PIC X(08).
>
> The open is:
> *
> * Retrieve Progress Report dates.
> *
> OPEN INPUT PARM-FILE.
>
> READ PARM-FILE AT END
> DISPLAY "VBM150F3 does not exist."
> STOP RUN
> END-READ.
>
> CLOSE PARM-FILE.
>
> The file is being treated as a numbered file and it does not read in the
> last 8 characters.
>
> How do I read in all the data that is in this file?
>
> Thanks,
>
>
> Dave Vorgang
> Senior (and getting older everyday) Programmer / Analyst
> Medford School District - Information Technology
> (541) 842-1021
> mailto:[log in to unmask]
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain CONFIDENTIAL material. If you
> receive this material/information in error, please contact the sender
> and delete or destroy the material/information.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|