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
 

 

Query on ICETOOL

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

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Wed Jun 02, 2010 10:51 pm    Post subject: Query on ICETOOL
Reply with quote

Hello All,

I have a requirement where there are 2 input files of LRECL=10 and key is 4 bytes long. I need an output file which will have
1. records from File 1 where the complete record is not present in File 2
2. records from File 2 where the key matches with File 1 but the non key is different
3. records which are common to both File 1 and File 2

For the input files,
We will not have duplicate records in the entire record length in any one input file


1ST FILE.

ABCD909090
DEFG126567
HIJKL000000
OPQR111111
UYTR567678
GTHY787878
JUTH565656
JGDR454545

2ND FILE:

UYTR888888
DEFG786543
JGDR345678

OUTPUT FILE:

ABCD909090
DEFG786543
HIJKL000000
OPQR111111
UYTR888888
GTHY787878
JUTH565656
JGDR345678

I was wondering if this is possible thru SORT/ICETOOL

Thanks,
TS
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jun 02, 2010 11:08 pm    Post subject:
Reply with quote

thunderstorm,

Do you want 3 different output files? or a single out put file?
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Wed Jun 02, 2010 11:11 pm    Post subject: Reply to: Query on ICETOOL
Reply with quote

Kolusu,

Its a single output file containing all the 3 types

Thanks,
TS
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jun 02, 2010 11:23 pm    Post subject: Reply to: Query on ICETOOL
Reply with quote

thunderstorm,

Use the following DFSORT/ICETOOL JCL

Code:

//STEP0100 EXEC PGM=ICETOOL               
//TOOLMSG  DD SYSOUT=*                     
//DFSMSG   DD SYSOUT=*                     
//IN       DD DSN=Your input file1,DISP=SHR           
//         DD DSN=Your input file2,DISP=SHR           
//OUT      DD SYSOUT=*                     
//TOOLIN   DD *                           
  SELECT FROM(IN) TO(OUT) FIRST ON(1,4,CH)
//*
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Wed Jun 02, 2010 11:30 pm    Post subject: Reply to: Query on ICETOOL
Reply with quote

using your icetool card , the below requirement is not getting met

2. records from File 2 where the key matches with File 1 but the non key is different
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jun 02, 2010 11:35 pm    Post subject: Re: Reply to: Query on ICETOOL
Reply with quote

thunderstorm wrote:
using your icetool card , the below requirement is not getting met

2. records from File 2 where the key matches with File 1 but the non key is different


thunderstorm,

simply reverse the order of concatenation. Use file 2 first and file 1 next
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 Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


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