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
 
Match records and retain duplicates

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Fri Jul 02, 2010 11:35 am    Post subject: Match records and retain duplicates
Reply with quote

Hi,

I have an below input file of RECFM=FB and LRECL = 80.

Code:
----+----1----+----2----+----3----+----4----+----5----+----6--
PROD1 FIGARO FIG0 HBB700     COBOLFIG P COBOLBND G974890 01 07
PROD1 FIGARO FIG0 HBB705     COBOLFIG P COBOLBND         01 01
PROD1 FIGARO FIG0 HBB710     COBOLFIG P COBOLBND         01 00
PROD1 FIGARO FIG0 HBB720     COBOLFIG P COBOLBND         01 00
PROD1 FIGARO FIG0 HBE000     COBOLFIG P COBOLOCD         01 00
PROD1 FIGARO FIG0 HBE001     COBOLFIG P COBOLOCD         01 00
PROD1 FIGARO FIG0 HBE002     COBOLFIG P COBOLOCD         01 00
PROD1 FIGARO FIG0 HBE003     COBOLFIG P COBOLOCD         01 00
PROD1 FIGARO FIG0 HBE500     COBOLFIG P COBOLOCD G270207 01 01
PROD1 FIGARO FIG0 HBE501     COBOLFIG P COBOLOCD         01 02
PROD1 FIGARO FIG0 HBE502     COBOLFIG P COBOLOCD         01 00
PROD1 FIGARO FIG0 HBE510     COBOLFIG P COBOLOCD         01 01
PROD1 FIGARO FIG0 HBE520     COBOLFIG P COBOLOCD         01 00
PROD1 FIGARO FIG0 HBE521     COBOLFIG P COBOLOCD         01 00
PROD1 FIGARO FIG0 HBE540     COBOLFIG P COBOLACD G974643 01 02
PROD1 FIGARO FIG0 HRB810     COBOLFIG P COBOLBND G974476 01 09

DEVF1 FIGARO FIG8 HBB700     COBOLFIG E COBOLBND G974890 01 07
DEVF1 FIGARO FIG8 HBE540     COBOLFIG E COBOLACD G974613 01 02
DEVF1 FIGARO FIG8 HBE570     COBOLFIG E COBOLACD G974611 01 22
DEVF1 FIGARO FIG8 HBE810     COBOLFIG E COBOLACD G974890 01 03
DEVF1 FIGARO FIG8 HBO540     COBOLFIG E COBOLOCD G974611 01 00
DEVF1 FIGARO FIG8 HBS510     COBOLFIG E COBOLACD G974890 01 05
DEVF1 FIGARO FIG8 HBS600     COBOLFIG E COBOLACD G974890 01 07
DEVF1 FIGARO FIG8 HRB810     COBOLFIG E COBOLBND G974611 01 09


Positions
1-5: Environment
7-12: system
14-17: sub system
19-28: Element
30-37: Type
39 : Stage

Now, I want the output with only elements present in both DEVF1 & PROD1
Ignore the elements which are present only in PROD1 or DEVF1.

output should be like below.


Code:
----+----1----+----2----+----3----+----4----+----5----+----6--
PROD1 FIGARO FIG0 HBB700     COBOLFIG P COBOLBND G974890 01 07
PROD1 FIGARO FIG0 HBE540     COBOLFIG P COBOLACD G974643 01 02
PROD1 FIGARO FIG0 HRB810     COBOLFIG P COBOLBND G974476 01 09

DEVF1 FIGARO FIG8 HBB700     COBOLFIG E COBOLBND G974890 01 07
DEVF1 FIGARO FIG8 HBE540     COBOLFIG E COBOLACD G974613 01 02
DEVF1 FIGARO FIG8 HRB810     COBOLFIG E COBOLBND G974611 01 09


is there any way to do this using SORT?

Thanks,
Sathish.
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: Fri Jul 02, 2010 8:52 pm    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will give you what I think you're asking for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=...  input file (FB/80)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=...  output file (FB/80)
//TOOLIN DD *
SELECT FROM(IN) TO(T1) ON(19,10,CH) ALLDUPS
SORT FROM(T1) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
  SORT FIELDS=(1,5,CH,D,19,10,CH,A)
/*
Back to top
View user's profile Send private message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Tue Jul 06, 2010 8:13 am    Post subject:
Reply with quote

Thanks frank. It works icon_smile.gif
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 Merging records, but not all the time prino DFSORT/ICETOOL 4 Sat Feb 17, 2018 4:20 pm
No new posts Need all records with high key kalidasvs SYNCSORT 14 Fri Feb 09, 2018 10:38 pm
No new posts Why is SORT rearranging records that ... cschablow DFSORT/ICETOOL 4 Wed Jan 24, 2018 10:14 pm
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm

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