HP3000-L Archives

September 1999, Week 2

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:
Vern Morton <[log in to unmask]>
Reply To:
Vern Morton <[log in to unmask]>
Date:
Wed, 8 Sep 1999 09:45:21 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
Richard,
Did you actually place a <CR> in the record?


-----Original Message-----
From: Richard Hoffmann [mailto:[log in to unmask]]
Sent: Wednesday, September 08, 1999 9:22 AM
To: [log in to unmask]
Subject: Carriage Return Problem.


Im having a problem with a COBOL program Placing a <CR> after the end of
the visible text and not after the spaces at the end of the record.

  FILE-CONTROL.
    SELECT OUTPUT-FILE         ASSIGN TO "PAK05M05"
           FILE STATUS IS CHECK-FILE-STATUS.

  DATA DIVISION.
  FILE SECTION.

  FD  OUTPUT-FILE
      LABEL RECORDS ARE STANDARD.
  01  OUTPUT-REC                        PIC X(33).



WORKING-STORAGE SECTION.
01 HOLD-OUTPUT-REC.
     03  STUDENT-ID                            PIC X(06).
     03  STUDENT-NAME                          PIC X(26).
     03  STUDENT-STATUS                        PIC X.

I opened the file as output and did a regular close when I was finished.

When I printed the file using Reflection with Display Functions turned
on the record came out looking like this.

003549ABRAHAM         WADE<CR>
003549ANDRUSS         DANA     L<CR>
003549BEAN            RHONDA   D*<CR>

The record should look like this.

003549ABRAHAM         WADE       <CR>
003549ANDRUSS         DANA     L <CR>
003549BEAN            RHONDA   D*<CR>


I used displays in the program to be sure that I have no null characters
and there were none.

The full record including spaces shows up when I displayed it just
before writing it the the OUTPUT FILE.

I know its probably something simple so if someone can enlighten me as
to what the problem may be or give me some ideas I would be grateful.


Richard Hoffmann

ATOM RSS1 RSS2