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
 

 

Output records with matching strings

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Output records with matching strings
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

Site Director


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

PostPosted: Sun Mar 01, 2009 8:56 pm    Post subject:
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 Moderator


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

PostPosted: Sun Mar 01, 2009 9:43 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 6 Fri Jan 13, 2017 5:02 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Matching with Key at different postions. rajatbagga DFSORT/ICETOOL 12 Wed Nov 09, 2016 10:58 am


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