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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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