HP3000-L Archives

September 1999, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Arthur Frank <[log in to unmask]>
Reply To:
Arthur Frank <[log in to unmask]>
Date:
Fri, 24 Sep 1999 08:44:11 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
Hello,

This seems like an easy thing to do, but being pretty new at COBOL, I'm not sure how to accomplish it:  I have created a very simple program that processes fixed-length ASCII files, and it works fine.  However, I would like to use the program on files that have other record sizes.  Right now, my FILE SECTION looks like this:

 FILE SECTION.

 FD  INPUT-FILE
     LABEL RECORDS ARE STANDARD.
 01  INPUT-RECORD.
     05  KEY-VALUE-IN     PIC X(10).
     05  INPUT-DATA       PIC X(128).          <-----

 FD  OUTPUT-FILE
     LABEL RECORDS ARE STANDARD.
 01  OUTPUT-RECORD.
     05  KEY-VALUE-OUT    PIC X(10).
     05  KEY-COUNT        PIC 9(4).
     05  OUTPUT-DATA      PIC X(128).          <-----

I would like the INPUT-DATA and OUTPUT-DATA to be variable size, depending on the size of the input file.  I'm sure that this is possible, but I'm pretty new to the language...

TIA,

Art Frank
Manager of Information Systems
OHS Foundation
[log in to unmask]
(503) 220-8320

ATOM RSS1 RSS2