Subject: | |
From: | |
Reply To: | |
Date: | Wed, 8 Sep 1999 10:05:27 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Richard,
I don't believe you have a problem with your data. I think your data records are just fine and contain the data you expect. When MPE displays records using the PRINT command or other methods you always get a carriage return when the records are displayed. This is required because of these characters are not displayed then the data will display in a contiguous fashion. When you displayed the characters you also should have seen a LF (line feed) character. These are "automagic" so your data is displayed properly. Also MPE does a little checking at the record and if there are 1 to many spaces at the end of the record MPE will place the CR early so as to not display all of the characters making your display act as a variable length file when it is a fixed length one.
If you are concerned that there may be extraneous characters in your file you can use a quick trick and use FCOPY and the HEX and CHAR options when displaying the records to your screen. The HEX option will display the data in the file as hex characters, two hex bytes per actual character in the file. The CHAR option will display the records as they are and where special non-printing characters are a '.' will be printed. The combination of the two options will print a hex representation as well as the character representation of each record. If you think there are CR characters then with the HEX option you will see a "0D" printed in that character position indicating extra characters.
Hope this helps you in your journey.
Tom Renz
>>> Richard Hoffmann <[log in to unmask]> 09/08/99 10:22AM >>>
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
|
|
|