HP3000-L Archives

June 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:
Reply To:
Ted Ashton <[log in to unmask]>
Date:
Mon, 14 Jun 1999 23:07:45 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (107 lines)
Thus it was written in the epistle of Mark Halstead,
> Hi All,
> I need some help joining two files together.  File A is 100 Bytes and 250
> records, file B is 25 bytes and 250 records.  I need to be able to create a
> 125 byte, 250 record file from these two files. The files need to be sort of
> "joined at the hip".  I've tried the Posix Paste command, but it deblanks so
> that if the last 10 bytes of file A are blank I end up with data stopping at
> 240 instead of 250 in my output file.  I've been told this is possible using
> Suprtool, but I don't want to tell my client they need to buy a piece of
> software to do something that *seems* so simple.

Mark,
  You didn't say if your client has either BASIC or Perl handy.  Either would
work fine, but here's the BASIC version of a quick-and-dirty solution:

:listfile file@,2
ACCOUNT=  ADMIN       GROUP=  ADMDEV

FILENAME  CODE  ------------LOGICAL RECORD-----------  ----SPACE----
                  SIZE  TYP        EOF      LIMIT R/B  SECTORS #X MX

FILE1             100B  FA           8          8   8       16  1  1
FILE2              25B  FA           8          8   8       16  1  1


:print file1
abcdefghijklmnopqrstuvwxyzabcd
abcdefghijklmnopqrstuvwxyzabcd
abcdefghijklmnopqrstuvwxyzabcd
abcdefghijklmnopqrstuvwxyzabcd
abcdefghijklmnopqrstuvwxyzabcd
abcdefghijklmnopqrstuvwxyzabcd
abcdefghijklmnopqrstuvwxyzabcd
abcdefghijklmnopqrstuvwxyzabcd
:print file2
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXY
:build file3;rec=-125,,f,ascii;disc=8
:basic

HP32101B.00.26(4WD)  BASIC  (C)HEWLETT-PACKARD CO 1979
>get test1
>list
TEST1
   10 DIM L1$[100],L2$[25],L3$[125]
   20 FILES *,*,*
   30 ASSIGN "FILE1",1,X
   40 ASSIGN "FILE2",2,X
   50 ASSIGN "FILE3",3,X
   60 ON END #1 THEN 120
   70 LINPUT #1;L1$
   80 LINPUT #2;L2$
   90 L3$=L1$+L2$
  100 PRINT #3;L3$
  110 GOTO 70
  120 END
>run
TEST1

>exit

END OF PROGRAM
:listfile file@,2
ACCOUNT=  ADMIN       GROUP=  ADMDEV

FILENAME  CODE  ------------LOGICAL RECORD-----------  ----SPACE----
                  SIZE  TYP        EOF      LIMIT R/B  SECTORS #X MX

FILE1             100B  FA           8          8   8       16  1  1
FILE2              25B  FA           8          8   8       16  1  1
FILE3             125B  FA           8          8   2       16  1  *


:print file3
abcdefghijklmnopqrstuvwxyzabcd
                    ABCDEFGHIJKLMNOPQRSTUVWXY
abcdefghijklmnopqrstuvwxyzabcd
                    ABCDEFGHIJKLMNOPQRSTUVWXY
abcdefghijklmnopqrstuvwxyzabcd
                    ABCDEFGHIJKLMNOPQRSTUVWXY
abcdefghijklmnopqrstuvwxyzabcd
                    ABCDEFGHIJKLMNOPQRSTUVWXY
abcdefghijklmnopqrstuvwxyzabcd
                    ABCDEFGHIJKLMNOPQRSTUVWXY
abcdefghijklmnopqrstuvwxyzabcd
                    ABCDEFGHIJKLMNOPQRSTUVWXY
abcdefghijklmnopqrstuvwxyzabcd
                    ABCDEFGHIJKLMNOPQRSTUVWXY
abcdefghijklmnopqrstuvwxyzabcd
                    ABCDEFGHIJKLMNOPQRSTUVWXY
:

HTH,
Ted
--
Ted Ashton ([log in to unmask]), Info Serv, Southern Adventist University
          ==========================================================
Nothing is more important than to see the sources of invention which are, in
my opinion more interesting than the inventions themselves.
                        -- Leibniz, Gottfried Whilhem (1646-1716)

ATOM RSS1 RSS2