Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us