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
 
help sort -2 input 1 output with the same key-

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: help sort -2 input 1 output with the same key-
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 11, 2010 2:56 pm    Post subject:
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 Moderator


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

PostPosted: Fri Mar 12, 2010 12:22 am    Post subject:
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    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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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