IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Output records with matching strings


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
a1javeed

New User


Joined: 10 Dec 2005
Posts: 20
Location: KUWAIT

PostPosted: Sun Mar 01, 2009 7:45 pm
Reply with quote

Hi all

Kindly help me in this matter (!! i tried to find solution in the forum but i couldn't)

I have a file of FB 132 char as follwos

# CODE
1 4145
1 4146
1 4147
2 4145
2 4147
3 4147
4 4145
4 4146

I want to get the output file as follows using DFSORT/ICETOOL
3 4147

Thanks in Advance
Javeed
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Mar 01, 2009 8:56 pm
Reply with quote

Hello,

What rule(s) determine that (3 4147) is the only value to be written to the output? Are those the first bytes in the record? If your records are 132 why are only 6 bytes shown? You probably don't need to show all 132, but you need to properly describe what you have and what you want to do.

Also, it will help if you mention the recfm fo the files.

Depending on what your requirement actually is, you may be able to do what you want using INCLUDE or OMIT. There are many examples in the forum.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sun Mar 01, 2009 9:43 pm
Reply with quote

Javeed,

It really would help if you'd give more details as Dick mentioned.

But based on your Subject, description and example, I'll take a guess that you want to keep records which have only one occurrence of the value in position 1. If so, you can use a DFSORT/ICETOOL job like the following:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD *
1     4145
1     4146
1     4147
2     4145
2     4147
3     4147
4     4145
4     4146
/*
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,1,CH) NODUPS
/*


If that's not what you want, then you need to give the details of what you do want.
Back to top
View user's profile Send private message
a1javeed

New User


Joined: 10 Dec 2005
Posts: 20
Location: KUWAIT

PostPosted: Mon Mar 02, 2009 6:52 pm
Reply with quote

Hi all
With the help of your replies i was able to get what i want with some modifications....


thank u very much again
Javeed
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top