IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

help sort -2 input 1 output with the same key-


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
theone1987

New User


Joined: 14 Sep 2009
Posts: 60
Location: Milan

PostPosted: Thu Mar 11, 2010 2:46 pm
Reply with quote

Hello everyone.
I need help.
I have two input files with the same key, and I want an output file that contains all that is in the first file and not in the second.

Code:
FILE INPUT 1
aaaaabbbbbbbb00000000ccccccccddddddddd2008-04-04CAPITALE...2008-03-3199999999..........
aaaaabbbbbbbb00000000ccccccccddddddddd2008-04-04CAPITALE...2008-04-3199999999..........
aaaaabbbbbbbb00000000ccccccccddddddddd2008-04-04CAPITALE...2008-05-3199999999..........

FILE INPUT 2
aaaaabbbbbbbb00000000ccccccccddddddddd2008-04-04CAPITALE...2008-04-3199999999..........
aaaaabbbbbbbb00000000ccccccccddddddddd2008-04-04CAPITALE...2008-05-3199999999..........


FILE OUT
aaaaabbbbbbbb00000000ccccccccddddddddd2008-04-04CAPITALE...2008-03-3199999999..........



all file :
Record format . . . : FB
Record length . . . : 290


The key must be:
00000000   ==> S9(15)V USAGE COMP-3    
cccccccc   ==> X(8)
2008-04-04 ==> X(10)
CAPITALE   ==> X(8)
2008-03-31 ==> X(10)
99999999   ==> S9(15)V9(3) USAGE COMP-3

bye everyone.
thank you very much.

i hope you understand
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 11, 2010 2:56 pm
Reply with quote

1) Please DO NOT post attachments as I for one am unable to access them, thus reducing the number of people available to help you.

2) This topic has been resolved many times on the forum, please search.

3) This is a link to the DFSORT smart tricks documentation which has many examples of matching records.
Please click HERE to access it.

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and the topic will be moved into the JCL forum by one of the moderators. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY


You also need to give more information that you have bothered to do.
1) RECFM and LRECL of both files
2) Position, length and format of the keys from both files.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Mar 12, 2010 12:22 am
Reply with quote

theone,

Please give the starting position of each relevant field.

Can file2 have records that are not in file1? If so, do you want those records in the output file?

Can file1 have duplicates within it? If so, what do you want to do if the duplicates in file1 do not have a match in file2?

Can file2 have duplicates within it?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top