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
 

 

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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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