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: 2285
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 editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm


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