Sorry, I misunderstood what you wanted.  Try adding the NULLOUT=RC4
parameter to your MERGE step and then add another step immediately after
that will execute conditionally, only if the output from the previous
step is RC=4.  For example:

//MERGE EXEC PGM=SORT,PARM'NULLOUT=RC4'
//....... existing JCL
//STEP2 EXEC PGM=SORT,COND=(4,NE,MERGE)
//SYSIN DD *
  SORT FIELDS=COPY
//SORTIN DD * 
   
//SORTOUT DD DSN=same.output.from.merge.step,DISP=SHR
//SYSOUT DD SYSOUT=*

John Reda
Syncsort, Inc. 

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Howard Brazee
Sent: Monday, March 17, 2008 10:11 AM
To: [email protected]
Subject: Re: Merge - exclude blank lines

Actually, what I want is a single blank line - only if the merged file
is empty, but no blank line if there are data in the merged file.

 

________________________________

From: Howard Brazee 
Sent: Monday, March 17, 2008 7:52 AM
To: [email protected]; 'Frank Yaeger'
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

----------------------------------------------------------------------
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

Reply via email to