HP3000-L Archives

January 1996, Week 3

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:
Jeanette Nutsford <[log in to unmask]>
Reply To:
Jeanette Nutsford <[log in to unmask]>
Date:
Sun, 14 Jan 1996 16:36:56 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (64 lines)
In article <[log in to unmask]>,
M Gopalakrishnan  <[log in to unmask]> wrote:
 
>   On MPE/iX, the PRINT command prints truncated records when an
>   UNNUMbered file  contains  the  trailing  eight  characters  as digits.
>    The :PRINT command is not  displaying the trailing  eight  characters
>    as it  assumes those digits are line numbers.
>
>   Based on the customer requests, the new option RAW for the PRINT command
>   will be added.  With this new option, the contents of the file will be
>   displayed  as it is,  without  assuming  the trailing 8  characters as
>   line numbers. Also RAW causes non-printable characters to appear as '.'.
>
>[deleted]
 
and Jim Herod replied
 
>Before you take this step, *PLEASE* consider that most of the source
>code entrusted to MPE is COBOL, which keeps line numbers in the leading
>6 characters of the line.  If the filecode is 1052, treat the file as
>EDTCT with leading line #s, otherwise proceed as in your proposal.
>You might wish to look at EDIT/3000, TDP, and HPEDIT as to how they decide
>that a file is numbered.
 
We must be careful here as any file can be kept with or without line numbers
(ie UNN). A COBOL file has filecode 1052 but can be kept numbered or unnumbered.
When it is kept numbered the line numbers are held at the beginning of each
line, when unnumbered the line numbers are kept at the end of each line.
It appears that the PRINT command is only looking at the LAST 8 digits to decide
whether it is unnumbered or not.  Please also note that it is only looking at
the first record to make this decision.
 
An interesting test I have just done illustrates the problem with the PRINT
command as it now stands.
 
Create a short record file (I used QUAD and a record length of 10).
Add a number of records with only numeric digits to simulate a data file.
Keep this file numbered and also unnumbered.
The numbered file will have 18 byte records and the unnumbered 10 bytes records.
Now PRINT the 2 files.
The numbered file will print the data records as you entered them.
The unnumbered file assumed the last 8 digits were line numbers and truncated
them thus showing only the first 2 digits.
 
If you now add a record to the beginning of the unnumbered file which has less
than 8 digits or even has alpha in the last 8 digits the PRINT will now think it
is an unnumbered file and print it 'correctly'.
 
The current PRINT command prints all characters (whether printable or not)
except for the last 8 characters if the first record has 8 numeric digits in the
last 8 chars.
 
As I see it there are now 2 options that we are discussing -
 
 1. A new option to enable these last 8 characters to be printed regardless of
their value.  I cannot think of a suitable option name for this one.
 2. A second new option to enable the PRINT command to interpret non printable
characters as '.'. I would suggest this option could be CHAR (for the new value
- borrowed from FCOPY) and  RAW for the default (as it is now).
 
Jeanette Nutsford
[log in to unmask]
SIGCOBOL Co Chair

ATOM RSS1 RSS2