Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Eliminate Blank Lines in The Ouput SORTED File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Mon Sep 08, 2008 12:18 pm    Post subject: Eliminate Blank Lines in The Ouput SORTED File
Reply with quote

Hi All,
I want to compare 2 files and write the non matching records from File 2 to Output File. I coded the below JCl and it gives me a desired result. But gives me one space between each record

//SORTNM EXEC PGM=SORT
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD *
AAA 1
BBB 2
CCC 3
/*
//SORTJNF2 DD *
AAA 2
BBB 3
CCC 3
//SORTOUT DD DSN=MY.OUTPUT,DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
JOINKEYS FILES=F1,FIELDS=(1,3,A,5,1,A)
JOINKEYS FILES=F2,FIELDS=(1,3,A,5,1,A)
JOIN UNPAIRED,ONLY
REFORMAT FIELDS=(F2:1,5)
/*

In the Output File I get the result as

-----> Blank Line
AAA 2
-----> Blank Line
BBB 3

Can somebody suggest me a solution where I can eliminate these blank Lines
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Mon Sep 08, 2008 3:18 pm    Post subject:
Reply with quote

Huzefa,

Change the below part
Code:
JOIN UNPAIRED,ONLY

as
Code:
JOIN UNPAIRED,F2,ONLY

This will retrieve the unmatching records from file-2 alone.

Thanks,
Arun
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Mon Sep 08, 2008 4:40 pm    Post subject:
Reply with quote

It Worked

Thanks a Lot
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us