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
 

 

ICETOOL Help Required

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

New User


Joined: 22 Oct 2010
Posts: 4
Location: NJ

PostPosted: Fri Oct 22, 2010 6:44 am    Post subject: ICETOOL Help Required
Reply with quote

Hi,

I have two input files of size 70 Bytes each. Key is ( 1-13) is both the files.

O/p Length : 140 bytes ( Size of File 1 & File 2)

If the key in the first file matches with 2nd file , then need to add file contents ( other than key) to the first file record from 71st position.

Even for the duplicate record, I want the same info to be added as given in RED


Input File 1:
---------------

ATL1234567800YYY...................... YY
ATL1234567900YYY .................... YY
ATL1234568100YYY ...................... YY
ATL1234568100ZZZ ......................ZZ


Input File 2:
-------------

ATL1234567800XXX............AA
ATL1234567900XXX.............BB
ATL1234568100XXX.............CC
ATL9999999900XXX.............DD


O/p Required:
----------------


ATL1234567800YYY...................... YY ATL1234567800XXX............AA
ATL1234567900YYY .................... YY ATL1234567900XXX.............BB
ATL1234568100YYY ...................... YY ATL1234568100XXX.............CC
ATL1234568100ZZZ ......................ZZ ATL1234568100XXX.............CC



I tried with below JCL but duplicate records are NOT coming in the record

Code:
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN1      DD DSN=TSUEI4F.RVWDAT.JAN2AUG.SAMPLE,DISP=SHR             
//IN2      DD DSN=TSUEI4F.DM.DRCLAIM.SAMPLE,DISP=SHR                 
//TEMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(CYL,(500,400),RLSE),   
//             UNIT=SYSDA                                           
//COMBINE DD  DSN=TSUEI4F.SAMPLE.OUTP59,                             
//            DISP=(NEW,CATLG,CATLG),                               
//            SPACE=(CYL,(500,400),RLSE),                           
//            DCB=(RECFM=FB,LRECL=140,BLKSIZE=0)                     
//*                                                                 
//TOOLIN   DD *                                                     
    COPY FROM(IN1) TO(TEMP1) USING(CTL1)                             
    COPY FROM(IN2) TO(TEMP1) USING(CTL2)                             
    SPLICE FROM(TEMP1) TO(COMBINE) ON(1,13,ZD) -                     
    WITH(66,70)                                                     
/*                                                                   
//CTL1CNTL DD *                                                     
   OUTREC FIELDS=(1,65,140:X)                                       
/*                                                                   
//CTL2CNTL DD *                                                     
   OUTREC FIELDS=(1:1,13,    PUT FILE2 KEY IN SAME PLACE AS FILE1 KEY
                  66:14,57)  FILE2 DATA                             
/*                                   



O/P of above JCL is :

ATL1234567800YYY...................... YY ATL1234567800XXX............AA
ATL1234567900YYY .................... YY ATL1234567900XXX.............BB
ATL1234568100YYY ...................... YY ATL1234568100XXX.............CC


Here the below duplicate record is missing.

ATL1234568100ZZZ ......................ZZ ATL1234568100XXX.............CC

Your help is highly appreciated.

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

vinodjain

New User


Joined: 22 Oct 2010
Posts: 4
Location: NJ

PostPosted: Fri Oct 22, 2010 8:23 am    Post subject:
Reply with quote

There was a typo in prev message with Output file required and what i am getting now.


O/p Required:
----------------


ATL1234567800YYY...................... YY XXX............AA
ATL1234567900YYY .................... YY XXX.............BB
ATL1234568100YYY ...................... YY XXX.............CC
ATL1234568100ZZZ ......................ZZ XXX.............CC


O/P of that I got using the JCL in pre message is :

ATL1234567800YYY...................... YY XXX............AA
ATL1234567900YYY .................... YY XXX.............BB
ATL1234568100YYY ...................... YY XXX.............CC
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Fri Oct 22, 2010 12:47 pm    Post subject:
Reply with quote

Hi Vinod,

The below DFSORT JCL will give you the desire Output. Assumed your RECFM=FB.
Code:
//STEP10   EXEC PGM=SORT                                               
//*                                                                     
//SYSOUT   DD  SYSOUT=*                                                 
//*                                                                     
//SORTJNF1 DD *                                                         
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
ATL1234567800YYY....................................................YY 
ATL1234567900YYY ...................................................YY 
ATL1234568100YYY ...................................................YY 
ATL1234568100ZZZ ...................................................ZZ 
/*                                                                     
//*                                                                     
//SORTJNF2 DD *                                                         
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
ATL1234567800XXX....................................................AA 
ATL1234567900XXX....................................................BB 
ATL1234568100XXX....................................................CC 
ATL9999999900XXX....................................................DD 
/*                                                                     
//*                                                                     
//OUT      DD  SYSOUT=*                                                 
//*                                                                     
//SYSIN    DD  *    *** CONSTANT CONTROL CARDS ***                     
  JOINKEYS FILES=F1,FIELDS=(1,13,A)                                     
  JOINKEYS FILES=F2,FIELDS=(1,13,A)                                     
  JOIN UNPAIRED                                                         
  REFORMAT FIELDS=(F1:1,70,?,F2:1,70)                                   
  OPTION COPY                                                           
  OUTFIL FNAMES=OUT,INCLUDE=(71,1,CH,EQ,C'B'),BUILD=(1,70,85,57,13X)       
/*                                                                     

Hope this helps you.
Back to top
View user's profile Send private message
vinodjain

New User


Joined: 22 Oct 2010
Posts: 4
Location: NJ

PostPosted: Fri Oct 22, 2010 6:04 pm    Post subject:
Reply with quote

Thanks Nelson for the response. It worked.

Appreciate your help.

Thanks,
Vinod Jain
Back to top
View user's profile Send private message
vinodjain

New User


Joined: 22 Oct 2010
Posts: 4
Location: NJ

PostPosted: Fri Oct 22, 2010 7:51 pm    Post subject:
Reply with quote

Nelson, One question here:


Can you please explain me the below related to Include and Build parameters

OUTFIL FNAMES=OUT,INCLUDE=(71,1,CH,EQ,C'B'),BUILD=(1,70,85,57,13X)
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 Oct 22, 2010 10:58 pm    Post subject:
Reply with quote

Vinod,

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
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 How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts FTP help required amitc23 All Other Mainframe Topics 3 Thu Apr 28, 2016 12:02 pm
No new posts Why Newcopy is required when we have ... DIXINSH CICS 5 Thu Apr 28, 2016 9:47 am


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