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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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