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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm

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