HP3000-L Archives

February 1999, Week 1

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:
Walter Murray <[log in to unmask]>
Reply To:
Walter Murray <[log in to unmask]>
Date:
Wed, 3 Feb 1999 17:19:42 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
Tom ([log in to unmask]) wrote:
: I seem to remember a solution that went something like:
:  FD VAR-FILE
:     RECORD SIZE 1 TO 255 DEPENDING UPON VAR-SIZE.
:  01 VAR-REC.
:     05  VAR-MAX                    PIC X(255).
: ....
:  01 VAR-SIZE                       PIC S9(9) VALUE 255.
: ....
:   MOVE OUTFIELD TO VAR-REC.
:   MOVE 34 TO VAR-SIZE.
:   WRITE VAR-FILE.

That's close, but you need the VARYING keyword:

   If you like to be wordy:

      RECORD IS VARYING IN SIZE FROM 1 TO 255 CHARACTERS
              DEPENDING ON VAR-SIZE

   Or if you like to be terse:

      RECORD VARYING 1 TO 255 DEPENDING VAR-SIZE


Walter Murray
Hewlett-Packard
Support Technology Lab

ATOM RSS1 RSS2