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:
Steve Miller <[log in to unmask]>
Reply To:
Date:
Wed, 8 Sep 1999 13:37:30 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (79 lines)
I think that when you 'PRINT' a file, trailing spaces are not sent to the
terminal - probably to save bandwidth especially in the 'old' days of slow
comms.

To confirm what is really in a file, I generally use FCOPY with either the
HEX or CHAR (or both) parameter:

  FCOPY FROM=PAK05M05;TO=;HEX;CHAR

Try that and see if the spaces show up.

Steve Miller
Portion Pac, Inc
[log in to unmask]

> -----Original Message-----
> From: Richard Hoffmann [mailto:[log in to unmask]]
> Sent: Wednesday, September 08, 1999 12:22
> 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