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
 

 

DFSORT with Reformat Options

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

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Tue Oct 14, 2014 4:52 pm    Post subject: DFSORT with Reformat Options
Reply with quote

Hello All,

Could you please kindly help me on the below requirement.

I have two input Files with same record length and record format.

And also one input file with the key in File 1 and key in File 2.

File 1 as well as File 2 - FB - 80.

1. Name ( x(15) )
2. Personal Number + Suffix ( x(13) = 10 + 3 )
3. Amount1 ( 9(5).9(2) )
4. Amount2 ( 9(5).9(2) )
5. Remaining other fields

Compare File :
1. Personal Number + Suffix ( x(13) = 10 + 3 ) from File 1
2. Personal Number + Suffix ( x(13) = 10 + 3 ) from File 2

Output File :

1. Should take the Personal Number with Suffix value from Compare file and retrieve the Personal Number + Suffix,Amount1,Amount2 from File 1.

2. Should take the Personal Number with Suffix value from Compare file and retrieve the Personal Number + Suffix,Amount1,Amount2 from File 2.

3. Write output file with format mentioned below.

Output File : FB - 80

1. Personal Number + Suffix - File 1
2. Personal Number + Suffix - File 2
3. Amount 1 from File 1
4. Amount 1 from File 2
5. Amount 2 from File 1
6. Amount 2 from File 2

Both the Files will have multiple entries of Personal Number + Suffix with different Amount values.

Example File 1:

Code:

File 1 :

Personal Num + Suffix  Amount1         Amount 2    
0000000001XAB          32366.20       32366.20       
0000000001XAB          38206.84       38206.84     
0000000001XBB          43507.32       43507.32       
0000000001XCB          46726.52       46726.52       
0000000001XCB          55180.92       55180.92       

Fiel 2 :

Personal Num + Suffix  Amount1         Amount 2    
0000000005YAB          77366.20       77366.20     
0000000005YAB          35606.84       35606.84     
0000000005YBB          46707.32       46707.32         
0000000005YCB          49726.52       49726.52       


Compare File :

0000000001XAB 0000000005YAB

Output File :

0000000001XAB 0000000005YAB  32366.20 77366.20 32366.20 77366.20
0000000001XAB 0000000005YAB  38206.84 35606.84 38206.84 35606.84
0000000001XBB 0000000005YBB  43507.32 46707.32 43507.32 46707.32           
0000000001XCB 0000000005YCB  46726.52 49726.52 46726.52 49726.52             
0000000001XCB 0000000005YCB  55180.92          55180.92 
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Tue Oct 14, 2014 5:13 pm    Post subject: Reply to: DFSORT with Reformat Options
Reply with quote

You'll need to be clearer about how you get that output. There's only one suffix for each file on your third input, but you show multiple suffixes for your output.
Back to top
View user's profile Send private message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Tue Oct 14, 2014 5:17 pm    Post subject: Reply to: DFSORT with Reformat Options
Reply with quote

Hello,

Many thanks for your reply. Sorry for the post I have shown only one compare record.
Actual Compare Record will be :

Code:

Compare File :

0000000001XAB 0000000005YAB
0000000001XBB 0000000005YBB         
0000000001XCB 0000000005YCB   
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Tue Oct 14, 2014 10:03 pm    Post subject:
Reply with quote

A start could be below link with many illustrations,
ftp://ftp.software.ibm.com/storage/dfsort/mvs/sorttrck.pdf
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Tue Oct 14, 2014 10:26 pm    Post subject: Reply to: DFSORT with Reformat Options
Reply with quote

I think you'll need two JOINKEYS steps, due to the duplicate keys on your input files.

First JOINKEYS to match the key file to File 1, extracting only the information needed (amounts, key, and other-key) then second step to match on other-key. Even then you'll have some excitement with the multiple keys, but make a start with that and see how it goes.
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 How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DB2 Unload format options Susanta DB2 2 Fri Aug 12, 2016 5:42 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am


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