IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

having all records in the input file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Fri Dec 23, 2005 2:01 am
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
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
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 Developer


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

PostPosted: Fri Dec 23, 2005 8:29 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top