MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Vertical Merge

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
tarandeep_singh
Beginner


Joined: 07 Mar 2005
Posts: 6
Topics: 3

PostPosted: Mon Dec 10, 2007 4:46 am    Post subject: Vertical Merge Reply with quote

Here goes the requirement
Input File
//FILEA
Back to top
View user's profile Send private message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Mon Dec 10, 2007 5:43 am    Post subject: Reply with quote

tarandeep_singh,


You should search before posting. This has been discussed many times in this forum. Following are some of the links that discusses the same issue:

http://www.mvsforums.com/helpboards/viewtopic.php?t=10&highlight=merge
http://www.mvsforums.com/helpboards/viewtopic.php?t=974&highlight=merge


Hope this helps
_________________
Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay)
Back to top
View user's profile Send private message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Mon Dec 10, 2007 5:47 am    Post subject: Reply with quote

tarandeep_singh,

You can also see the "Join fields from two files on a key" trick in the following link:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
_________________
Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay)
Back to top
View user's profile Send private message
tarandeep_singh
Beginner


Joined: 07 Mar 2005
Posts: 6
Topics: 3

PostPosted: Mon Dec 10, 2007 6:11 am    Post subject: Reply with quote

Hi vivek,
The links given by you point to two input files.
I have data in one file only.
Do you mean i need to split it into 2 files and then use the Splice/Join to merge again.

I expect a better logic.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon Dec 10, 2007 11:11 am    Post subject: Reply with quote

Jaggu,

You can use a DFSORT/ICETOOL job like the following to do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD *
11111     AAAAAAAA
11111     BBBBBBBB
22222     CCCCCCCC
33333     XXXXXXXXX
33333     YYYYYYYY
/*
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(1,5,CH) KEEPNODUPS -
  WITHEACH WITH(21,10) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,5))),
    IFTHEN=(WHEN=(81,8,ZD,EQ,+2),OVERLAY=(21:11,10))
  OUTFIL FNAMES=OUT,BUILD=(1,80)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tarandeep_singh
Beginner


Joined: 07 Mar 2005
Posts: 6
Topics: 3

PostPosted: Tue Dec 11, 2007 2:15 am    Post subject: Reply with quote

Thanks Frank,
Its working
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group