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: 2238
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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