reformat comparism results

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
bernix
Member
Posts: 21
Joined: Tue Oct 28, 2008 8:32 pm
Location: Vienna, Austria

reformat comparism results

Post by bernix » Tue Dec 06, 2011 7:58 pm

i have compared the content of 2 files and reformated the differences. now i've got a file that looks like (records are in sorted order)

AAA0010
AAA0015
BBB0000
BBB0100
CCC1200
CCC0100

i'd like to submit to my business partner a file that looks like

AAA;0010;0015
BBB;0000;0100
CCC;1200;0100

any suggestions?

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Tue Dec 06, 2011 11:25 pm

Based on the little bit of information you've given and assuming that you have two records for each key in positions 1-3, you can use a DFSORT/ICETOOL job like the following to get the output you requested from the input you showed:

Code: Select all

//S1    EXEC  PGM=ICETOOL                                   
//TOOLMSG DD SYSOUT=*                                       
//DFSMSG  DD SYSOUT=*                                       
//IN DD *                                                   
AAA0010                                                     
AAA0015                                                     
BBB0000                                                     
BBB0100                                                     
CCC1200                                                     
CCC0100                                                     
//OUT DD SYSOUT=*                                           
//TOOLIN DD *                                               
RESIZE FROM(IN) TO(OUT) TOLEN(14) USING(CTL1)               
//CTL1CNTL DD *                                             
  INREC BUILD=(1,7)                                         
  OUTFIL FNAMES=OUT,BUILD=(1,3,C';',4,4,C';',11,4)          
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? ... g3T7000080
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

bernix
Member
Posts: 21
Joined: Tue Oct 28, 2008 8:32 pm
Location: Vienna, Austria

Post by bernix » Wed Dec 07, 2011 7:55 pm

thanks for your help !

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others