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
 

 

having all records in the input file

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

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Thu Dec 22, 2005 11:52 pm    Post subject: having all records in the input file
Reply with quote

Sorry, that was a mistake i made while sending the query. It shud be like
Input1:
AAA
AAA
BBB
CCC
DDD

Input2:
AAA
AAA
BBB
CCC

Input3:
AAA
CCC

My outptu file shud be like
Output file:
AAA
CCC

So basically I need those records common all the input files with no dups.
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 Dec 23, 2005 2:01 am    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
AAA
AAA
BBB
CCC
DDD
/*
//IN2 DD *
AAA
AAA
BBB
CCC
/*
//IN3 DD *
AAA
CCC
/*
//T1 DD DSN=&&I1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
 SELECT FROM(IN1) TO(T1) ON(1,3,CH) FIRST USING(CTL1)
 SELECT FROM(IN2) TO(T1) ON(1,3,CH) FIRST USING(CTL2)
 SELECT FROM(IN3) TO(T1) ON(1,3,CH) FIRST USING(CTL3)
 SPLICE FROM(T1) TO(OUT) ON(1,3,CH) -
   WITHEACH WITH(82,1) WITH(83,1) USING(CTL4)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,OVERLAY=(81:C'111')
/*
//CTL2CNTL DD *
  OUTFIL FNAMES=T1,OVERLAY=(81:C'222')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=T1,OVERLAY=(81:C'333')
/*
//CTL4CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(81,3,CH,EQ,C'123'),
    OUTREC=(1,80)
/*
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Fri Dec 23, 2005 6:22 am    Post subject:
Reply with quote

Frank,
When I am trying to copy the the 3 input files into the same temporary file T1, instead of appending the records the records are getting overwritten.
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Fri Dec 23, 2005 10:38 am    Post subject:
Reply with quote

Frank,
Sorry for this posting. I found out the mistake in the JCL and corrected it. Now everything is working fine. Thanks for all your help.
Thanks,
Nithin.
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 Dec 23, 2005 8:29 pm    Post subject:
Reply with quote

Quote:
When I am trying to copy the the 3 input files into the same temporary file T1, instead of appending the records the records are getting overwritten.


That would happen if you didn't have MOD for the T1 data set.
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 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


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