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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


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