View previous topic :: View next topic
|
Author |
Message |
srini_igsi Currently Banned New User
Joined: 09 Dec 2005 Posts: 30 Location: Pune
|
|
|
|
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 |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
srini_igsi
assuming that 1 through 7 characters is ClientN, try this sort card
Code: |
merge fields=(1,7,ch,a) |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
srini_igsi Currently Banned New User
Joined: 09 Dec 2005 Posts: 30 Location: Pune
|
|
|
|
Thank you very much Frank, it's working. |
|
Back to top |
|
|
|