HP3000-L Archives

October 2003, 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:
"Emerson, Tom" <[log in to unmask]>
Reply To:
Emerson, Tom
Date:
Tue, 14 Oct 2003 18:01:40 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
> -----Original Message-----
> From: Srifan_In [mailto:[log in to unmask]]
> 
>  I am struggling to write a job which can merge two files.
> 
> The functionality I am looking for is like below:
[...seperate input files joined on a line-by-line basis forming...]
> aaa|123
> bbb|456
> ccc|789

Are you looking to do this "entirely with JCL" [shell scripts, command files, UDC's, etc.]?  The reason I ask is that this looks like a first-year-COBOL-student type program (or BASIC, or even "C"), so the phrase "struggling to write a JOB" makes me think: "you're using the WRONG tool!"

If you need a pre-built application, you might be able to do this with Edit/3000 or a commercial editor [Qedit] {I'm not a Quad expert, so I don't know if Quad has a line-by-line join function} but you haven't specified whether the lines are of consistent lengths [which may make an Edit/Qedit solution problematic] or if they are "binary" data [ditto!]

Also, what happens if there are more input lines in the second file than the first?  Is this an error?  How about the other way around?  Is there a maximum record-size constraint? [and could the files contain lines "long enough" that if they matched up would exceed this maximum?  what then?]

-----------------------

Of course, by the time I've written this I see two other responses:

   Rich Trapp suggests "paste" from the shell [the "shell" is (still) new to many long-time MPE'rs, so these solutions are often overlooked]
   Catherine Litton suggests FCOPY to a file equated with ;APPEND, however this would produce the result:

     aaa
     bbb
     ccc
     123
     456
     789

which doesn't match your requirements.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2