Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Merging the files and re-arranging the records using DF Sort

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

New User


Joined: 09 Dec 2005
Posts: 30
Location: Pune

PostPosted: Tue Jun 19, 2007 7:29 pm    Post subject: Merging the files and re-arranging the records using DF Sort
Reply with quote

I have two files, one with the actual dates(File1) and the other with the spaces(File2) into the date fields. After merging the output should be as specified below.

File1:
Client1 date1 date2
Client1 date1 date2
Client1 date1 date2
Client2 date1 date2
Client2 date1 date2
Client2 date1 date2
File2:
Client1
Client1
Client2
Client2

File3:
Client1 date1 date2
Client1 date1 date2
Client1 date1 date2
Client1
Client1
Client2 date1 date2
Client2 date1 date2
Client2 date1 date2
Client2
Client2

Could some body help me out please.
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jun 19, 2007 7:39 pm    Post subject:
Reply with quote

srini_igsi

assuming that 1 through 7 characters is ClientN, try this sort card
Code:
merge fields=(1,7,ch,a)
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: Tue Jun 19, 2007 8:46 pm    Post subject:
Reply with quote

Reddy,

Here's a DFSORT job that will do what you asked for. I assumed the two input files have compatible RECFMs and LRECLs. You need EQUALS to ensure that the order of duplicate records in SORTIN01 and SORTIN02 is maintained.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN01 DD DSN=... input file1
//SORTIN02 DD DSN=... input file2
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION EQUALS
  MERGE FIELDS=(1,7,CH,A)
/*
Back to top
View user's profile Send private message
srini_igsi
Currently Banned

New User


Joined: 09 Dec 2005
Posts: 30
Location: Pune

PostPosted: Wed Jun 20, 2007 11:20 am    Post subject:
Reply with quote

Thank you very much Frank, it's working.
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 Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us