Howard,
There is a difference between a blank and an empty file. The merge
should have worked correctly if the file was empty as opposed to having
a blank line. Let's assume your input had a blank line. There are
multiple ways to get rid of this. The easiest is to use an OMIT
statement. Since you have a key starting in column 1, I am assuming
that the input data sets are some form of RECFM=F. (If they were not
you would need to be careful of the RDW.) The following control cards
will eliminate any record from any of your input files that has blanks
in columns 1 through 10 and perform the merge that you wanted. If that
test isn't sufficient you should be able to adjust the position and
length to achieve the desired result.
OMIT COND=(1,10,CH,EQ,C' ')
MERGE FIELDS=(3,49,A,
1,2,A,
52,15,A),FORMAT=CH,SIZE=E100000
John Reda
Syncsort, Inc.
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Howard Brazee
Sent: Monday, March 17, 2008 9:52 AM
To: [email protected]
Subject: Merge - exclude blank lines
I have a job that merges two files. One of those files was empty in a
run (or produced a blank line), and the merged file started off with a
blank line.
That blank line made the subsequent job abort (thinking the file was
empty). I could change that program or maybe change the sort to
eliminate that blank line.
How would I change this sort?
MERGE FIELDS=(3,49,A,
1,2,A,
52,15,A),
FORMAT=CH,SIZE=E100000
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html